nativescript-vue / nativescript-vue-navigator

A simple router for NativeScript-Vue, built on top of $navigateTo to simplify routing from within components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to load Navigator Component

luiscarbonell opened this issue · comments

Prerequisites

  • Ubuntu 18.04 (Subsystem in Windows 10)
  • NativeScript 6.3.3
  • Android Version 9
  • nativescript-vue-navigator@v0.2.0

Issue Summary

An error is thrown when trying to use the Navigator component as a top-level component. The functionality provided by index.js still works (e.g. this.$navigator.navigate("/some_route")) - but the components/Navigator.js doesn't seem to be imported correctly into my application and a very generic error is thrown.

Stack Trace

Unable to start activity ComponentInfo{org.nativescript.preview/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
Error: Main entry is missing. App cannot be started. Verify app bootstrap.

StackTrace:
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.preview/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
Error: Main entry is missing. App cannot be started. Verify app bootstrap.
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3113)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3256)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7037)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
Error: Main entry is missing. App cannot be started. Verify app bootstrap.
        at com.tns.Runtime.callJSMethodNative(Native Method)
        at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
        at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
        at com.tns.Runtime.callJSMethod(Runtime.java:1160)
        at com.tns.Runtime.callJSMethod(Runtime.java:1138)
        at com.tns.Runtime.callJSMethod(Runtime.java:1134)
        at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:20)
        at android.app.Activity.performCreate(Activity.java:7327)
        at android.app.Activity.performCreate(Activity.java:7318)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3093)
        ... 11 more

Additional Information

...would solve myself but the message is incredibly generic; I don't have great debugging tools yet...and I only picked up NativeScript a few weeks ago.

Please help 🙏

After playing around a bit with it...I realized that the Navigator is currently not case or file type sensitive. I had placed app.js and App.vue in the root directory. I simply changed App.vue to Main.vue and the problem was resolved.