Hi.
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.thirdcore/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
System.err: Calling js method onCreate failed
System.err: Error: Building UI from XML. @file:///app/app-root.xml:1:1
System.err: > Cannot read property 'extend' of undefined
System.err: File: "file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 244, column: 20
System.err: StackTrace:
System.err: Frame: function:'ScopeError', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 63, column: 24
System.err: Frame: function:'SourceError', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 74, column: 23
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 263, column: 17
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 244, column: 33
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 148, column: 13
System.err: Frame: function:'EasySAXParser.parse', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/js-libs/easysax/easysax.js', line: 751, column: 23
System.err: Frame: function:'XmlParser.parse', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 195, column: 22
System.err: Frame: function:'XmlStringParser.parse', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 250, column: 27
System.err: Frame: function:'parseInternal', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 212, column: 11
System.err: Frame: function:'loadInternal', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 117, column: 27
System.err: Frame: function:'loadPage', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 53, column: 27
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 72, column: 12
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 86, column: 20
System.err: Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 827, column: 50
System.err: Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 679, column: 14
System.err: Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
System.err: at android.app.ActivityThread.access$800(ActivityThread.java:135)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
System.err: at android.os.Looper.loop(Looper.java:136)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5017)
System.err: at java.lang.reflect.Method.invokeNative(Native Method)
System.err: at java.lang.reflect.Method.invoke(Method.java:515)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
System.err: at dalvik.system.NativeStart.main(Native Method)
System.err: Caused by: com.tns.NativeScriptException:
System.err: Calling js method onCreate failed
System.err: Error: Building UI from XML. @file:///app/app-root.xml:1:1
System.err: > Cannot read property 'extend' of undefined
System.err: File: "file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 244, column: 20
System.err: StackTrace:
System.err: Frame: function:'ScopeError', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 63, column: 24
System.err: Frame: function:'SourceError', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 74, column: 23
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 263, column: 17
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 244, column: 33
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 148, column: 13
System.err: Frame: function:'EasySAXParser.parse', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/js-libs/easysax/easysax.js', line: 751, column: 23
System.err: Frame: function:'XmlParser.parse', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 195, column: 22
System.err: Frame: function:'XmlStringParser.parse', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 250, column: 27
System.err: Frame: function:'parseInternal', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 212, column: 11
System.err: Frame: function:'loadInternal', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 117, column: 27
System.err: Frame: function:'loadPage', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 53, column: 27
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 72, column: 12
System.err: Frame: function:'', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 86, column: 20
System.err: Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 827, column: 50
System.err: Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 679, column: 14
System.err: Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.thirdcore/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:970)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:954)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:946)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
System.err: at android.app.Activity.performCreate(Activity.java:5231)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
System.err: ... 11 more
when trying to use plugin. My code:
const SSE = require('nativescript-sse').SSE;
let sse = new SSE('http://0.0.0.0:5000/stream', {});
sse.events.on('onConnect', (data) => {
console.log('onConnect: ' + data);
});
sse.events.on('onMessage', (data) => {
console.log('onMessage: ' + data);
});
sse.events.on('onError', (data) => {
console.log('onError: ' + data);
});