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

Random Crashes with ns7 core modules #61

Open
rigor789 opened this issue Sep 24, 2020 · 25 comments
Open

Random Crashes with ns7 core modules #61

rigor789 opened this issue Sep 24, 2020 · 25 comments

Comments

@rigor789
Copy link
Member

We're also experiencing pretty random but often crash from time to time on iOS devices with latest NS 7 core modules and the project built with Xcode 12:

====== Assertion failed ======
Native stack trace:
1          0x1019f4f3c tns::Assert(bool, v8::Isolate*) + 128
2          0x10196178c tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 100
3          0x1019ba984 tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) + 88
4          0x1019ba210 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 220
5          0x101b23e10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 536
6          0x101b233dc v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 516
7          0x101b22b7c v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 224
8          0x1022b4d8c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
9          0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
10         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
11         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
12         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
13         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
14         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
15         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
16         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
17         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
18         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
19         0x102246504 Builtins_ArgumentsAdaptorTrampoline + 228
20         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
21         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
22         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
23         0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
24         0x10224af64 Builtins_JSEntryTrampoline + 164
25         0x10224ac08 Builtins_JSEntry + 168
26         0x122ac4000 26  ???                                 0x0000000122ac4000 0x0 + 4876681216
JavaScript stack trace:
at _removeViewFromNativeVisualTree (file: app/packages/core/ui/core/view/index.ios.ts:787:29)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:871:15)
at <anonymous> (file: app/packages/core/ui/core/view-base/index.ts:865:9)
at eachChildView (file: app/packages/core/ui/layouts/layout-base-common.ts:125:18)
at eachChild (file: app/packages/core/ui/core/view/view-common.ts:867:7)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:864:7)
at <anonymous> (file: app/packages/core/ui/core/view-base/index.ts:865:9)
at eachChildView (file: app/packages/core/ui/layouts/layout-base-common.ts:125:18)
at eachChild (file: app/packages/core/ui/core/view/view-common.ts:867:7)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:864:7)

Originally posted by @romandragan in NativeScript/NativeScript#8867 (comment)

@rigor789
Copy link
Member Author

The invocation that fails:
https://github.com/NativeScript/NativeScript/blob/021c0bb9a24f15a9adf9d5e25a981ea53901e600/packages/core/ui/core/view/index.ios.ts#L787

The assertion is made in this code, either the one on L29 or L45 - we'd have to reproduce the case, while we have a debugger attached:
https://github.com/NativeScript/ns-v8ios-runtime/blob/254ac419d0878f043c69bba718a1e5268115d5c4/NativeScript/runtime/ArgConverter.mm#L22-L47

@romandragan are there specific steps to reproduce - more importantly what views are involved? This seems to be a back-nav triggered crash when tearing down the UI.

@romandrahan
Copy link

romandrahan commented Sep 24, 2020

@rigor789, after some investigation it seems like it happens when navigating back from the view which has RadListView with horizontal orientation.

I'm not saying it's due to horizontal orientation itself, but just saying to give more information.

It's not all the time but pretty often and consistent behavior.

@romandrahan
Copy link

romandrahan commented Sep 24, 2020

@rigor789, confirming the issue is not reproduced if the target view has ScrollView instead of the RadListView. As you know it's pretty dirty workaround but at least it works for now... As we don't have any other options to render horizontal scrolling list.

@romandrahan
Copy link

@rigor789, any update on this?

@romandrahan
Copy link

romandrahan commented Oct 15, 2020

Must say the app is now rarely, but still randomly crashes at random places, subjectively more often right after any modal window has been closed. Trace is the same:

2020-10-15 09:07:21.959042+0300 feedmemobileweb[42924:1278101] Native stack trace:
2020-10-15 09:07:21.959960+0300 feedmemobileweb[42924:1278101] 1          0x101a2aceb tns::Assert(bool, v8::Isolate*) + 119
2020-10-15 09:07:21.960153+0300 feedmemobileweb[42924:1278101] 2          0x10199a079 tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 95
2020-10-15 09:07:21.960321+0300 feedmemobileweb[42924:1278101] 3          0x1019f283a tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) + 76
2020-10-15 09:07:21.960460+0300 feedmemobileweb[42924:1278101] 4          0x1019f2111 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 219
2020-10-15 09:07:21.960602+0300 feedmemobileweb[42924:1278101] 5          0x101b6222c v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 620
2020-10-15 09:07:21.960760+0300 feedmemobileweb[42924:1278101] 6          0x101b616dc v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 556
2020-10-15 09:07:21.960896+0300 feedmemobileweb[42924:1278101] 7          0x101b60d63 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 259
2020-10-15 09:07:21.961025+0300 feedmemobileweb[42924:1278101] 8          0x1023f9d19 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
2020-10-15 09:07:21.961109+0300 feedmemobileweb[42924:1278101] JavaScript stack trace:
2020-10-15 09:07:21.979517+0300 feedmemobileweb[42924:1278101] at _removeViewFromNativeVisualTree (file:///app/vendor.js:42369:33)
at _tearDownUI (file:///app/vendor.js:41149:19)
at <anonymous> (file:///app/vendor.js:41143:13)
at eachChildView (file:///app/vendor.js:54302:20)
at eachChild (file:///app/vendor.js:43306:10)
at _tearDownUI (file:///app/vendor.js:41142:10)
at <anonymous> (file:///app/vendor.js:41143:13)
at eachChildView (file:///app/vendor.js:54302:20)
at eachChild (file:///app/vendor.js:43306:10)
at _tearDownUI (file:///app/vendor.js:41142:10)
Assertion failed: (false), function Assert, file /Users/nathan/Documents/github/NativeScript/masters/ns-v8ios-runtime/NativeScript/runtime/Helpers.mm, line 651.
Assertion failed: (false), function Assert, file /Users/nathan/Documents/github/NativeScript/masters/ns-v8ios-runtime/NativeScript/runtime/Helpers.mm, line 651.

cc @rigor789, @NathanaelA

@NathanaelA

This comment was marked as abuse.

@romandrahan
Copy link

romandrahan commented Oct 18, 2020

@NathanaelA, thanks, upgraded to 7.0.3 iOS runtime, will test on real device, cause still can't run the project on simulator due to this CLI issue: NativeScript/nativescript-cli#5411.

@romandrahan
Copy link

romandrahan commented Oct 19, 2020

@rigor789, @NathanaelA, the app is still crashing with:

====== Assertion failed ======
Native stack trace:
1          0x109b1f219 tns::Assert(bool, v8::Isolate*) + 119
2          0x109a80b79 tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 95
3          0x109ae172a tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) + 76
4          0x109ae1043 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 219
5          0x109c6c33c v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 620
6          0x109c6b7ec v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 556
7          0x109c6ae73 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 259
8          0x10a503e19 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
JavaScript stack trace:
at _removeViewFromNativeVisualTree (file: app/packages/core/ui/core/view/index.ios.ts:787:29)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:871:15)
at <anonymous> (file: app/packages/core/ui/core/view-base/index.ts:865:9)
at eachChildView (file: app/packages/core/ui/layouts/layout-base-common.ts:125:18)
at eachChild (file: app/packages/core/ui/core/view/view-common.ts:867:7)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:864:7)
at <anonymous> (file: app/packages/core/ui/core/view-base/index.ts:865:9)
at eachChildView (file: app/packages/core/ui/layouts/layout-base-common.ts:125:18)
at eachChild (file: app/packages/core/ui/core/view/view-common.ts:867:7)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:864:7)

or:

====== Assertion failed ======
Native stack trace:
1          0x106d51219 tns::Assert(bool, v8::Isolate*) + 119
2          0x106cb3b5e tns::ArgConverter::CreateJsWrapper(v8::Local<v8::Context>, tns::BaseDataWrapper*, v8::Local<v8::Object>, bool, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 1702
3          0x106d7a89c tns::Interop::GetResult(v8::Local<v8::Context>, tns::TypeEncoding const*, tns::BaseCall*, bool, std::__1::shared_ptr<v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value> > >, bool, bool, bool) + 4050
4          0x106cb3fbb tns::ArgConverter::MethodCallback(ffi_cif*, void*, void**, void*) + 391
5          0x106e09316 ffi_closure_unix64_inner + 662
6          0x106e0a59a ffi_closure_unix64 + 72
7          0x10fb4e7e7 __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 172
8          0x10fb4e147 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 3480
9          0x10fb5180c -[UITableViewRowData numberOfRows] + 67
10         0x10fb085eb -[UITableView noteNumberOfRowsChanged] + 117
11         0x10fb06ee7 -[UITableView reloadData] + 1415
12         0x106e0a3dd ffi_call_unix64 + 85
13      0x600000f12c10 13  ???                                 0x0000600000f12c10 0x0 + 105553132071952
JavaScript stack trace:
at refresh (file: app/packages/core/ui/list-view/index.ios.ts:345:12)
at [itemTemplates:setNative] (file: app/packages/core/ui/list-view/index.ios.ts:521:7)
at Property.set (file: app/packages/core/ui/core/properties/index.ts:272:23)
at result (file: node_modules/nativescript-vue/dist/index.js:8045:4)
at set$1 (file: node_modules/nativescript-vue/dist/index.js:8019:4)
at setAttribute (file: node_modules/nativescript-vue/dist/index.js:8315:8)
at mounted (file: node_modules/nativescript-vue/dist/index.js:7078:24)
at invokeWithErrorHandling (file: node_modules/nativescript-vue/dist/index.js:1862:56)
at callHook (file: node_modules/nativescript-vue/dist/index.js:5104:6)
at insert (file: node_modules/nativescript-vue/dist/index.js:4026:6)

Generally, while interacting with ListView: scrolling, refreshing, showing/hiding etc. But could be in other places as well.

Tested with:

  • CLI 7.0.9-rc.2
  • iOS runtime 7.0.3
  • Core modules 7.0.11

@tdhman
Copy link

tdhman commented Dec 9, 2020

I also experienced the same issue with nativescript-vue application using NativeScript 7 and "@nativescript/ios": "7.0.6".
The application is crashed immediately when running with Xcode.

Runtime initialization took 59ms
Assertion failed: (false), function Assert, file /Users/nathanael/Source/core/ns-v8ios-runtime/NativeScript/runtime/Helpers.mm, line 683.

Tested with:

CLI 7.0.11
iOS runtime 7.0.6
Core modules 7.0.13
NativeScript-Vue 2.8.3

@NathanaelA

This comment was marked as abuse.

@tdhman
Copy link

tdhman commented Dec 10, 2020

@NathanaelA The assert function is the only error log I got from Xcode console. In fact, I have a native project in Xcode which I use to integrate the native extension for the application so I don't need to rebuild the application with NS command. Then to update NS7 for this native project, I update the NS framework path, internal folder, app folder, etc. I have been doing this way of update since NS5. After updating to NS7 then build & run the application with Xcode, I got these 2 lines of log error immediately when the application starts.
As you suggest, I may try to build the project with NS command to see if there is more error logs. For the plugins that I use, except some private plugins that I develop, the others are compatible with NS7 as I also checked the list from NS blogs.
For the private plugins, I also updated them to support NS7 then tested with demo app in NS7 and they work.
Here is the list of public plugins that I use:

    "@nativescript/appversion": "^2.0.0",
    "@nativescript/core": "~7.0.0",
    "@nativescript/imagepicker": "^1.0.0",
    "@nativescript/iqkeyboardmanager": "^2.0.0",
    "@nativescript/localize": "^5.0.2",
    "@nativescript/theme": "^2.3.3",
    "@nstudio/nativescript-loading-indicator": "^4.0.0",
    "nativescript-orientation": "^2.2.5",
    "nativescript-permissions": "^1.3.11",
    "nativescript-vue": "^2.8.3",

I'll test with project built with NS command to get more report log error if any.

@felixkrautschuk
Copy link

I am not able to share a sample project here, but while testing our real app, I just noticed the same crash as described here, so I just wanna share as much information as I can:

My config:

  • nativescript cli 7.0.11
"dependencies": {
    "@nativescript-community/ui-pager": "^13.0.0-alpha.14",
    "@nativescript/core": "^7.0.13",
    "@nativescript/firebase": "^11.1.3",
    "@nativescript/iqkeyboardmanager": "^2.0.0",
    "@nstudio/nativescript-floatingactionbutton": "^3.0.4",
    "@nstudio/nativescript-loading-indicator": "^4.0.0",
    "@nstudio/nativescript-pulltorefresh": "^3.0.1",
    "@nstudio/nativescript-snackbar": "^2.1.0",
    "nativescript-permissions": "1.3.8",
    "nativescript-toasty": "^3.0.0-alpha.2",
    "nativescript-ui-listview": "^9.0.4",
    "nativescript-ui-sidedrawer": "^9.0.3"
  },
  "devDependencies": {
    "@nativescript/android": "7.0.1",
    "@nativescript/ios": "7.0.6",
    "@nativescript/types": "^7.0.4",
    "@nativescript/webpack": "^3.0.8"
  },

Stack:

====== Assertion failed ======
Native stack trace:
1 0x1075632af tns::Assert(bool, v8::Isolate*) + 119
2 0x1074c4259 tns::ArgConverter::Invoke(v8::Localv8::Context, objc_class*, v8::Localv8::Object, tns::V8Args&, tns::MethodMeta const*, bool) + 95
3 0x107524e5a tns::MetadataBuilder::InvokeMethod(v8::Localv8::Context, tns::MethodMeta const*, v8::Localv8::Object, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, bool) + 76
4 0x1075249ae tns::MetadataBuilder::PropertyGetterCallback(v8::FunctionCallbackInfov8::Value const&) + 246
5 0x107ee1a8d Builtins_CallApiCallback + 173
6 0x107f12749 Builtins_LoadIC_Noninlined + 2313
7 0x107fba6cc Builtins_LdaNamedPropertyHandler + 652
JavaScript stack trace:
at _removeContainer (file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1066:0)
at (file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1051:0)
at clearRealizedCells (file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1050:0)
at clearEmbeddedViews (file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1622:0)
at refresh (file: node_modules/nativescript-ui-listview/ui-listview.common.js:662:0)
at refresh (file: node_modules/nativescript-ui-listview/ui-listview.ios.js:1541:0)
at exports.onListViewLoaded (file: app/pages/storysearch-results/storysearch-results-page.js:43:0)
at _handleEvent (file: node_modules/@nativescript/core/data/observable/index.js:231:0)
at notify (file: node_modules/@nativescript/core/data/observable/index.js:214:0)
at _emit (file: node_modules/@nativescript/core/data/observable/index.js:254:0)

Further info:
During my manual testing I have opened a Simulator with iOS 12.4 and one SImulator with iOS 14.2 and the app was active on both Simulators for about 2 hours.

The crash occured on the Simulator with iOS 12.4 while navigating back to a page that contains a RadListView (nativescript-ui-listview 9.0.4). As other people here have already mentioned, this crash happened randomly. I navigated through many pages in our app forwards and backwards, many of them use a RadListView and it worked fine for a long time, so I guess it is not really related to the RadListView, maybe it will occur in a totally different situation next time.

@apsaros
Copy link

apsaros commented Feb 19, 2021

Hey, I had the same error that also seemed to point on RadListView as the issue.
After fiddling around with RadList / ListView / ScrollView, I realized that the issue for me was concerning modals.

Some trial and error attempts later I figured out that it was target: this when calling $showModal that was causing the issue:

this.$showModal(MyModal, {
  fullscreen: true,
  target: this,
});

I was using this extensively, like a default setting for modals. But after refactoring so that this is used when it actually is a "modal-in-modal", everything is working like a charm without any crashes and "assertion failed" errors.
Maybe not related, but I wanted to point it out just in case :)

@mihernandez6
Copy link

mihernandez6 commented Jul 7, 2021

Hi
Any news on this? My app was working correctly, but it literally started crashing on startup last week. Somtimes I see the splashscreen and sometimes I don't, it just dies. Process I followed is:

  • App built using CLI v7 and Android/iOS runtimes v8, running correctly.
  • Last week, code changes were done (new feature ; Android works correctly, but iOS error was similar to OP both on simulator and on physical device (tested on iPhone 8 and iPhone SE 1 gen).
  • Yesterday downgraded runtime to 7.2 and updated XCode to 12.5.1. Still crashing.
  • Today updated CLI to v8 and got this error (same as yesterday after downgrading runtime).
  • I'm not using modal-in-modal, RadListView nor ListView, only ScrollViews that I need in my screens.
====== Assertion failed ======
Native stack trace:
1          0x10ab9a9ff tns::Assert(bool, v8::Isolate*) + 119
2          0x10abb9aa0 tns::Interop::WriteValue(v8::Local<v8::Context>, tns::TypeEncoding const*, void*, v8::Local<v8::Value>) + 3148
3          0x10abb8e3c tns::Interop::SetFFIParams(v8::Local<v8::Context>, tns::TypeEncoding const*, tns::FFICall*, int, int, tns::V8Args&) + 110
4          0x10abb8aa1 tns::Interop::CallFunctionInternal(tns::MethodCall&) + 421
5          0x10ab708fd tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 243
6          0x10acc80a1 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 609
7          0x10acc758a v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 570
8          0x10acc6bad v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 253
9          0x10b59d7b9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
10         0x10b53c1f9 Builtins_InterpreterEntryTrampoline + 185
JavaScript stack trace:
at run (file: node_modules/@nativescript/core/application/index.ios.js:336:0)
at bootstrapNativeScriptApp (file: node_modules/@nativescript/angular/ivy_ngcc/fesm2015/nativescript-angular.js:737:8)
at bootstrapApp (file: node_modules/@nativescript/angular/ivy_ngcc/fesm2015/nativescript-angular.js:628:0)
at bootstrapModule (file: node_modules/@nativescript/angular/ivy_ngcc/fesm2015/nativescript-angular.js:609:0)
at ./src/main.ts (file: src/src/main.ts:17:27)
at webpack_require (file: src/webpack/bootstrap:19:0)
at webpack_exec (file:///app/bundle.js:1236:39)
at <anonymous> (file:///app/bundle.js:1237:143)
at webpack_require.X (file: src/webpack/runtime/startup entrypoint:6:0)
at <anonymous> (file:///app/bundle.js:1237:47)

Versions:

node -v
v12.18.3
ns --version
8.0.2
✔️ Up to date.
tns doctor
✔️ Getting environment information 

No issues were detected.
✔️ Your ANDROID_HOME environment variable is set and points to correct directory.
✔️ Your adb from the Android SDK is correctly installed.
✔️ The Android SDK is installed.
✔️ A compatible Android SDK for compilation is found.
✔️ Javac is installed and is configured properly.
✔️ The Java Development Kit (JDK) is installed and is configured properly.
✔️ Xcode is installed and is configured properly.
✔️ xcodeproj is installed and is configured properly.
✔️ CocoaPods are installed.
✔️ CocoaPods update is not required.
✔️ CocoaPods are configured properly.
✔️ Your current CocoaPods version is newer than 1.0.0.
✔️ Python installed and configured correctly.
✔️ The Python 'six' package is found.
✔️ Xcode version 12.5.1 satisfies minimum required version 10.
✔️ Getting NativeScript components versions information...
✔️ Component nativescript has 8.0.2 version and is up to date.
✔️ Component @nativescript/core has 8.0.8 version and is up to date.
✔️ Component @nativescript/ios has 8.0.0 version and is up to date.
✔️ Component @nativescript/android has 8.0.0 version and is up to date

My package.json

{
"description": "MyApp",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "scripts": {
    "lint": "tslint \"src/**/*.ts\""
  },
"dependencies": {
    "@angular/animations": "~11.2.7",
    "@angular/common": "~11.2.7",
    "@angular/compiler": "~11.2.7",
    "@angular/core": "~11.2.7",
    "@angular/forms": "~11.2.7",
    "@angular/platform-browser": "~11.2.7",
    "@angular/platform-browser-dynamic": "~11.2.7",
    "@angular/router": "~11.2.7",
    "@nativescript-community/ui-pulltorefresh": "^2.4.7",
    "@nativescript/angular": "~11.8.0",
    "@nativescript/appversion": "~2.0.0",
    "@nativescript/core": "~8.0.0",
    "@nativescript/datetimepicker": "^2.1.4",
    "@nativescript/iqkeyboardmanager": "~2.0.0",
    "@nativescript/theme": "~2.3.0",
    "@nstudio/nativescript-checkbox": "~2.0.0",
    "@nstudio/nativescript-floatingactionbutton": "^3.0.0",
    "@nstudio/nativescript-loading-indicator": "^4.0.0",
    "@plmservices/nativescript-sha": "^2.0.2",
    "moment": "^2.29.1",
    "nativescript-oauth2": "^3.0.5",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.5.0",
    "zone.js": "0.11.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~11.2.7",
    "@nativescript/android": "8.0.0",
    "@nativescript/ios": "8.1.0-alpha.0",
    "@nativescript/schematics": "^10.0.2",
    "@nativescript/types": "~8.0.0",
    "@ngtools/webpack": "~11.2.6",
    "codelyzer": "~4.5.0",
    "node-sass": "^4.7.1",
    "tslint": "~5.19.0",
    "typescript": "~4.0.0",
    "@nativescript/webpack": "~5.0.0-beta.0"
  },
  "readme": "NativeScript Application",
  "main": "./src/main.ts"
}

Any help, even a small comment on this, is really appreciated.

@sikemullivan
Copy link

@mihernandez6 I'm getting the same thing. Crashes when the app calls configureTnsOAuth in nativescript-oauth2. You ever figure the issue out?

@mihernandez6
Copy link

mihernandez6 commented Sep 9, 2021

@mihernandez6 I'm getting the same thing. Crashes when the app calls configureTnsOAuth in nativescript-oauth2. You ever figure the issue out?

Not yet, unfortunately. I was just playing around with the code, the problem seems to be something related to the delegate, but more actual tests are necessary.

Inside the node_modules/@nativescript/core/application/index.ios.js I changed line 335 from this:

UIApplicationMain(0, null, null, iosApp && iosApp.delegate ? NSStringFromClass(iosApp.delegate) : NSStringFromClass(Responder));

to this:

UIApplicationMain(0, null, null, NSStringFromClass(Responder));

This isn't the right way to go, but at least I managed to run the app. I'll try to run it again after uninstall nativescript-oauth2 and see what happens.

Thanks for your answer. Have a good one!

Edit: NS team kindly suggested to change my NS core (iOS) to JSC, but it didn't work for me.

@sikemullivan
Copy link

sikemullivan commented Sep 10, 2021

Interesting... I'll give that a try. Thanks!

Edit: Worked for me. OAuth2 now comes up and the application does not crash.

@sikemullivan
Copy link

Unfortunately, the above is not a fix, just creates more problems down the road. I think the nativescript-oauth2 project is failing to keep things up to date.

@timdoege
Copy link

timdoege commented Nov 1, 2021

I have noticed an increase in Firebase Crashlytics reports on this issue using the 8.1.0 iOS runtime as well:

Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x79c4 __pthread_kill + 8
1  libsystem_pthread.dylib        0x7434 pthread_kill + 268
2  libsystem_c.dylib              0x1ff64 abort + 164
3  libsystem_c.dylib              0x7696c err + 298
4  NativeScript                   0x950518 tns::Assert(bool, v8::Isolate*) (.cold.1) + 38
5  NativeScript                   0x982f8 tns::Assert(bool, v8::Isolate*) + 88
6  NativeScript                   0xb6fe8 tns::Interop::WriteValue(v8::Local<v8::Context>, tns::TypeEncoding const*, void*, v8::Local<v8::Value>) + 5144
7  NativeScript                   0xb5bac tns::Interop::SetFFIParams(v8::Local<v8::Context>, tns::TypeEncoding const*, tns::FFICall*, int, int, tns::V8Args&) + 120
8  NativeScript                   0xb580c tns::Interop::CallFunctionInternal(tns::MethodCall&) + 356
9  NativeScript                   0x1f32c tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 780
10 NativeScript                   0x72bc8 tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) + 88
11 NativeScript                   0x72454 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 220
12 NativeScript                   0x1a7e60 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 544
13 NativeScript                   0x1a7360 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 524
14 NativeScript                   0x1a6af8 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 228
15 NativeScript                   0x8823cc Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
16 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
17 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
18 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
19 NativeScript                   0x818578 construct_stub_create_deopt_addr + 344
20 NativeScript                   0x90b848 Builtins_ConstructHandler + 648
21 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
22 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
23 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
24 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
25 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
26 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
27 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
28 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
29 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
30 NativeScript                   0x81b598 Builtins_InterpreterEntryTrampoline + 248
31 NativeScript                   0x81936c Builtins_JSEntryTrampoline + 172
32 NativeScript                   0x819004 Builtins_JSEntry + 164
33 NativeScript                   0x2f3a70 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 2532
34 NativeScript                   0x2f3058 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 216
35 NativeScript                   0x14650c v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 448
36 NativeScript                   0x20794 tns::ArgConverter::MethodCallback(ffi_cif*, void*, void**, void*) + 1164
37 NativeScript                   0x113974 ffi_closure_SYSV_inner + 800
38 NativeScript                   0x1141b4 .Ldo_closure + 20
39 UIKitCore                      0x1e0528 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 56
40 UIKitCore                      0x1a9174 _UIGestureRecognizerSendTargetActions + 116
41 UIKitCore                      0x172000 _UIGestureRecognizerSendActions + 284
42 UIKitCore                      0x1ab524 -[UIGestureRecognizer _updateGestureForActiveEvents] + 636
43 UIKitCore                      0x1636a0 _UIGestureEnvironmentUpdate + 1988
44 UIKitCore                      0x19765c -[UIGestureEnvironment _updateForEvent:window:] + 784
45 UIKitCore                      0x1a467c -[UIWindow sendEvent:] + 4428
46 UIKitCore                      0x355408 -[UIApplication sendEvent:] + 828
47 UIKitCore                      0x1779d0 __dispatchPreprocessedEventFromEventQueue + 7904
48 UIKitCore                      0x16c60c __processEventQueue + 6760
49 UIKitCore                      0xfadac4 updateCycleEntry + 176
50 UIKitCore                      0x7dead8 _UIUpdateSequenceRun + 84
51 UIKitCore                      0xe56294 schedulerStepScheduledMainSection + 144
52 UIKitCore                      0xe55760 runloopSourceCallback + 60
53 CoreFoundation                 0xbb030 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
54 CoreFoundation                 0xcbcf0 __CFRunLoopDoSource0 + 208
55 CoreFoundation                 0x5ff8 __CFRunLoopDoSources0 + 268
56 CoreFoundation                 0xb804 __CFRunLoopRun + 820
57 CoreFoundation                 0x1f3c8 CFRunLoopRunSpecific + 600
58 GraphicsServices               0x138c GSEventRunModal + 164
59 UIKitCore                      0x51b060 -[UIApplication _run] + 1100
60 UIKitCore                      0x298b8c UIApplicationMain + 2124
61 NativeScript                   0x114044 ffi_call_SYSV + 68
62 NativeScript                   0x1131d8 ffi_call_int + 968
63 NativeScript                   0xb5854 tns::Interop::CallFunctionInternal(tns::MethodCall&) + 428
64 NativeScript                   0x77b9c std::__1::__function::__func<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfo<v8::Value> const&)::$_2, std::__1::allocator<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfo<v8::Value> const&)::$_2>, void ()>::operator()() + 564
65 NativeScript                   0xd8e68 tns::Tasks::Drain() + 104
66 NativeScript                   0xd3088 +[NativeScript start:] + 572
67 s                              0x7de8 main + 100 (main.m:100)
68 ???                            0x101e29a24 (Missing)

@timdoege
Copy link

timdoege commented Dec 3, 2021

I tracked the source of my issue to this:
EddyVerbruggen/nativescript-barcodescanner#278

and switched to
https://github.com/nstudio/nativescript-plugins/tree/main/packages/nativescript-barcodescanner

(thanks @bradmartin)

@felixkrautschuk
Copy link

Are there any updates on this?

We are still noticing that with @nativescript/ios 8.2.3. Right now we have to stick with 8.0.0.
We are also getting some crash reports with that version, but they rarely occur there.

@gustavotrott
Copy link

I'm facing this problem on "@nativescript/ios": "~8.3.0" as well.

@CatchABus
Copy link

@felixkrautschuk @gustavotrott Are you still facing that issue with latest runtime and core package?

@gustavotrott
Copy link

Now it is much better! I'll make further tests and let you know if I find problems.
Thanks!

@Echoju
Copy link

Echoju commented Aug 30, 2022

Hi
May be this could help.
I faced the problem today, and using this :
this.$navigateTo(Home);
instead of this :
this.$navigateTo(Home,{ clearHistory: true });

seems to make a difference, I don't have the message "assertion failed" after coming back to home page on IOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests