Skip to content

undefined is not an object (evaluating 'this._owner.get') #8562

@AnthonyLenglet

Description

@AnthonyLenglet

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.3.0
  • Cross-platform modules: 6.5.1
  • Android Runtime: 6.5.0
  • iOS Runtime: 6.3.0
  • Plugin(s):
| @angular/animations                       │ ~8.2.0   │
│ @angular/common                           │ ~8.2.0   │
│ @angular/compiler                         │ ~8.2.0   │
│ @angular/core                             │ ~8.2.0   │
│ @angular/forms                            │ ~8.2.0   │
│ @angular/platform-browser                 │ ~8.2.0   │
│ @angular/platform-browser-dynamic         │ ~8.2.0   │
│ @angular/router                           │ ~8.2.0   │
│ @nativescript/theme                       │ ^2.3.0   │
│ @nstudio/nativescript-cardview            │ ^1.0.0   │
│ @nstudio/nativescript-checkbox            │ ^1.0.0   │
│ angular-in-memory-web-api                 │ ^0.9.0   │
│ libphonenumber-js                         │ ^1.7.26  │
│ lodash                                    │ ^4.17.15 │
│ lodash.isequal                            │ ^4.5.0   │
│ moment                                    │ ^2.24.0  │
│ nativescript-angular                      │ ^8.21.0  │
│ nativescript-camera                       │ ^4.5.0   │
│ nativescript-carousel                     │ ^6.1.1   │
│ nativescript-datetimepicker               │ ^1.2.2   │
│ nativescript-drop-down                    │ ^5.0.4   │
│ nativescript-geocoding                    │ ^2.0.0   │
│ nativescript-geolocation                  │ ^5.1.0   │
│ nativescript-imagepicker                  │ ^7.1.0   │
│ nativescript-iqkeyboardmanager            │ ^1.5.1   │
│ nativescript-lottie                       │ ^4.0.0   │
│ nativescript-material-bottomnavigationbar │ ^3.1.7   │
│ nativescript-phone                        │ ^1.4.0   │
│ nativescript-plugin-firebase              │ ^10.4.0  │
│ nativescript-unit-test-runner             │ ^0.7.0   │
│ nativescript-videoplayer                  │ ^4.2.1   │
│ ng-node-environment                       │ ^1.1.1   │
│ node-sass                                 │ ^4.12.0  │
│ reflect-metadata                          │ ~0.1.12  │
│ rxjs                                      │ ^6.4.0   │
│ tns-core-modules                          │ ^6.5.1   │
│ zone.js                                   │ ^0.9.1   │

Describe the bug
Every once in a while, upon reloading the app after a change, the build will crash before fully reloading with the error undefined is not an object (evaluating 'this._owner.get')

To Reproduce
This issue randomly happens on our app every other reload, nothing to do to actually get it to happen

Expected behavior
The app reloads without crashing

Additional context

file:///node_modules/@nativescript/core/ui/frame/frame.js:337:0: JS ERROR TypeError: undefined is not an object (evaluating 'this._owner.get')
NativeScript caught signal 11.
Native Stack:
1   0x10d537481 sig_handler(int)
2   0x7fff5245b42d _sigtramp
3   0x4fc0c100003e7885
4   0x7fff5248fb85 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
5   0x7fff52493e58 _Unwind_RaiseException
6   0x7fff502568bd __cxa_throw
7   0x7fff513fbc44 _objc_exception_destructor(void*)
8   0x10d4ea0fd NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
9   0x10d528368 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
10  0x10df282e2 ffi_closure_unix64_inner
11  0x10df28d0a ffi_closure_unix64
12  0x7fff47a1a77f -[UIViewController __viewDidDisappear:]
13  0x7fff47a1c34a __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke.1396
14  0x7fff47a1af56 -[UIViewController _executeAfterAppearanceBlock]
15  0x7fff4809bfb3 _runAfterCACommitDeferredBlocks
16  0x7fff4808c7b4 _cleanUpAfterCAFlushAndRunDeferredBlocks
17  0x7fff480bc3a9 _afterCACommitHandler
18  0x7fff23bd3867 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
19  0x7fff23bce2fe __CFRunLoopDoObservers
20  0x7fff23bce97a __CFRunLoopRun
21  0x7fff23bce066 CFRunLoopRunSpecific
22  0x7fff384c0bb0 GSEventRunModal
23  0x7fff48092d4d UIApplicationMain
24  0x10df28b4d ffi_call_unix64
25  0x11ad8f100
JS Stack:
UIApplicationMain([native code])
at run(file:///node_modules/@nativescript/core/application/application.js:312:0)
at file:///node_modules/@nativescript/angular/platform-common.js:210:0
at file:///node_modules/@nativescript/angular/platform-common.js:111:0
at file:///node_modules/@nativescript/angular/platform-common.js:91:0
at file:///app/bundle.js:5697:144
at ./main.ts(file:///app/bundle.js:5702:34)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at checkDeferredModules(file:///src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file:///src/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation
at
at asyncFunctionResume
at
at promiseReactionJob
JS Stack:
UIApplicationMain([native code])
at run(file:///node_modules/@nativescript/core/application/application.js:312:0)

refers to this on ios

function run(entry) {
    var _this = this;
    mainEntry = typeof entry === "string" ? { moduleName: entry } : entry;
    started = true;
    if (!iosApp.nativeApp) {
        UIApplicationMain(0, null, null, iosApp && iosApp.delegate ? NSStringFromClass(iosApp.delegate) : NSStringFromClass(Responder));
    }
    else {
      // ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions