NativeScript / NativeScript/nativescript-cli

getting error in main entry

Open
#5,360 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Version: webpack 4.27.1
Time: 45160ms
Built at: 27/08/2020 9:18:08 am
Asset Size Chunks Chunk Names
bundle.js 365 KiB bundle [emitted] bundle
fonts/fa-brands-400.ttf 131 KiB [emitted]
fonts/fa-regular-400.ttf 39.1 KiB [emitted]
fonts/fa-solid-900.ttf 204 KiB [emitted]
package.json 112 bytes [emitted]
runtime.js 71.4 KiB runtime [emitted] runtime
tns-java-classes.js 0 bytes [emitted]
vendor.js 16.6 MiB vendor [emitted] vendor
Entrypoint bundle = runtime.js vendor.js bundle.js
[../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
[./app.scss] 121 KiB {bundle} [built]
[./app/app.component.html] 329 bytes {bundle} [built]
[./app/app.component.ts] 896 bytes {bundle} [built]
[./app/app.module.ts] 1.36 KiB {bundle} [built]
[./app/app.routing.ts] 653 bytes {bundle} [built]
[./app/menu/menu.component.css] 19 bytes {bundle} [built]
[./app/menu/menu.component.html] 1.05 KiB {bundle} [built]
[./app/menu/menu.component.ts] 1.09 KiB {bundle} [built]
[./app/services/dish.service.ts] 1.44 KiB {bundle} [built]
[./app/services/process-httpmsg.service.ts] 784 bytes {bundle} [built]
[./app/shared/baseurl.ts] 51 bytes {bundle} [built]
[./main.ts] 1.84 KiB {bundle} [built]
[./package.json] 100 bytes {bundle} [optional] [built]
+ 627 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Successfully transferred bundle.js on device d5cea600.
Successfully transferred runtime.js on device d5cea600.
Successfully transferred vendor.js on device d5cea600.
Restarting application on device d5cea600...
Successfully synced application org.nativescript.conFusion on device d5cea600.
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.nativescript.conFusion/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.conFusion/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3499)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3653)
System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:151)
System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:111)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2224)
System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
System.err: at android.os.Looper.loop(Looper.java:228)
System.err: at android.app.ActivityThread.main(ActivityThread.java:7813)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1160)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1138)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1134)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
System.err: at android.app.Activity.performCreate(Activity.java:7962)
System.err: at android.app.Activity.performCreate(Activity.java:7951)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3474)
System.err: ... 11 more

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated entry points mentioned in the build output, especially main.ts, app/app.module.ts, and app/app.routing.ts, then reproduce the Android launch with the reported webpack output. Trace why the application reports that its main entry is missing; done means the app starts successfully on the Android device without that exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, angular, javascript, typescript, webpack
Domain
cli, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.