Open JosefBredereck opened 1 month ago
Can confirm. We're getting the same error when requests get aborted.
This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed. Please see the Contributing Guide for how to create a Sample App. Thanks! Ionitron 💙
Aborted requests also cause hard crashes on iOS, have had to fully disable the HTTP plugin.
If you want to reproduce, create a very simple project with CapacitorHTTP wrapping true in the config + Axios + AxiosAbortSignals
If you make a request and then cancel it using a signal you get a crash with the error message referring to the fact the request is already cancelled.
I've noticed a ton of instability with the CapHTTP plugin in the last couple of releases so it may be an area that needs a bit of love and maybe bolstered testing.
I created a simple reproduction repository: https://github.com/JosefBredereck/capacitor-issue-7404
Just run npm run build:cap
and click the red button.
This issue has been labeled as type: bug
. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.
Hello! we have the same problem, this prevents us from using the http plugin completely.
We are also running into this same problem.
Hello , We have the same problem. Does deactivating the http plugin temporarily solve your problem?
Hello @JosefBredereck I managed to avoid the hard crash of the APP and get an error more detailed by doing this :
I created the following file in @capacitor/ios/Capacitor/Capacitor
folder, This file is used to handle the error correctly
//
// ExceptionCatcher.h
//
#import <Foundation/Foundation.h>
NS_INLINE NSException * _Nullable tryBlock(void(^_Nonnull tryBlock)(void)) {
@try {
tryBlock();
}
@catch (NSException *exception) {
return exception;
}
return nil;
}
In the same folder, I've modified the Capacitor.h
file and added an import to the new file I've just created, to make it available in the swift code.
Just add #import <Capacitor/ExceptionCatcher.h>
to the end of the file.
I then modified these 3 calls by putting them in a tryBlock() https://github.com/ionic-team/capacitor/blob/3c411fd0a400b18c2d032e3b8be3fc4b5449bcbd/ios/Capacitor/Capacitor/WebViewAssetHandler.swift#L184 https://github.com/ionic-team/capacitor/blob/3c411fd0a400b18c2d032e3b8be3fc4b5449bcbd/ios/Capacitor/Capacitor/WebViewAssetHandler.swift#L189 https://github.com/ionic-team/capacitor/blob/3c411fd0a400b18c2d032e3b8be3fc4b5449bcbd/ios/Capacitor/Capacitor/WebViewAssetHandler.swift#L193
Like this :
let exception = tryBlock {
urlSchemeTask.didReceive(data)
}
In my case it gives me this error:
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2024-05-04 21:37:26.046048+0200 App[40914:671298] [ProcessSuspension] 0x10f020480 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=40922, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2024-05-04 21:37:26.070055+0200 App[40914:671298] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2024-05-04 21:37:26.070132+0200 App[40914:671298] [ProcessSuspension] 0x10f0207e0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=40921, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
2024-05-04 21:37:26.071127+0200 App[40914:671298] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2024-05-04 21:37:26.071177+0200 App[40914:671298] [ProcessSuspension] 0x10f020ba0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=40921, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2024-05-04 21:37:56.026363+0200 App[40914:670854] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2024-05-04 21:37:56.050115+0200 App[40914:670854] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
I hope I've made myself clear. This avoids the hard crash but in my case I'm looking for a better way to correct it.
I would like to prevent the modification of remote files in my project. I appreciate the idea but it's not sufficient for our project.
I'd also like to avoid doing it, but I was able to get more details from my error. In my case, it happens when I close my inappbrowser window from @awesome-cordova-plugins/in-app-browser
.
same error, any update about this? ty
I think this is related to app crashes I am receiving in iOS as well, Weirdly, not getting the crashes when built from XCode, just via TestFlight via AppFlow.
Incident Identifier: FDC72955-6E40-44E6-83DC-AB0685A8960D
Distributor ID: com.apple.TestFlight
Hardware Model: iPad12,1
Process: Fieldpak-Net [756]
Path: /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Fieldpak-Net
Identifier: net.fieldpak.client
Version: 1.0.8991444836 (1552)
AppStoreTools: 15F31c
AppVariant: 1:iPad12,1:17.4
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: net.fieldpak.client [760]
Date/Time: 2024-05-07 16:38:27.4172 -0400
Launch Time: 2024-05-07 16:38:16.2717 -0400
OS Version: iPhone OS 17.4.1 (21E236)
Release Type: User
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: Fieldpak-Net [756]
Triggered by Thread: 1
Last Exception Backtrace:
0 CoreFoundation 0x190066b28 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x187f3af78 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x1900ec2a4 +[NSException raise:format:] + 112 (NSException.m:0)
3 Capacitor 0x1048e7074 closure #1 in WebViewAssetHandler.handleCapacitorHttpRequest(_:_:_:) + 1592 (WebViewAssetHandler.swift:184)
4 Capacitor 0x1048d459c thunk for @escaping @callee_guaranteed @Sendable (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> () + 148 (<compiler-generated>:0)
5 CFNetwork 0x1910c1248 __40-[__NSURLSessionLocal taskForClassInfo:]_block_invoke + 484 (LocalSession.mm:750)
6 CFNetwork 0x1910df210 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke_2 + 160 (LocalSessionTask.mm:755)
7 libdispatch.dylib 0x197e7513c _dispatch_call_block_and_release + 32 (init.c:1530)
8 libdispatch.dylib 0x197e76dd4 _dispatch_client_callout + 20 (object.m:576)
9 libdispatch.dylib 0x197e7e400 _dispatch_lane_serial_drain + 748 (queue.c:3900)
10 libdispatch.dylib 0x197e7ef64 _dispatch_lane_invoke + 432 (queue.c:3991)
11 libdispatch.dylib 0x197e89cb4 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6998)
12 libdispatch.dylib 0x197e89528 _dispatch_workloop_worker_thread + 404 (queue.c:6592)
13 libsystem_pthread.dylib 0x1ebeb0f20 _pthread_wqthread + 288 (pthread.c:2665)
14 libsystem_pthread.dylib 0x1ebeb0fc0 start_wqthread + 8 (:-1)
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001d846daf8 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001d846d890 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001d846d7a8 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001d846d5e8 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x000000018ffb001c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x000000018ffadf04 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x000000018ffad968 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 GraphicsServices 0x00000001d42a34e0 GSEventRunModal + 164 (GSEvent.c:2196)
8 UIKitCore 0x0000000192420edc -[UIApplication _run] + 888 (UIApplication.m:3692)
9 UIKitCore 0x0000000192420518 UIApplicationMain + 340 (UIApplication.m:5282)
10 Fieldpak-Net 0x00000001048303d4 main + 64 (AppDelegate.swift:5)
11 dyld 0x00000001b34ced84 start + 2240 (dyldMain.cpp:1298)
Thread 1 name:
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x00000001d8476974 __pthread_kill + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb50ec pthread_kill + 268 (pthread.c:1717)
2 libsystem_c.dylib 0x0000000197f2fb80 abort + 180 (abort.c:118)
3 libc++abi.dylib 0x00000001ebdd4ccc abort_message + 132 (abort_message.cpp:78)
4 libc++abi.dylib 0x00000001ebdc4e84 demangling_terminate_handler() + 348 (cxa_default_handlers.cpp:77)
5 libobjc.A.dylib 0x0000000187f3e0bc _objc_terminate() + 144 (objc-exception.mm:496)
6 libc++abi.dylib 0x00000001ebdd4090 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x00000001ebdd4034 std::terminate() + 108 (cxa_handlers.cpp:88)
8 libdispatch.dylib 0x0000000197e76de8 _dispatch_client_callout + 40 (object.m:579)
9 libdispatch.dylib 0x0000000197e7e400 _dispatch_lane_serial_drain + 748 (queue.c:3900)
10 libdispatch.dylib 0x0000000197e7ef64 _dispatch_lane_invoke + 432 (queue.c:3991)
11 libdispatch.dylib 0x0000000197e89cb4 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6998)
12 libdispatch.dylib 0x0000000197e89528 _dispatch_workloop_worker_thread + 404 (queue.c:6592)
13 libsystem_pthread.dylib 0x00000001ebeb0f20 _pthread_wqthread + 288 (pthread.c:2665)
14 libsystem_pthread.dylib 0x00000001ebeb0fc0 start_wqthread + 8 (:-1)
Thread 2:
0 libsystem_pthread.dylib 0x00000001ebeb0fb8 start_wqthread + 0 (:-1)
Thread 3:
0 libsystem_pthread.dylib 0x00000001ebeb0fb8 start_wqthread + 0 (:-1)
Thread 4:
0 libsystem_pthread.dylib 0x00000001ebeb0fb8 start_wqthread + 0 (:-1)
Thread 5:
0 libsystem_pthread.dylib 0x00000001ebeb0fb8 start_wqthread + 0 (:-1)
Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x00000001d846daf8 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001d846d890 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001d846d7a8 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001d846d5e8 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x000000018ffb001c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x000000018ffadf04 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x000000018ffad968 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 Foundation 0x000000018ee3c4a8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8 Foundation 0x000000018ee664e8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9 UIKitCore 0x0000000192383ac8 -[UIEventFetcher threadMain] + 420 (UIEventFetcher.m:1201)
10 Foundation 0x000000018eeada9c __NSThread__start__ + 732 (NSThread.m:991)
11 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
12 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 7 name:
Thread 7:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a757acec scavenger_thread_main + 1316 (pas_scavenger.c:359)
3 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
4 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 8:
0 libsystem_pthread.dylib 0x00000001ebeb0fb8 start_wqthread + 0 (:-1)
Thread 9 name:
Thread 9:
0 libsystem_kernel.dylib 0x00000001d846daf8 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001d846d890 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001d846d7a8 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001d846d5e8 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x000000018ffb001c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x000000018ffadf04 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x000000018ffad968 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 CFNetwork 0x000000019130cc48 +[__CFN_CoreSchedulingSetRunnable _run:] + 384 (CoreSchedulingSet.mm:1479)
8 Foundation 0x000000018eeada9c __NSThread__start__ + 732 (NSThread.m:991)
9 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
10 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 10 name:
Thread 10:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a6061648 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 240 (ThreadingPOSIX.cpp:680)
3 JavaScriptCore 0x00000001a6035d78 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2072 (ParkingLot.cpp:595)
4 JavaScriptCore 0x00000001a5fee3c4 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 460 (Function.h:53)
5 JavaScriptCore 0x00000001a605e894 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Threading.cpp:258)
6 JavaScriptCore 0x00000001a6060d34 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:243)
7 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
8 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 11 name:
Thread 11:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a6061648 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 240 (ThreadingPOSIX.cpp:680)
3 JavaScriptCore 0x00000001a6035d78 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2072 (ParkingLot.cpp:595)
4 JavaScriptCore 0x00000001a5fee3c4 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 460 (Function.h:53)
5 JavaScriptCore 0x00000001a605e894 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Threading.cpp:258)
6 JavaScriptCore 0x00000001a6060d34 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:243)
7 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
8 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 12 name:
Thread 12:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a6061648 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 240 (ThreadingPOSIX.cpp:680)
3 JavaScriptCore 0x00000001a6035d78 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2072 (ParkingLot.cpp:595)
4 JavaScriptCore 0x00000001a5fee3c4 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 460 (Function.h:53)
5 JavaScriptCore 0x00000001a605e894 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Threading.cpp:258)
6 JavaScriptCore 0x00000001a6060d34 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:243)
7 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
8 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 13 name:
Thread 13:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a6061648 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 240 (ThreadingPOSIX.cpp:680)
3 JavaScriptCore 0x00000001a6035d78 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2072 (ParkingLot.cpp:595)
4 JavaScriptCore 0x00000001a5fee3c4 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 460 (Function.h:53)
5 JavaScriptCore 0x00000001a605e894 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Threading.cpp:258)
6 JavaScriptCore 0x00000001a6060d34 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:243)
7 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
8 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 14 name:
Thread 14:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a6061648 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 240 (ThreadingPOSIX.cpp:680)
3 JavaScriptCore 0x00000001a6035d78 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2072 (ParkingLot.cpp:595)
4 JavaScriptCore 0x00000001a5fee3c4 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 460 (Function.h:53)
5 JavaScriptCore 0x00000001a605e894 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Threading.cpp:258)
6 JavaScriptCore 0x00000001a6060d34 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:243)
7 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
8 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 15 name:
Thread 15:
0 libsystem_kernel.dylib 0x00000001d846e49c __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001ebeb0590 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 JavaScriptCore 0x00000001a6061648 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 240 (ThreadingPOSIX.cpp:680)
3 JavaScriptCore 0x00000001a6035d78 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2072 (ParkingLot.cpp:595)
4 JavaScriptCore 0x00000001a5fee3c4 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 460 (Function.h:53)
5 JavaScriptCore 0x00000001a605e894 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Threading.cpp:258)
6 JavaScriptCore 0x00000001a6060d34 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:243)
7 libsystem_pthread.dylib 0x00000001ebeb1a90 _pthread_start + 136 (pthread.c:927)
8 libsystem_pthread.dylib 0x00000001ebeb0fcc thread_start + 8 (:-1)
Thread 1 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x00000001ebdd92c3 x5: 0x000000016b65e810 x6: 0x000000000000006e x7: 0x0000000000000000
x8: 0x5410b730cf934174 x9: 0x5410b731a4f6b174 x10: 0x0000000000000200 x11: 0x000000016b65e340
x12: 0x0000000000000000 x13: 0x00000000001ff800 x14: 0x0000000000000010 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x000000016b65f000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000e07 x21: 0x000000016b65f0e0 x22: 0x0000000000000114 x23: 0x000000016b65f0e0
x24: 0x00000003005705e8 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000303e7eac0
x28: 0x0000000000000000 fp: 0x000000016b65e780 lr: 0x00000001ebeb50ec
sp: 0x000000016b65e760 pc: 0x00000001d8476974 cpsr: 0x40000000
esr: 0x56000080 Address size fault
Binary Images:
0x104828000 - 0x104833fff Fieldpak-Net arm64 <bf960e9139ec302a9739507afca51666> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Fieldpak-Net
0x1048a0000 - 0x10490bfff Capacitor arm64 <4d542d040ecc3847a78a0f81bfe334c6> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/Capacitor.framework/Capacitor
0x1049b0000 - 0x1049bbfff CapacitorApp arm64 <04384fa8378c3a4bb226f973837c3fe8> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorApp.framework/CapacitorApp
0x1049d4000 - 0x1049effff CapacitorCamera arm64 <0338bf211acd381784316644da9cfca2> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorCamera.framework/CapacitorCamera
0x104a20000 - 0x104a2bfff CapacitorClipboard arm64 <4c5b65f9c54d3cbd823d34e54195398c> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorClipboard.framework/CapacitorClipboard
0x104a44000 - 0x104a5bfff CapacitorFilesystem arm64 <0f362f23778f36d8a557602708d5c098> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorFilesystem.framework/CapacitorFilesystem
0x104a80000 - 0x104a8ffff CapacitorGeolocation arm64 <734f2b60479d3a579e2568b3b55a92a1> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorGeolocation.framework/CapacitorGeolocation
0x104aac000 - 0x104ab7fff CapacitorHaptics arm64 <4d5b9017611038dda4710d4051b5e120> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorHaptics.framework/CapacitorHaptics
0x104ad0000 - 0x104adbfff CapacitorKeyboard arm64 <d9109a249ea03e468e21825a3bdbe347> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorKeyboard.framework/CapacitorKeyboard
0x104af0000 - 0x104afffff CapacitorNetwork arm64 <8a7ccf63c22a3004b2bd8fc460c66485> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorNetwork.framework/CapacitorNetwork
0x104b24000 - 0x104b2ffff CapacitorScreenOrientation arm64 <8b8bf658a1d33f178a371e5c24d37e83> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorScreenOrientation.framework/CapacitorScreenOrientation
0x104b4c000 - 0x104b57fff CapacitorShare arm64 <3079d3c505443405967c697737be212a> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorShare.framework/CapacitorShare
0x104b6c000 - 0x104b7bfff CapacitorSplashScreen arm64 <ac52790c76f53367b6cbad3268a1facc> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorSplashScreen.framework/CapacitorSplashScreen
0x104b9c000 - 0x104ba7fff CapacitorStatusBar arm64 <6e2e1bce74f2369ab0b53d5026305682> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapacitorStatusBar.framework/CapacitorStatusBar
0x104bc0000 - 0x104bcbfff Cordova arm64 <9e2a826d6a683addba2e6bd850678221> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/Cordova.framework/Cordova
0x10507c000 - 0x105093fff CapawesomeTeamCapacitorNfc arm64 <611b48d0d30138e28c6c22f4e3b44c61> /private/var/containers/Bundle/Application/58BE5E59-6973-4889-9BCD-E9700795109D/Fieldpak-Net.app/Frameworks/CapawesomeTeamCapacitorNfc.framework/CapawesomeTeamCapacitorNfc
0x10521c000 - 0x105227fff libobjc-trampolines.dylib arm64e <19bc6b58cbf535a583a5fc742451547d> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
0x187f10000 - 0x187f5dcc3 libobjc.A.dylib arm64e <412fd1f44107344388efb3760778f6a7> /usr/lib/libobjc.A.dylib
0x18ee11000 - 0x18f99cfff Foundation arm64e <d92e19c162993e948614c505d5abccdb> /System/Library/Frameworks/Foundation.framework/Foundation
0x18ff7a000 - 0x1904a7fff CoreFoundation arm64e <3a5f992ad1cd312ebd2ef7c66343a417> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1910b2000 - 0x19148efff CFNetwork arm64e <a0da81af67733a72a9a5264f31047a16> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x1921f6000 - 0x193d06fff UIKitCore arm64e <7bf01cfc23f1326aafd8ad967ffece28> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x197e73000 - 0x197eb9fff libdispatch.dylib arm64e <b7d9d0a6241437f29d031a25a474e2cf> /usr/lib/system/libdispatch.dylib
0x197eba000 - 0x197f37fff libsystem_c.dylib arm64e <3b5201c515d0335fa91d0c63e1f6c6dc> /usr/lib/system/libsystem_c.dylib
0x1a5fe4000 - 0x1a774ff1f JavaScriptCore arm64e <05ea21999e0238dea861db68c3407b98> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
0x1b34c9000 - 0x1b3555be3 dyld arm64e <7be2b7573b3d3e918cb774f3887660c7> /usr/lib/dyld
0x1d42a0000 - 0x1d42a8fff GraphicsServices arm64e <4cb7e98636bf38018f495d8c3c4a2127> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1d846c000 - 0x1d84a5fef libsystem_kernel.dylib arm64e <db493af363b132209dd8dd4f86bddfc8> /usr/lib/system/libsystem_kernel.dylib
0x1ebdc0000 - 0x1ebddbffb libc++abi.dylib arm64e <e14c495696043a9f9ec7f15a261f9b43> /usr/lib/libc++abi.dylib
0x1ebeaf000 - 0x1ebebbfff libsystem_pthread.dylib arm64e <a70c0def058c3cb09ec1453aa7f39df9> /usr/lib/system/libsystem_pthread.dylib
EOF
Capacitor Version
💊 Capacitor Doctor 💊
Other API Details
Platforms Affected
Current Behavior
We observed an issue on iOS. At random, the app crashes in an Angular application when requests are fired and aborted. The question remains what exactly causes the issue, we could not create a successful reproduction. Sometimes it happens when a request gets unsubscribed (aborted) and sometimes when the request resolves with an error.
The actual position where the crash happens is https://github.com/ionic-team/capacitor/blob/3c411fd0a400b18c2d032e3b8be3fc4b5449bcbd/ios/Capacitor/Capacitor/WebViewAssetHandler.swift#L184
Based on https://stackoverflow.com/a/73581176 a possible solution could be to not abort the request like you would in the web environment.
Maybe the solution Flutter has implemented could give a possible direction: https://github.com/arnaudelub/flutter_polywebview/blob/76def884f29ac13065a538a10789b761c168c5ff/ios/Classes/CustomeSchemeHandler.swift
Expected Behavior
The app does not do a hard crash.
Project Reproduction
Repo: capacitor-issue-7404
Additional Information
No response