Support

Home Forums Event Espresso Premium “Connection error.Unable to load data”and yes I have chkd troubleshooting guide

“Connection error.Unable to load data”and yes I have chkd troubleshooting guide

Posted: October 23, 2017 at 5:39 pm

Viewing 12 reply threads


HIL Tennis

October 23, 2017 at 5:39 pm

Seems like I’m returning valid JSON response with event data: https://hamar-tennis.no/wp-json/ee/v4.8.29/events but I’m getting the good old: “Connection error. Unable to load data” when trying to connect using Applications password. I have stepped through all the relevant steps in the troubleshooting guide https://eventespresso.com/wiki/ee4-event-apps/#troubleshooting


Josh

  • Support Staff

October 23, 2017 at 6:33 pm

Hi there,

The apps actually hit more than just the /events/ endpoint, and many of the endpoints (like /registrations/) require authentication.

Assuming you have no security plugins activated, WP_DEBUG is false, and you deactivate (yes deactivate) the Applications Password plugin, can you log into the app using your WP Username and WP Password? It might also help to install the REST API log plugin to capture more verbose error messages when the app tries to connect to your webserver.


HIL Tennis

October 24, 2017 at 12:23 am

WP_DEBUG is not declared at all in wp-config.php so by default it’s OFF I guess? I have deactivated the Applications Password plugin, Installed the REST API Log Plugin and tried to connect using my own WP username and WP password. When I check the REST API Log there are no entries after I try to connect with the App?


Tony

  • Support Staff

October 24, 2017 at 5:37 am

Hi there,

I checked into this and something on your server is blocking the request based on the user-agent set on the request.

This works – http://take.ms/8CCwP

This does not – http://take.ms/6p9TT

The request isn’t even hitting your site, it’s being blocked before that so it won’t show up in the REST API Log.

I recommend contacting your host and have them investigate what it blocking the request and either remove it or add an exception for the above.


HIL Tennis

October 24, 2017 at 7:30 am

I see you are using http and not https, are you sure this is not the problem? Also can you please elaborate on what kind of request the app is making?


Tony

  • Support Staff

October 24, 2017 at 7:44 am

Its exactly the same with http and https

Working – http://take.ms/PdgRc

Not working – http://take.ms/dYOLa

Something is blocking the request based on the user-agent, it doesn’t matter what requests are made currently (I’ve tried many different endpoints), the okhttp user agent is blocked on them all.

I’m testing GET requests.


HIL Tennis

October 26, 2017 at 5:57 am

Thank you for your effort Tony. I have contacted our host and asked them about this. Most likely it is blocked by default and they need to make an exception in their firewall.


Tony

  • Support Staff

October 26, 2017 at 6:49 am

I meant to ask about, which version of the app are you using? Android or iOS?


HIL Tennis

October 26, 2017 at 6:55 am

Android. My hosting company has replied (translated from norwegian) “GET requests shall normally not be blocked by the server, but there could be some rules on the server blocking this.” They have asked for my the IP address of the client making the request so they can check their logs. It’s the public IP of my mobile phone right?


Tony

  • Support Staff

October 26, 2017 at 8:01 am

Yes, that’s correct.


HIL Tennis

October 26, 2017 at 8:36 am

Response from the hosting company: “It appears that the request triggers a rule against bad user_agents (OkHttp).
Do you have the ability to override user_agent in the app?”


Tony

  • Support Staff

October 26, 2017 at 8:40 am

No, you can’t change the user agent from within the app.

I’ve created a ticket for us to investigate changing the user agent on the request but as it stands you can’t change it.


HIL Tennis

October 30, 2017 at 6:43 am

All ok now. My host made an exception in their firewall for the Okhttp user agent. Nice host 🙂

Viewing 12 reply threads

The support post ‘“Connection error.Unable to load data”and yes I have chkd troubleshooting guide’ 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