Why blank Ionic capacitor App running on iOS return this Error: Could not connect to the server

Viewed 4039

I'am trying to run a clean blank new Ionic app with capcitor.

I went step-by-step through this tutorial: https://capacitor.ionicframework.com/docs/ios/

Xcode build the app succefully but when the app opens it shows a blank white screen after the splash screen.

In the Xcode logs I see this:

2020-03-13 14:34:44.439927+0200 App[7606:2360127] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/260D9E68-0132-4886-9065-8CC3F016E06C/Library/Cookies/Cookies.binarycookies
Loading network plugin

2020-03-13 14:34:44.737344+0200 App[7606:2360127] CAPKeyboard: resize mode - native
⚡️  Loading app at http://localhost:8101...

2020-03-13 14:34:44.871413+0200 App[7606:2360127] [Process] kill() returned unexpected error 1

Reachable via WiFi

2020-03-13 14:34:44.875737+0200 App[7606:2360127] [Process] kill() returned unexpected error 1
APP ACTIVE

2020-03-13 14:34:44.883121+0200 App[7606:2360127] [Process] kill() returned unexpected error 1

⚡️  WebView failed provisional navigation
⚡️  Error: Could not connect to the server.

2020-03-13 14:34:44.954466+0200 App[7606:2360127] [Process] kill() returned unexpected error 1
SplashScreen.hideSplash: SplashScreen was automatically hidden after default timeout. You should call `SplashScreen.hide()` as soon as your web app is loaded (or increase the timeout). Read more at https://capacitor.ionicframework.com/docs/apis/splash-screen/#hiding-the-splash-screen

System setup:

  • Cordova Version: cordova-lib@9.0.1
  • Ionic version : 6.2.1
  • iOS: 13.3.1
  • Mac: Catalina 10.15.3

I'v been creating and deleting apps for the past few days and I'm absolutly lost.

Any help would be good, Thanks in advance.

1 Answers

Lord!

What an embracing bug,

The issue was I ran -host=0.0.0.0 and not --host=0.0.0.0.

For anyone facing this issue I recommend using --external and not --host

Related