Uncaught exception to compile for android using webpack


#1

Guys, I’m facing this problem an uncaught exception was encountered on "main" thread only when I try to run my android app using webpack when I use tns run android it works.

This is my entire exception:

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to resume activity {br.com.onibusfacil.saojoaonoponto/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreateView failed

[object Object]
File: "file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js, line: 12378, column: 12

StackTrace: 
	Frame: function:'module.exports.CompileMetadataResolver._reportError', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 12378, column: 13
	Frame: function:'module.exports.CompileMetadataResolver._getDependenciesMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 12190, column: 18
	Frame: function:'module.exports.CompileMetadataResolver._getTypeMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 12065, column: 26
	Frame: function:'module.exports.CompileMetadataResolver.getNonNormalizedDirectiveMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11705, column: 24
	Frame: function:'module.exports.CompileMetadataResolver._loadDirectiveMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11581, column: 23
	Frame: function:'', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11782, column: 54
	Frame: function:'module.exports.CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11781, column: 41
	Frame: function:'', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 28033, column: 58
	Frame: function:'module.exports.JitCompiler._loadModules', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 28032, column: 43
	Frame: function:'module.exports.JitCompiler._compileModuleAndComponents', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 27987, column: 52
	Frame: function:'module.exports.JitCompiler.compileModuleAsync', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 27953, column: 21
	Frame: function:'module.exports.PlatformRef_._bootstrapModuleWithZone', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 31512, column: 25
	Frame: function:'module.exports.PlatformRef_.bootstrapModule', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 31487, column: 21
	Frame: function:'_bootstrapper', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 53487, column: 66
	Frame: function:'onLoadedHandler', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 53554, column: 21
	Frame: function:'module.exports.Observable.notify', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 8088, column: 23
	Frame: function:'module.exports.Observable._emit', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 8107, column: 18
	Frame: function:'module.exports.View.onLoaded', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 81384, column: 14
	Frame: function:'module.exports.View.onLoaded', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 890, column: 35
	Frame: function:'module.exports.Page.onLoaded', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 84579, column: 35
	Frame: function:'module.exports.View._addViewCore', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 81814, column: 18
	Frame: function:'module.exports.View._addViewCore', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 935, column: 39
	Frame: function:'module.exports.View._addView', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 81804, column: 14
	Frame: function:'onFragmentShown', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 7061, column: 11
	Frame: function:'module.exports.FragmentCallbacksImplementation.onCreateView', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 7633, column: 13
	Frame: function:'module.exports.FragmentClass.onCreateView', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 82428, column: 38


	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2800)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2829)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2260)
	at android.app.ActivityThread.access$800(ActivityThread.java:142)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5118)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: com.tns.NativeScriptException: 
Calling js method onCreateView failed

[object Object]
File: "file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js, line: 12378, column: 12

StackTrace: 
	Frame: function:'module.exports.CompileMetadataResolver._reportError', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 12378, column: 13
	Frame: function:'module.exports.CompileMetadataResolver._getDependenciesMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 12190, column: 18
	Frame: function:'module.exports.CompileMetadataResolver._getTypeMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 12065, column: 26
	Frame: function:'module.exports.CompileMetadataResolver.getNonNormalizedDirectiveMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11705, column: 24
	Frame: function:'module.exports.CompileMetadataResolver._loadDirectiveMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11581, column: 23
	Frame: function:'', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11782, column: 54
	Frame: function:'module.exports.CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 11781, column: 41
	Frame: function:'', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 28033, column: 58
	Frame: function:'module.exports.JitCompiler._loadModules', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 28032, column: 43
	Frame: function:'module.exports.JitCompiler._compileModuleAndComponents', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 27987, column: 52
	Frame: function:'module.exports.JitCompiler.compileModuleAsync', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/bundle.js', line: 27953, column: 21
	Frame: function:'module.exports.PlatformRef_._bootstrapModuleWithZone', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 31512, column: 25
	Frame: function:'module.exports.PlatformRef_.bootstrapModule', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 31487, column: 21
	Frame: function:'_bootstrapper', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 53487, column: 66
	Frame: function:'onLoadedHandler', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 53554, column: 21
	Frame: function:'module.exports.Observable.notify', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 8088, column: 23
	Frame: function:'module.exports.Observable._emit', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 8107, column: 18
	Frame: function:'module.exports.View.onLoaded', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 81384, column: 14
	Frame: function:'module.exports.View.onLoaded', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 890, column: 35
	Frame: function:'module.exports.Page.onLoaded', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 84579, column: 35
	Frame: function:'module.exports.View._addViewCore', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 81814, column: 18
	Frame: function:'module.exports.View._addViewCore', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 935, column: 39
	Frame: function:'module.exports.View._addView', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 81804, column: 14
	Frame: function:'onFragmentShown', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 7061, column: 11
	Frame: function:'module.exports.FragmentCallbacksImplementation.onCreateView', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 7633, column: 13
	Frame: function:'module.exports.FragmentClass.onCreateView', file:'file:///data/data/br.com.onibusfacil.saojoaonoponto/files/app/vendor.js', line: 82428, column: 38


	at com.tns.Runtime.callJSMethodNative(Native Method)
	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1197)
	at com.tns.Runtime.callJSMethodImpl(Runtime.java:1061)
	at com.tns.Runtime.callJSMethod(Runtime.java:1047)
	at com.tns.Runtime.callJSMethod(Runtime.java:1028)
	at com.tns.Runtime.callJSMethod(Runtime.java:1018)
	at com.tns.FragmentClass.onCreateView(android.app.Fragment.java)
	at android.app.Fragment.performCreateView(Fragment.java:1710)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:891)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1063)
	at android.app.BackStackRecord.run(BackStackRecord.java:684)
	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1450)
	at android.app.Activity.performResume(Activity.java:5365)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2790)
	... 12 more

Any idea?