Open
Description
From @sud80 on January 30, 2018 9:9
Tell us about the problem
When I build my app with out snapshot view, all seems good. But once I enable snapshot view I am getting the following error:
01-29 15:43:34.609 5652 5652 W System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myorg.myapp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
01-29 15:43:34.609 5652 5652 W System.err: Calling js method onStart failed
01-29 15:43:34.609 5652 5652 W System.err: Error: Trying to link invalid 'this' to a Java object
01-29 15:43:34.609 5652 5652 W System.err: File: "<embedded>, line: 36, column: 1203853
01-29 15:43:34.609 5652 5652 W System.err: StackTrace:
01-29 15:43:34.609 5652 5652 W System.err: Frame: function:'AnimationListnerImpl', file:'<embedded>', line: 36, column: 1203854
Did you verify this is a real problem by searching [Stack Overflow]
There were few similar ones but couldn't find anything reported directly with tns-core-modules and snapshot.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
- CLI: 3.4.1
- Cross-platform modules: 3.4.0
- Runtime(s): tns-android 3.4.1
- Plugin(s):
"nativescript-angular": "~5.2.0",
"nativescript-appversion": "~1.4.1",
"nativescript-background-http": "~3.1.0",
"nativescript-camera": "~3.2.1",
"nativescript-cardview": "~2.0.5",
"nativescript-couchbaselite": "~1.0.11",
"nativescript-dom": "~2.0.0",
"nativescript-drop-down": "3.2.0",
"nativescript-facebook-login": "~1.0.1",
"nativescript-geolocation": "~4.2.3",
"nativescript-gif": "~3.1.1",
"nativescript-i18n": "~0.2.4",
"nativescript-imagepicker": "~4.0.1",
"nativescript-intl": "~3.0.0",
"nativescript-iqkeyboardmanager": "~1.1.0",
"nativescript-master-technology": "~1.1.1",
"nativescript-permissions": "~1.2.3",
"nativescript-plugin-firebase": "4.2.1",
"nativescript-pulltorefresh": "~2.0.3",
"nativescript-social-share": "~1.5.0",
"nativescript-swiss-army-knife": "~3.0.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-timedatepicker": "~1.2.1",
"nativescript-toast": "~1.4.6",
"nativescript-web-image-cache": "~4.2.2",
"nativescript-webview-interface": "~1.4.2"
Please tell us how to recreate the issue in as much detail as possible.
tns build android --bundle --release --env.uglify --env.aot --env.snapshot ...
Above command works and generates the build. But when I add --env.snapshot, the mentioned error happens.
Copied from original issue: NativeScript/NativeScript#5354