apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 986 forks source link

Failed to resolve host network app id #1489

Open jonyking opened 2 months ago

jonyking commented 2 months ago

Bug Report

Problem

We can not start start the app after building via xcode.

What is expected to happen?

Normal start of the App

What does actually happen?

Xcode shows the following error: "Failed to resolve host network app id"

Information

XCode: 15.4 cordova-android: "^12.0.1", cordova-ios: "^7.0.1", cordova-plugin-keyboard: "^1.2.0", cordova-plugin-splashscreen: "^6.0.2", cordova-plugin-statusbar: "^4.0.0" NPM: 10.8.1 Framework7: 8.3.2

Command or Code

-

Environment, Platform, Device

All iOS devices

Checklist

breautek commented 2 months ago

Xcode shows the following error: "Failed to resolve host network app id"

This isn't an error, it's a warning, as indicated by its yellow background (instead of red). It will appear on any app using utilizing WKWebView and is very likely not related to your observed behaviour. It will also print on properly working WKWebViews as well.

Screenshot 2024-09-09 at 9 45 00 AM

Without knowing exactly what the observed behaviour is, I can only speculate and I am assuming you're effectively seeing a blank WKWebView screen, but here are some things you can try:

  1. Look for any other errors or console prints that might suggest failure to load your index document. These may include (but not limited to) plugins failing to load.
  2. Test to see if you can connect the Safari Web Inspector (See How (Scroll to the iOS section)). Safari won't report on any log events or errors that occurred before the debugger was attached, but while the inspector is focused, you can press cmd + r to refresh the webview. Any JS errors or log prints that occur on launch should be observable in the Safari Web Inspector. These may not be visible from the XCode console either and might give you insights on what is actually happening.