NativeScript: IOS app crashing after upgrading to 8.5.1

Issue Description

HI, IOS app is crashing when install from Test flight but working fine with cli and working fine after opening platform/ios folder in Xcode. We are following this link to distribute the ios app. Below is the crash report

Incident Identifier: 751F69FA-2620-4277-B66D-F94F6308A589
Hardware Model:      iPhone11,8
Process:             ABCMobileApp [1581]
Path:                /private/var/containers/Bundle/Application/F6D7CA1F-B27A-4B75-8499-E9405F464DBF/ABCMobileApp.app/ABCMobileApp
Identifier:          org.company.app
Version:             1.1.14 (3)
AppStoreTools:       14E221
AppVariant:          1:iPhone11,8:16
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           org.company.app [534]

Date/Time:           2023-05-01 14:58:55.3591 +0530
Launch Time:         2023-05-01 14:58:54.8963 +0530
OS Version:          iPhone OS 16.3.1 (20D67)
Release Type:        User
Baseband Version:    5.01.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                	0x1c5f28e38 __exceptionPreprocess + 164 (NSException.m:202)
1   libobjc.A.dylib               	0x1bf0bf8d8 objc_exception_throw + 60 (objc-exception.mm:356)
2   NativeScript                  	0x102e95eec invocation function for block in tns::NativeScriptException::OnUncaughtError(v8::Local<v8::Message>, v8::Local<v8::Value>) + 140 (NativeScriptException.mm:70)
3   libdispatch.dylib             	0x1cd53f460 _dispatch_call_block_and_release + 32 (init.c:1518)
4   libdispatch.dylib             	0x1cd540f88 _dispatch_client_callout + 20 (object.m:560)
5   libdispatch.dylib             	0x1cd54f7f4 _dispatch_main_queue_drain + 928 (inline_internal.h:2632)
6   libdispatch.dylib             	0x1cd54f444 _dispatch_main_queue_callback_4CF + 44 (queue.c:7917)
7   CoreFoundation                	0x1c5fb96c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
8   CoreFoundation                	0x1c5f9b02c __CFRunLoopRun + 2036 (CFRunLoop.c:3147)
9   CoreFoundation                	0x1c5f9feb0 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
10  NativeScript                  	0x102e91880 -[NativeScript runMainApplication] + 44 (NativeScript.mm:70)
11  ABCMobileApp                	0x1020a5920 main + 224 (main.m:60)
12  dyld                          	0x1e4898960 start + 2528 (dyldMain.cpp:1170)

Kernel Triage:
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x0000000203a43674 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000002141a71ac pthread_kill + 268 (pthread.c:1670)
2   libsystem_c.dylib             	0x00000001cd5a4c8c abort + 180 (abort.c:118)
3   libc++abi.dylib               	0x00000002140e6b8c abort_message + 132 (abort_message.cpp:78)
4   libc++abi.dylib               	0x00000002140d6a80 demangling_terminate_handler() + 336 (cxa_default_handlers.cpp:71)
5   libobjc.A.dylib               	0x00000001bf0c5d3c _objc_terminate() + 144 (objc-exception.mm:498)
6   libc++abi.dylib               	0x00000002140e5f28 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7   libc++abi.dylib               	0x00000002140e5ec4 std::terminate() + 56 (cxa_handlers.cpp:88)
8   libdispatch.dylib             	0x00000001cd540f9c _dispatch_client_callout + 40 (object.m:563)
9   libdispatch.dylib             	0x00000001cd54f7f4 _dispatch_main_queue_drain + 928 (inline_internal.h:2632)
10  libdispatch.dylib             	0x00000001cd54f444 _dispatch_main_queue_callback_4CF + 44 (queue.c:7917)
11  CoreFoundation                	0x00000001c5fb96c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
12  CoreFoundation                	0x00000001c5f9b02c __CFRunLoopRun + 2036 (CFRunLoop.c:3147)
13  CoreFoundation                	0x00000001c5f9feb0 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
14  NativeScript                  	0x0000000102e91880 -[NativeScript runMainApplication] + 44 (NativeScript.mm:70)
15  ABCMobileApp                	0x00000001020a5920 main + 224 (main.m:60)
16  dyld                          	0x00000001e4898960 start + 2528 (dyldMain.cpp:1170)

Thread 1:
0   libsystem_pthread.dylib       	0x00000002141a0b90 start_wqthread + 0 (:-1)

Thread 2:
0   libsystem_pthread.dylib       	0x00000002141a0b90 start_wqthread + 0 (:-1)

Thread 3:
0   libsystem_pthread.dylib       	0x00000002141a0b90 start_wqthread + 0 (:-1)

Thread 4 name:
Thread 4:
0   libsystem_kernel.dylib        	0x0000000203a3d67c __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000002141a806c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   NativeScript                  	0x0000000102ec5368 v8::platform::DelayedTaskQueue::GetNext() + 592 (:-1)
3   NativeScript                  	0x0000000102ec4c98 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44 (:-1)
4   NativeScript                  	0x0000000102eb9c6c v8::base::ThreadEntry(void*) + 100 (:-1)
5   libsystem_pthread.dylib       	0x00000002141a16cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib       	0x00000002141a0ba4 thread_start + 8 (:-1)

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib        	0x0000000203a3d67c __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000002141a806c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   NativeScript                  	0x0000000102ec5368 v8::platform::DelayedTaskQueue::GetNext() + 592 (:-1)
3   NativeScript                  	0x0000000102ec4c98 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44 (:-1)
4   NativeScript                  	0x0000000102eb9c6c v8::base::ThreadEntry(void*) + 100 (:-1)
5   libsystem_pthread.dylib       	0x00000002141a16cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib       	0x00000002141a0ba4 thread_start + 8 (:-1)

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib        	0x0000000203a3d67c __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000002141a806c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   NativeScript                  	0x0000000102ec5368 v8::platform::DelayedTaskQueue::GetNext() + 592 (:-1)
3   NativeScript                  	0x0000000102ec4c98 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44 (:-1)
4   NativeScript                  	0x0000000102eb9c6c v8::base::ThreadEntry(void*) + 100 (:-1)
5   libsystem_pthread.dylib       	0x00000002141a16cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib       	0x00000002141a0ba4 thread_start + 8 (:-1)

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib        	0x0000000203a3d67c __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000002141a806c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   NativeScript                  	0x0000000102ec5368 v8::platform::DelayedTaskQueue::GetNext() + 592 (:-1)
3   NativeScript                  	0x0000000102ec4c98 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44 (:-1)
4   NativeScript                  	0x0000000102eb9c6c v8::base::ThreadEntry(void*) + 100 (:-1)
5   libsystem_pthread.dylib       	0x00000002141a16cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib       	0x00000002141a0ba4 thread_start + 8 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib        	0x0000000203a3d67c __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000002141a806c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   NativeScript                  	0x0000000102ec5368 v8::platform::DelayedTaskQueue::GetNext() + 592 (:-1)
3   NativeScript                  	0x0000000102ec4c98 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44 (:-1)
4   NativeScript                  	0x0000000102eb9c6c v8::base::ThreadEntry(void*) + 100 (:-1)
5   libsystem_pthread.dylib       	0x00000002141a16cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib       	0x00000002141a0ba4 thread_start + 8 (:-1)

Thread 9:
0   libsystem_pthread.dylib       	0x00000002141a0b90 start_wqthread + 0 (:-1)


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000002140ea0f5   x5: 0x000000016dd5e3a0   x6: 0x000000000000006e   x7: 0xffffffff00000400
    x8: 0x2312d106dfe78277   x9: 0x2312d104c3ccc7f7  x10: 0x0000000000000200  x11: 0x000000000000000b
   x12: 0x000000000000000b  x13: 0x00000000001ff800  x14: 0x00000000000007fb  x15: 0x000000008463d006
   x16: 0x0000000000000148  x17: 0x000000021c2b4580  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x000000021c2b4660  x22: 0x00000002823ee080  x23: 0x0000000000000114
   x24: 0x0000000000000000  x25: 0x000000021c2b4660  x26: 0x00000002823ee080  x27: 0x000000000000000f
   x28: 0x0000000000000000   fp: 0x000000016dd5e310   lr: 0x00000002141a71ac
    sp: 0x000000016dd5e2f0   pc: 0x0000000203a43674 cpsr: 0x40000000
   esr: 0x56000080  Address size fault


Binary Images:
0x1020a0000 - 0x10218bfff ABCMobileApp arm64  <c2baedea6dc236b4be93e607aa51b0fd> /private/var/containers/Bundle/Application/F6D7CA1F-B27A-4B75-8499-E9405F464DBF/ABCMobileApp.app/ABCMobileApp
0x102e24000 - 0x103a73fff NativeScript arm64  <fbe9f724987b323c9bc94a3b3d603665> /private/var/containers/Bundle/Application/F6D7CA1F-B27A-4B75-8499-E9405F464DBF/ABCMobileApp.app/Frameworks/NativeScript.framework/NativeScript
0x1bf0a8000 - 0x1bf0ebe1f libobjc.A.dylib arm64e  <c1140b6565c73a26bd127bc730320ea0> /usr/lib/libobjc.A.dylib
0x1c5f1f000 - 0x1c6304fff CoreFoundation arm64e  <42ccfc7bff323d258f01ccb2ad843a8b> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1cd53d000 - 0x1cd583fff libdispatch.dylib arm64e  <ded4d0a5142032ae83a6c31d938a1c9a> /usr/lib/system/libdispatch.dylib
0x1cd584000 - 0x1cd603ff7 libsystem_c.dylib arm64e  <3cd8c9e025fd3b29850774cdffe7f16c> /usr/lib/system/libsystem_c.dylib
0x1e4883000 - 0x1e4906093 dyld arm64e  <4b042f280d1430eca1de3dbb10866ad7> /usr/lib/dyld
0x203a3c000 - 0x203a73feb libsystem_kernel.dylib arm64e  <c76e6bed463530c68f19fb829bbe1ae1> /usr/lib/system/libsystem_kernel.dylib
0x2140d5000 - 0x2140ecffb libc++abi.dylib arm64e  <b058446c01e73681b92d8f411c12a18a> /usr/lib/libc++abi.dylib
0x2141a0000 - 0x2141abfff libsystem_pthread.dylib arm64e  <45ac734e66493ee2a0963fd66441ab78> /usr/lib/system/libsystem_pthread.dylib

EOF

Thanks

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Oops! my mistake. Distribution certificate was expired. Issue fixed by renewing the apple distribution certificate.

@jitendraP-ashutec ,

This is not working

{ "dependencies": { "@angular/animations": "~15.2.0", "@angular/common": "~15.2.0", "@angular/compiler": "~15.2.0", "@angular/core": "~15.2.0", "@angular/forms": "~15.2.0", "@angular/platform-browser": "~15.2.0", "@angular/platform-browser-dynamic": "~15.2.0", "@angular/router": "~15.2.0", "@nativescript/angular": "^15.2.0", "@nativescript/background-http": "^6.0.0", "@nativescript/core": "~8.5.1", "@nativescript/theme": "~3.0.2", "@ngx-translate/core": "^13.0.0", "rxjs": "~7.6.0", "zone.js": "~0.13.0" }, "devDependencies": { "@angular-devkit/build-angular": "~15.2.0", "@angular/compiler-cli": "~15.2.0", "@nativescript/android": "~8.5.0", "@nativescript/ios": "~8.5.1", "@nativescript/types": "~8.5.0", "@nativescript/webpack": "~5.0.14", "@ngtools/webpack": "~15.2.0", "typescript": "~4.8.4" } }

This is working

{ "dependencies": { "@angular/animations": "~14.2.0", "@angular/common": "~14.2.0", "@angular/compiler": "~14.2.0", "@angular/core": "~14.2.0", "@angular/forms": "~14.2.0", "@angular/platform-browser": "~14.2.0", "@angular/platform-browser-dynamic": "~14.2.0", "@angular/router": "~14.2.0", "@nativescript/angular": "~14.2.0", "@nativescript/core": "~8.4.7", "@nativescript/theme": "~3.0.2", "rxjs": "~7.5.0", "zone.js": "~0.11.5" }, "devDependencies": { "@angular-devkit/build-angular": "~14.2.0", "@angular/compiler-cli": "~14.2.0", "@nativescript/android": "~8.4.0", "@nativescript/ios": "8.4.0", "@nativescript/types": "~8.4.0", "@nativescript/webpack": "~5.0.6", "@ngtools/webpack": "~14.2.0", "typescript": "~4.7.0" } }

Thank you very much. This fixed our problems with build. We were using XCode 14.3 and getting following errors

ERROR TypeError: Cannot read property 'getVisibleViewController' of undefined

They were pretty much impossible to debug and we spent like a week trying to fix it. If you’re getting this error, try to downgrade your angular and nativescript version to 14 and it should work.

@jitendraP-ashutec ,

This is not working

{ "dependencies": { "@angular/animations": "~15.2.0", "@angular/common": "~15.2.0", "@angular/compiler": "~15.2.0", "@angular/core": "~15.2.0", "@angular/forms": "~15.2.0", "@angular/platform-browser": "~15.2.0", "@angular/platform-browser-dynamic": "~15.2.0", "@angular/router": "~15.2.0", "@nativescript/angular": "^15.2.0", "@nativescript/background-http": "^6.0.0", "@nativescript/core": "~8.5.1", "@nativescript/theme": "~3.0.2", "@ngx-translate/core": "^13.0.0", "rxjs": "~7.6.0", "zone.js": "~0.13.0" }, "devDependencies": { "@angular-devkit/build-angular": "~15.2.0", "@angular/compiler-cli": "~15.2.0", "@nativescript/android": "~8.5.0", "@nativescript/ios": "~8.5.1", "@nativescript/types": "~8.5.0", "@nativescript/webpack": "~5.0.14", "@ngtools/webpack": "~15.2.0", "typescript": "~4.8.4" } }

This is working

{ "dependencies": { "@angular/animations": "~14.2.0", "@angular/common": "~14.2.0", "@angular/compiler": "~14.2.0", "@angular/core": "~14.2.0", "@angular/forms": "~14.2.0", "@angular/platform-browser": "~14.2.0", "@angular/platform-browser-dynamic": "~14.2.0", "@angular/router": "~14.2.0", "@nativescript/angular": "~14.2.0", "@nativescript/core": "~8.4.7", "@nativescript/theme": "~3.0.2", "rxjs": "~7.5.0", "zone.js": "~0.11.5" }, "devDependencies": { "@angular-devkit/build-angular": "~14.2.0", "@angular/compiler-cli": "~14.2.0", "@nativescript/android": "~8.4.0", "@nativescript/ios": "8.4.0", "@nativescript/types": "~8.4.0", "@nativescript/webpack": "~5.0.6", "@ngtools/webpack": "~14.2.0", "typescript": "~4.7.0" } }

This line in the stack indicates the exception is likely from the js side somewhere

NativeScriptException::OnUncaughtError(

You could try discarding uncaught exceptions (https://beta.docs.nativescript.org/project-structure/nativescript-config#ios-discarduncaughtjsexceptions)

And/or listen for the uncaughtErrorEvent

import { Application } from "@nativescript/core";

Application.on(Application.uncaughtErrorEvent, function (args) {
    if (args.ios) {
        // For iOS applications, args.ios is NativeScriptError.
        console.log("NativeScriptError", args.ios);
    }
    if (args.android) {
        console.log("NativeScriptError", args.android);
        console.log("NativeScriptError stackTrace", args.android.stackTrace);
        console.log("NativeScriptError nativeException", args.android.nativeException);
    }
});