Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

iOS crash when running with release flag: Can't find variable: __metadata #1146

Closed
nabilzhafri opened this issue Aug 19, 2020 · 1 comment
Closed

Comments

@nabilzhafri
Copy link

nabilzhafri commented Aug 19, 2020

Simply copy steps from here: https://nativescript.org/blog/upgrading-tips-for-angular-10/

npm i -g @angular/cli // You could be needing to prefix sudo on GNU/Linux and other Unix-like OSes.
npm i -g nativescript // You could be needing to prefix sudo on GNU/Linux and other Unix-like OSes.
npm i -g @nativescript/schematics // You could be needing to prefix sudo on GNU/Linux and other Unix-like OSes.

ng new workspace
cd workspace
ng add @nativescript/schematics --skipAutoGeneratedComponent

// start apps:
npm run ios --> this runs fine
npm run ios -- --release   --> this will cause error below

Any idea why? Tried to search for solution but can't find any.
Happens to my existing project as well after upgrading to angular 10. Right now I can't seem to deploy the iOS app due to this issue.

JavaScript stack trace:
file:///app/vendor.js:90935:15
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:84982:90
at file:///app/vendor.js:85830:34
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:42890:97
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:62743:87
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:35266:89
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:64700:87
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:66519:95
at file:///app/vendor.js:71822:34
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/bundle.js:51:47
at __webpack_require__(file:///app/runtime.js:75:34)
at checkDeferredModules(file:///app/runtime.js:44:42)
at webpackJsonpCallback(file:///app/runtime.js:31:39)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([nativ<…>
JavaScript error:
file:///app/vendor.js:90935:15: JS ERROR ReferenceError: Can't find variable: __metadata
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: __metadata
at
file:///app/vendor.js:90935:15
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:84982:90
at file:///app/vendor.js:85830:34
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:42890:97
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:62743:87
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:35266:89
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:64700:87
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/vendor.js:66519:95
at file:///app/vendor.js:71822:34
at __webpack_require__(file:///app/runtime.js:75:34)
at file:///app/bundle.js:51:47
at __webpack_require__(file:///app/runtime.js:75:34)
at checkDeferredModules(file:///app/runtime.js:44:42)
at webpackJsonpCallback(file:///app/runtime.js:31:39)
at anonym<…>
NativeScript caught signal 6.
Native Stack:
1   0x103596171 sig_handler(int)
2   0x7fff522ab5fd _sigtramp
3   0x7fff5219ff39 itoa64
4   0x7fff5219bb7c abort
5   0x7fff500a2858 abort_message
6   0x7fff50093cbf demangling_unexpected_handler()
7   0x7fff51253c0b _objc_terminate()
8   0x7fff500a1c87 std::__terminate(void (*)())
9   0x7fff500a440b __cxa_get_exception_ptr
10  0x7fff500a43d2 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*)
11  0x7fff51253ad6 _objc_exception_destructor(void*)
12  0x103545b6f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
13  0x103597524 -[TNSRuntime executeModule:referredBy:]
14  0x102e8f4bf main
15  0x7fff520ce1fd start
JS Stack:
@nabilzhafri
Copy link
Author

Moved to here: NativeScript/NativeScript#8778

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

No branches or pull requests

1 participant