Search code examples
androidreactjsionic-frameworkcapacitor

Ionic Capacitor: Application says "Something went wrong"


I have a webapp that was built with ReactJS that runs beautifully.

I'm trying to convert this webapp into an Android app using Iconic Capacitor. I've gone through the steps to do so, imported things into Android Studio and tried to run things. When the app starts I can see the initial screen layout for a moment before the screen clears and it says "Something went wrong". I'm including a screen shot of what happened.

Something went wrong

I'm trying to understand this problem: What process is responsible for this message? Is it the Android emulator, Capacitor, ReactJS?


Solution

  • Turns out 2 problems:

    Had to add this to the configuration:

      "server": {
        "cleartext": true
      }
    

    There was also a CORS problem that had to be addressed at the server level