"Sorry, something went wrong. Try reloading the page." on client


#1

After installing the client I get the following error message. How do I troubleshoot this? I can’t seem to find any logs or source of information to help me with this.


#2

If you open your browser developers tools and then reload the page, can you see any errors there? its likely this means the client is failing to connect to your API. Either the config for backend url in the client was wrong, or the API isn’t working. Have you tested the API too?


#3

Hi all, same error for me. https://www.dropbox.com/s/88sw0yjsrwmwcr4/Screenshot%202015-10-31%2010.00.07.png?dl=0


#4

anyone can help?


#5

@peppemessomalex @marceltj You need to look at the logs in your browsers dev tools.
This error generally means the client has failed to get even a basic response from the API.
So

  1. Have to deployed the API? is it returning a sane response for someapi.com/api/v3/config
  2. Did you configure BACKEND_URL for the client before you built it?
  3. Can you see what error you’re getting from the API in the developer tools console or network tab?

#6

@peppemessomalex Looking at the screenshot, your API request isn’t returning anything.
If you load http://localhost/platform/httpsdocs/api/v3/config/site in a browser does that work? do you get JSON back?

Looking at your Apache config there are at least a couple of things wrong there:

  • ServerName for the API can’t be a base url (ie. shouldn’t have /api/) on it. It needs to be just a domain name.
  • You need to run the API and client on different domains… not just different paths.
  • I’m not 100% sure but you might need to have a <Directory> block in the apache config to set AllowOverride so the .htaccess file works.

#7

It works! I separate API and Client in different domains and inserted the </ Directory> with AllowOverride All in the configuration files of apache to run the .htaccess.

Thank you very much for helping @rjmackay!!!


#8

“Sorry, something went wrong. Try reloading the page.” on client
Hello, I’ve been having this issue fo days now,
I am running the API and the client on different domains as you see below
I am running the API on my local machine.

When I load the API alone http://harrasapi.com/ it returns:
{

"now": "2017-06-25T17:46:07+00:00",
"version": "3",
"endpoints": [
    "collections",
    "collections/posts",
    "comments",
    "config",
    "contacts",
    "csv",
    "csv/import",
    "dataproviders",
    "forms",
    "forms/attributes",
    "forms/roles",
    "forms/stages",
    "layers",
    "media",
    "messages",
    "migration",
    "notifications",
    "passwordreset",
    "permissions",
    "posts",
    "posts/export",
    "posts/geojson",
    "posts/revisions",
    "posts/translations",
    "posts/updates",
    "register",
    "roles",
    "savedsearches",
    "tags",
    "users",
    "webhooks"
],
"user": {
    "id": null,
    "email": null,
    "realname": null
}

}

Could any one help me please?