Support

Home Forums Event Espresso Premium Mobile app login issues

Mobile app login issues

Posted: September 13, 2019 at 10:46 pm


wfinley

September 13, 2019 at 10:46 pm

Attempting to log into mobile app but getting: “Error Occurred – The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.”
Trying to log in with:
alaskavalanche.org
WP-UN
WP-PW
What am I missing?


Tony

  • Support Staff

September 16, 2019 at 3:56 am

Hi there,

I’m guessing this is just a typo in the reply above:

alaskavalanche.org doesn’t load for me, you’re using alaskaavalanche.org, right?

and thats exactly what you are typing into the Website URL field? No schema link https://? (Using just the domain is correct, no schema etc, just the domain and the app figures it out from there)


wfinley

September 16, 2019 at 8:51 am

Yes a typo… and I’m just entering the url – no schema.
I did reset the support license key (since I had it set to my dev url) – but I’ve tried it since resetting and it’s still not logging me in.


Josh

  • Support Staff

September 16, 2019 at 9:51 am

Hi,

FYI, resetting the support license key will have zero affect on the app log in. In this case it may the device you’re using isn’t allowed to connect to the site due to a fire wall or other security measure.

What you can do is install the REST API log plugin onto your site, that’s available to download here:

https://wordpress.org/plugins/wp-rest-api-log/

Then after then plugin is activated, you’ll try to connect to the site using the app again. If you get the same error message again, you can then go to your site’s Tools > REST API Log page and if the request was accepted by the server, you’ll get more detailed information about the request to your site from the app.


wfinley

September 16, 2019 at 11:23 am

OK – I download the plugin and installed and then attempted to login multiple times – only to be blocked and to find no REST API log entries.
I tested via standard ret call (wp-json/wp/v2) and it was logged – it’s just not connecting via the app.


wfinley

September 16, 2019 at 11:23 am

(rest not ret)


Josh

  • Support Staff

September 16, 2019 at 12:59 pm

One thing to check would be the site’s .htaccess file to see if there’s anything more than the standard WP rewrite rules. Sometimes some security plugins will block a range of user agents that will effectively stop the app’s request from hitting the REST API endpoint.


wfinley

September 16, 2019 at 1:34 pm

No – just standard rewrite rules.
Rest API log entries are being recorded from /ee/v4.8.36/events for payments etc. – but I don’t see anything in regards to the app.


Tony

  • Support Staff

September 16, 2019 at 2:51 pm

/ee/v4.8.36/events for payments etc

for payments? Can you explain a little more.

The App uses the above endpoint, I’m not sure where payments come into it currently?

Which version of the app are you using? iOS or Android?

Is there a test account I can use to log into the site and monitor the app requests? If so you can send the details over using this form:

https://eventespresso.com/send-login-details/


wfinley

September 16, 2019 at 3:29 pm

Submitted. Thx!


Tony

  • Support Staff

September 16, 2019 at 3:36 pm

The password provided appears to be incorrect and I assume I’m now blocked for multiple failed attempts.

Can you recheck the credentials please.


wfinley

September 16, 2019 at 4:21 pm

This reply has been marked as private.


Josh

  • Support Staff

September 16, 2019 at 8:52 pm

You could check the server’s access logs for when you tried to connect using the app. I get the same error when I try the app on your site. That said, if I use Postman with the same credentials to send an Auth’d GET request to the same endpoints the app sends a request to, it works.


Tony

  • Support Staff

September 17, 2019 at 2:58 am

It looks like this is happening because someone has removed the rest output link header from the site.

The app sends a request to the site to confirm that HTTPS is valid on that site, on doing so it always receives a response from the site and within that response should be a header containing the REST API endpoint, something like this:

https://monosnap.com/file/8GxWcwGNnopIzIDPysW6WX0BPAs8K9

Why do we do this? Because someone may at some point change the endpoint and doing this means we don’t need to update the apps for it to work.

On your site, that header is missing:

https://monosnap.com/file/pqs0C4BiiqOObhdZJ4aVS8jCMdFqUK

So the apps are using root for the rest api discovery endpoint,so for example, requests like this:

https://alaskaavalanche.org/wp-json/ee/v4.8.36/site_info

Are going to:

https://alaskaavalanche.org/ee/v4.8.36/site_info

Which then returns 404.

The credentials you sent over were admin details so I checked your themes functions.php file in the admin and can see you’re using multiple functions to remove REST actions, you’ll need to remove those for the apps to work.

At the very least, you’ll need to remove this one:

remove_action('template_redirect', 'rest_output_link_header', 11, 0);


wfinley

September 17, 2019 at 11:19 am

Thank you!! Totally didn’t think about that. I always turn those off they bog down page load time. Working now.
The app is working great. 30 class registrations since Sunday & we haven’t even told the world that registration is open.


Tony

  • Support Staff

September 18, 2019 at 2:47 am

You’re most welcome.

The problem with removing that link header is the rest discovery endpoint is filterable, you could technically change it to whatever you want. So anything using something similar to what we do will likely fail.

Anyway, I’m glad its working for you now.

Any further problems just let us know.

The support post ‘Mobile app login issues’ 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