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

Runtime exception when using custom Android application with bundle #900

Closed
@DimitarTachev

Description

@DimitarTachev

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: 5.4.0
  • Cross-platform modules: 5.4.0
  • Android Runtime: 5.4.0
  • iOS Runtime: 5.4.0
  • Plugin: 0.22.0
  • Node.js: 10.13.0

To Reproduce

  1. Update the webpack.config and the nativescript-dev-webpack version of any of the plugin's demos. E.g. https://github.com/NativeScript/nativescript-dev-webpack/tree/master/demo/TypeScriptApp (these demos are using custom Android applications).
  2. Run the demo with on Android with --bundle
  3. You will get An uncaught Exception occurred on "main" thread. java.lang.RuntimeException: Unable to create application com.tns.MyCustomApplication: com.tns.NativeScriptException: JavaScript object for Java ID 0 not found.

Expected behavior
The demo should run without an exception.

Additional context
The issue is caused by the single Webpack Runtime (runtime.js) which is not included when the custom Android application chunk is loaded runtime.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions