NativeScript: Release Android crashes app
Issue Description
When running ns run android, everything works. When running ns run android --release the app crashes on opening.
Reproduction
No response
Relevant log output (if applicable)
--------- beginning of main
03-17 14:15:32.439 24635 24635 E ht.meterinsigh: Not starting debugger since process cannot load the jdwp agent.
03-17 14:15:32.443 24635 24635 E USNET : USNET: appName: com.meterinsight.meterinsight
03-17 14:15:32.444 24635 24635 D ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
03-17 14:15:32.449 24635 24635 D ActivityThread: setConscryptValidator
03-17 14:15:32.449 24635 24635 D ActivityThread: setConscryptValidator - put
--------- beginning of system
03-17 14:15:32.473 24635 24635 D ActivityThread: handleBindApplication()++ app=com.meterinsight.meterinsight
03-17 14:15:32.474 24635 24635 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10464; state: ENABLED
03-17 14:15:32.481 24635 24635 W ht.meterinsigh: Entry not found
03-17 14:15:32.482 24635 24635 W ht.meterinsigh: Entry not found
03-17 14:15:32.482 24635 24635 W ht.meterinsigh: Entry not found
03-17 14:15:32.487 24635 24635 W ht.meterinsigh: JIT profile information will not be recorded: profile file does not exist.
03-17 14:15:32.487 24635 24635 W ht.meterinsigh: JIT profile information will not be recorded: profile file does not exist.
03-17 14:15:32.487 24635 24635 W ht.meterinsigh: JIT profile information will not be recorded: profile file does not exist.
03-17 14:15:32.499 24635 24635 V GraphicsEnvironment: ANGLE Developer option for 'com.meterinsight.meterinsight' set to: 'default'
03-17 14:15:32.499 24635 24635 V GraphicsEnvironment: App is not on the allowlist for updatable production driver.
03-17 14:15:32.502 24635 24635 D LoadedApk: LoadedApk::makeApplication() appContext.mOpPackageName=com.meterinsight.meterinsight appContext.mBasePackageName=com.meterinsight.meterinsight
03-17 14:15:32.503 24635 24635 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-17 14:15:32.504 24635 24635 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-17 14:15:32.514 24635 24635 D ActivityThread: handleBindApplication() --
03-17 14:15:32.520 24635 24635 I TNS.Runtime: NativeScript Runtime Version 8.2.1, commit no commit sha was provided by build.gradle build
03-17 14:15:32.528 24635 24635 D TNS.Runtime: V8 version 8.3.110.9
03-17 14:15:32.950 24635 24635 D AndroidRuntime: Shutting down VM
--------- beginning of crash
03-17 14:15:32.951 24635 24635 E AndroidRuntime: FATAL EXCEPTION: main
03-17 14:15:32.951 24635 24635 E AndroidRuntime: Process: com.meterinsight.meterinsight, PID: 24635
03-17 14:15:32.951 24635 24635 E AndroidRuntime: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: File: (file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986783)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: StackTrace:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: 46384(file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986784)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at 6295(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:98578)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_exec__(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129960)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130037)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__.X(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:1167)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129973)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130204)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at require(:1:266)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7481)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.access$1700(ActivityThread.java:310)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2277)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:226)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.os.Looper.loop(Looper.java:313)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8633)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: Caused by: com.tns.NativeScriptException: Error calling module function
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: File: (file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986783)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: StackTrace:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: 46384(file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986784)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at 6295(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:98578)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_exec__(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129960)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130037)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__.X(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:1167)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129973)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130204)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at require(:1:266)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.Runtime.runModule(Native Method)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.Runtime.runModule(Runtime.java:689)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.Runtime.run(Runtime.java:681)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7476)--release
--------- beginning of main
03-17 14:15:32.439 24635 24635 E ht.meterinsigh: Not starting debugger since process cannot load the jdwp agent.
03-17 14:15:32.443 24635 24635 E USNET : USNET: appName: com.meterinsight.meterinsight
03-17 14:15:32.444 24635 24635 D ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
03-17 14:15:32.449 24635 24635 D ActivityThread: setConscryptValidator
03-17 14:15:32.449 24635 24635 D ActivityThread: setConscryptValidator - put
--------- beginning of system
03-17 14:15:32.473 24635 24635 D ActivityThread: handleBindApplication()++ app=com.meterinsight.meterinsight
03-17 14:15:32.474 24635 24635 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10464; state: ENABLED
03-17 14:15:32.481 24635 24635 W ht.meterinsigh: Entry not found
03-17 14:15:32.482 24635 24635 W ht.meterinsigh: Entry not found
03-17 14:15:32.482 24635 24635 W ht.meterinsigh: Entry not found
03-17 14:15:32.487 24635 24635 W ht.meterinsigh: JIT profile information will not be recorded: profile file does not exist.
03-17 14:15:32.487 24635 24635 W ht.meterinsigh: JIT profile information will not be recorded: profile file does not exist.
03-17 14:15:32.487 24635 24635 W ht.meterinsigh: JIT profile information will not be recorded: profile file does not exist.
03-17 14:15:32.499 24635 24635 V GraphicsEnvironment: ANGLE Developer option for 'com.meterinsight.meterinsight' set to: 'default'
03-17 14:15:32.499 24635 24635 V GraphicsEnvironment: App is not on the allowlist for updatable production driver.
03-17 14:15:32.502 24635 24635 D LoadedApk: LoadedApk::makeApplication() appContext.mOpPackageName=com.meterinsight.meterinsight appContext.mBasePackageName=com.meterinsight.meterinsight
03-17 14:15:32.503 24635 24635 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-17 14:15:32.504 24635 24635 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-17 14:15:32.514 24635 24635 D ActivityThread: handleBindApplication() --
03-17 14:15:32.520 24635 24635 I TNS.Runtime: NativeScript Runtime Version 8.2.1, commit no commit sha was provided by build.gradle build
03-17 14:15:32.528 24635 24635 D TNS.Runtime: V8 version 8.3.110.9
03-17 14:15:32.950 24635 24635 D AndroidRuntime: Shutting down VM
--------- beginning of crash
03-17 14:15:32.951 24635 24635 E AndroidRuntime: FATAL EXCEPTION: main
03-17 14:15:32.951 24635 24635 E AndroidRuntime: Process: com.meterinsight.meterinsight, PID: 24635
03-17 14:15:32.951 24635 24635 E AndroidRuntime: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: File: (file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986783)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: StackTrace:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: 46384(file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986784)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at 6295(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:98578)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_exec__(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129960)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130037)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__.X(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:1167)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129973)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130204)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at require(:1:266)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7481)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.access$1700(ActivityThread.java:310)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2277)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:226)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.os.Looper.loop(Looper.java:313)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8633)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: Caused by: com.tns.NativeScriptException: Error calling module function
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: File: (file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986783)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: StackTrace:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: 46384(file:///data/data/com.meterinsight.meterinsight/files/app/vendor.js:2:986784)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at 6295(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:98578)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:197)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_exec__(file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129960)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130037)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at __webpack_require__.X(file:///data/data/com.meterinsight.meterinsight/files/app/runtime.js:1:1167)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:129973)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at (file:///data/data/com.meterinsight.meterinsight/files/app/bundle.js:1:130204)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at require(:1:266)
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime:
03-17 14:15:32.951 24635 24635 E AndroidRuntime: TypeError: Cannot read property 'content' of undefined
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.Runtime.runModule(Native Method)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.Runtime.runModule(Runtime.java:689)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.Runtime.run(Runtime.java:681)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
03-17 14:15:32.951 24635 24635 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7476)
Environment
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Shell: Not Found
node: 14.16.0
npm: 6.14.11
nativescript: Not Found
# android
java: 17.0.2
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found
# ios
xcode: Not Found
cocoapods: Not Found
python: Not Found
python3: Not Found
ruby: 3.0.2
platforms: Not Found
Dependencies
"dependencies": {
"@angular/animations": "^13.2.2",
"@angular/common": "^13.2.2",
"@angular/compiler": "^13.2.2",
"@angular/core": "^13.2.2",
"@angular/forms": "^13.2.2",
"@angular/platform-browser": "^13.2.2",
"@angular/platform-browser-dynamic": "^13.2.2",
"@angular/router": "^13.2.2",
"@azure/storage-blob": "^12.9.0",
"@nativescript/angular": "^13.0.3",
"@nativescript/background-http": "^6.0.0",
"@nativescript/camera": "^5.0.10",
"@nativescript/core": "~8.2.0",
"@nativescript/localize": "^5.0.4",
"@nativescript/theme": "^3.0.2",
"@nstudio/nativescript-camera-plus": "^4.1.0",
"@triniwiz/nativescript-toasty": "^4.1.3",
"angular-azure-blob-service": "^1.1.0",
"guid-typescript": "^1.0.9",
"nativescript-barcodescanner": "file:nstudio-nativescript-barcodescanner-5.0.1-no-android-arm64m1.tgz",
"nativescript-ngx-fonticon": "^7.0.0",
"nativescript-ui-dataform": "^8.0.1",
"rxjs": "~7.5.4",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.2.0",
"@angular/cli": "^13.2.3",
"@angular/compiler-cli": "^13.2.2",
"@nativescript/android": "~8.2.2",
"@nativescript/ios": "~8.2.1",
"@nativescript/types": "~8.2.0",
"@nativescript/webpack": "~5.0.6",
"@ngtools/webpack": "^13.2.3",
"typescript": "~4.5.5"
}
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
The latest version (1.0.2) finally did the trick. Using this barcodescanner resolved the originel “ns run release” error as well, thanks for your help triniwiz!