Support

Home Forums Event Espresso Premium App login error after changing URL for a SSL

App login error after changing URL for a SSL

Posted: May 1, 2018 at 8:42 pm

Viewing 27 reply threads


Nodal

May 1, 2018 at 8:42 pm

Hi,
Today I added an SSL certificate to my site and I edited the .htaccess file with this code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?NC]
RewriteRule (.*) https://%1%{REQUEST_URI} [L,R=301]

But now my client has this error message when he tries to login the app:
“Error Occurred
The server was acting as a gateway or proxy and received an invalid responce from the upstream server.”

And me, I have this error message when I try to login the app:
“correction error. unable to load data”

Also, when a client tried the completed a transaction at the step 2, this error message showed up:
“This registration step could not be completed. Please refresh the page and try again.”
I’m using PayPal express for the payment. Do I have to change something with the API because of the new SSL certificate ?

Thanks


Tony

  • Support Staff

May 2, 2018 at 4:39 am

Hi there,

If the above is the only change you made to the site to enable HTTPS then what your doing is not actually telling the site to use HTTPS, your redirecting all HTTP requests to HTTPS (similar but different).

However, I just tested a registration on your site and didn’t run into any problems on step 2, I’ve been directed to PayPal to make a payment.

Are you still running into problems?


Nodal

May 2, 2018 at 6:07 am

Hi,
It is the only thing I did, but my hosting compagnie did the install and told me to add the code in the .htaccess.
Is redirecting all HTTP request to HTTPS is a normal way to go or you suggest something different ?

And what about the error with the app ?

Thanks


Josh

  • Support Staff

May 2, 2018 at 11:51 am

The error from the app may be solved by adding this line to that same .htaccess file before the added rewrite rules:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

Then, when you input the site URL into the app’s log in form please be sure to include the https:// part of the URL.


Nodal

May 2, 2018 at 2:14 pm

I added the line but I have the same error. Here my .htaccess file:

RewriteEngine on

# BEGIN WordPress
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC]
RewriteRule (.*) https://%1%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


Josh

  • Support Staff

May 2, 2018 at 2:51 pm

You can follow this troubleshooting guide:

https://eventespresso.com/wiki/ee4-event-apps/#troubleshooting


Nodal

May 3, 2018 at 9:44 pm

Hi,
Here are the step I followed on troubleshooting guide:

-The Mobile apps require that the permalinks are set to Post Name. (It is okay in the site)

-WP_DEBUG must be set to false. (yes it is)

-If the above steps do not resolve the issue you can temporarily deactivate all plugins except Event Espresso, switch to the default theme, then try the app again. ( I did it and the app do not work)

-You will need Event Espresso version 4.8.41+ and WordPress 4.5+ to connect your mobile device to your website. (I have the latest version)

What do I do next ?
Thanks


Josh

  • Support Staff

May 4, 2018 at 9:38 am

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
should be added to the .htaccess file before the line with
# BEGIN WordPress
because otherwise it will be deleted each time the WP > Settings > Permalinks page is opened and each time a plugin resets the rewrite’s rules.

You can also try removing the .htaccess edits originally reported in this thread and install this plugin:

https://wordpress.org/plugins/really-simple-ssl/


Nodal

May 7, 2018 at 11:56 am

Hi,
I did it. But it doesn’t work, I do have the same error message.
I did reinstall the plugin and it didn’t changed anything.

It is very important that we find the problem, I need it before my next event.

Thanks


Josh

  • Support Staff

May 7, 2018 at 12:30 pm

We should be able to find the problem if you can rule out exactly everything that was changed since the time the app was working. Further to the above, when was the last time you successfully used the app where it connected to your site as expected?


Nodal

May 7, 2018 at 12:53 pm

The app stop working after I transfer for a https. I did all the necessary step to have my SSL certificate work. I did follow this tutorial:
https://kinsta.com/blog/http-to-https/

1)My hosting company installed the SSL certificate.
2)I did Redirect HTTP to HTTPS using the modification of the .htaccess file
3)I Updates Hard-coded HTTP Links using “Better Search Replace Plugin”.
4)I did change the URL in the wordpress general setting

My hosting company use HTTP/2 for the site running with SSL, I do not know, maybe it can be the problem ?

After these change, the app didn’t work.
Yes the app was working fine before.

Thanks


Nodal

May 7, 2018 at 1:44 pm

Hi,
The problem start after I transfer the site to https.
I followed this tutorial :
https://kinsta.com/blog/http-to-https/
Herre what I did:
1) My hosting company installed the certificate on the server
2) I did Redirect HTTP to HTTPS by editing the .htaccess file
3) I Updated Hard-coded HTTP Links using the plugin Better Search Replace
4) I didn’t Update Custom Scripts and External Libraries
5) I did change http to https in the wordpress general setting.

My hosting company told me that they use http/2 for their site using SSL certificate. Maybe it can change something with our problem …

Thanks


Josh

  • Support Staff

May 7, 2018 at 3:45 pm

You could try backing up your .htaccess file, then empty the file, then head over to your site’s WP > Settings > Permalinks. WordPress will write some default rewrite rules when you visit that page.

Then at that point try the app.

If you continue to get the error, you add this to the new .htaccess file:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Immediately before the line that has
# BEGIN WordPress

Then try the app again. If the error persists, you can try adding one more line to the .htaccess just after RewriteEngine On:

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]


Nodal

May 9, 2018 at 7:42 am

Hi,
I did it, here my .htaccess file:
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

But I do have the same error message:
Connection error. Unable to load data.
My client has this error:
The server was acting as a gateway or proxy and received an invalid response from the upstream server.

I am using Android and my client use an iPhone, we do not have the same error.
In the login form, I’m using https:// in the Website URL.
Thanks


Tony

  • Support Staff

May 9, 2018 at 9:43 am

Hi there,

What are your permalinks currently set to on the site?

‘Pretty’ permalinks are all failing on the site currenty, if you go to the home page and click any link on the nav menu you’ll get 404.

But, if you use the ‘plain’ link, for example:

{domain}/?espresso_events=soyez-lexpert-de-votre-bebe-sherbrooke/

it loads correctly.


Nodal

May 9, 2018 at 10:57 am

That is new …
My permalinks are set at “Post name”. I used the most current setting, not the custom /%postname%/.
I did refresh the permalinks this morning when I was trying to follow the step to rewrite my .htaccess file.
Look like the link in the menu are working now. Is it the same on youe side ?


Josh

  • Support Staff

May 9, 2018 at 1:56 pm

Yes those are working now.

If you’re still working at troubleshooting the app authorization issues you could install the REST API Log plugin and try the apps again. Then there will be some REST API responses logged (with errors) from the apps trying to connect to your site.


Tony

  • Support Staff

May 9, 2018 at 2:49 pm

Also, do not set ‘https://&#8217; in the app, let the app do it for you.

So if your domain is www.example.com that’s exactly what you put in the Website URL field, not http://www.example.com or https://www.example.com


Nodal

May 10, 2018 at 7:19 am

For now, all the log I have with the plugin give me a status 200. I do not see error, but I don’t think the log come from the mobile application. When I try to login the app, I do not see it in the REST API plugin.


Tony

  • Support Staff

May 10, 2018 at 8:16 am

So if your loading the REST API Log then trying to log into app and refreshing the API log but no additional logs entries are made, something on the server is likely blocking the request before it hits the site.

Clear the log (Settings -> Rest API log -> Purge entries)

Then try logging into the app and recheck the log to confirm if no entries are made?


Nodal

May 10, 2018 at 9:01 am

I confirm, no entries are made.

It looks like all the entries are associated with a Failed Transactions from Event Espresso. Maybe it is another problem but some of my client had this error message: “This registration step could not be completed. Please refresh the page and try again.”
Do I have to open a new post for this problem ?


Tony

  • Support Staff

May 10, 2018 at 9:08 am

It looks like all the entries are associated with a Failed Transactions from Event Espresso.

To confirm, you are looking in the REST API Log? Not the server’s error logs, correct?

I don’t believe you should have any entries in the REST API log for EE transactions.

Maybe it is another problem but some of my client had this error message: “This registration step could not be completed. Please refresh the page and try again.”
Do I have to open a new post for this problem ?

That’s a general error and means something went wrong during the registration, if you look in the servers error logs (not the REST API Log), can you see any errors from EE there?


Nodal

May 10, 2018 at 10:40 am

I confirm I’m looking at REST API LOG and not the server’s log.
In the REST API LOG, I have this log entries with this title:

/ee/v4.8.36/site_info

Some title only says : “/”

When I’m trying to open those who only give “/” as the title, the page never open.
I will look for the server error log for the other problem. Thanks


Josh

  • Support Staff

May 10, 2018 at 12:25 pm

It sounds like the REST API requests from the app aren’t even making it to your server. You could check to see if the host changed anything else other than added an SSL cert. Perhaps there’s a firewall that’s restricting those requests.


Nodal

May 10, 2018 at 12:32 pm

My host is asking what is the IP address of the app. Where your app is hosted and what is the IP. Is it making sense ?


Josh

  • Support Staff

May 10, 2018 at 1:56 pm

The IP address will be the IP address from your device. The app isn’t actually a hosted application, it’s an application you download to your device. Then your device connects to your server to get the event & registration data.


Nodal

May 11, 2018 at 7:30 am

Hi,
With the hosting services, we did turn off the firewall and the app still gives the error message.
They want to know if the app is compatible with the SNI protocol, which is used with SSL certificates.
Thanks


Josh

  • Support Staff

May 11, 2018 at 7:38 am

Yes I believe so because WPEngine uses the SNI protocol and sites hosted on WPEngine have no issues with app authentication.

Viewing 27 reply threads

The support post ‘App login error after changing URL for a SSL’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso