Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ionic angular iOS app cannot restart normally after being left in the background for a long time #30034

Open
3 tasks done
Xushijun opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@Xushijun
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

ionic angular iOS app cannot restart normally after being left in the background for a long time, app that cannot be launched success.
I check the ios code, there is a function for iOS WKWebview: webViewWebContentProcessDidTerminate, and there is reload function inside, Most of the time, it is useful.

I checked the log and I found the WKWebview try to reload, but not start success

Here is the crash log
2024-11-19 02:19:57.551742-0500 Appname[4435:194348] [Process] 0x10e0800c0 - GPUProcessProxy::didClose:
2024-11-19 02:19:57.554156-0500 Appname[4435:194348] [Process] 0x10e0800c0 - GPUProcessProxy::gpuProcessExited: reason=Crash
2024-11-19 02:19:57.557285-0500 Appname[4435:194348] [Process] 0x10f001560 - [PID=4437] WebProcessProxy::gpuProcessExited: reason=Crash
2024-11-19 02:19:57.564363-0500 Appname[4435:194548] [connection] nw_read_request_report [C1] Receive failed with error "Software caused connection abort"
2024-11-19 02:19:57.567280-0500 Appname[4435:194548] [connection] nw_read_request_report [C2] Receive failed with error "Software caused connection abort"
2024-11-19 02:19:57.585899-0500 Appname[4435:194348] [Process] 0x10f000470 - NetworkProcessProxy::didClose (Network Process 0 crash)
2024-11-19 02:19:57.591085-0500 Appname[4435:194348] [Process] 0x10f001560 - [PID=4437] WebProcessProxy::didClose: (web process 0 crash)
2024-11-19 02:19:57.591239-0500 Appname[4435:194348] [Process] 0x10f001560 - [PID=4437] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash
2024-11-19 02:19:57.591894-0500 Appname[4435:194348] [ProcessSuspension] 0x10e020120 - ProcessAssertion: Failed to acquire RBS Background assertion 'XPCConnectionTerminationWatchdog' for process because PID 0 is invalid
2024-11-19 02:19:57.592597-0500 Appname[4435:194548] [ProcessSuspension] 0x10e020120 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=0, error: (null)
2024-11-19 02:19:57.603668-0500 Appname[4435:194348] [Process] 0x12a819018 - [pageProxyID=8, webPageID=9, PID=4437] WebPageProxy::processDidTerminate: (pid 4437), reason=Crash
2024-11-19 02:19:57.639244-0500 Appname[4435:194348] [Loading] 0x12a819018 - [pageProxyID=8, webPageID=9, PID=4437] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
⚡️ TO JS {"error":"The request timed out."}
⚡️ TO JS {"isActive":true}
⚡️ TO JS {"isActive":true}
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=TypeError: undefined is not an object, WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred}
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=TypeError: undefined is not an object, WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred}
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=TypeError: undefined is not an object, WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred}
⚡️ [log] - onscript loading complete
To Native Cordova -> Badge load Badge1192008043 ["options": []]
To Native Cordova -> Device getDeviceInfo Device1192008044 ["options": []]
To Native Cordova -> File requestAllPaths File1192008045 ["options": []]
⚡️ WebView loaded
To Native Cordova -> AppRate getAppTitle AppRate1192008046 ["options": []]
To Native Cordova -> AppRate isNativePromptAvailable AppRate1192008047 ["options": []]
To Native Cordova -> NativeStorage getItem NativeStorage1192008048 ["options": [counter]]
To Native Cordova -> AppRate getAppVersion AppRate1192008049 ["options": []]
2024-11-19 02:20:27.598060-0500 Appname[4435:194348] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

Expected Behavior

Hope the app can restart success

Steps to Reproduce

open your app, push it to backend, then use you iphone normal. Tomorrow you will get an app that cannot be launched

Code Reproduction URL

https://dashboard.ionicframework.com/create-app/0422bc6a

Ionic Info

[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package.json'

   Require stack:
   - /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
   - /usr/local/lib/node_modules/@ionic/cli/lib/index.js
   - /usr/local/lib/node_modules/@ionic/cli/index.js
   - /usr/local/lib/node_modules/@ionic/cli/bin/ionic

Ionic:

Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.4.0
@angular-devkit/build-angular : 18.2.12
@angular-devkit/schematics : 18.2.12
@angular/cli : 18.2.12
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 6.2.0
@capacitor/android : not installed
@capacitor/core : 6.2.0
@capacitor/ios : 6.2.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.13.1 (/usr/local/bin/node)
npm : 10.5.2
OS : macOS Unknown

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant