With NativeScript 2.2.0 the demo app is throwing error on the dynamic slides example.
I am able to reproduce this error with a bigger project as well! I thought it was a late context issue but it appears to have something to do with nativescript-dom dependency.
JS: NativeScriptError: Error: The application crashed because of an uncaught exception. You can look at "stackTrace" or "nativeException" for more detailed info
rmation about the exception.
JS: *** StackTrace *** : com.tns.NativeScriptException:
JS: Calling js method onCreateView failed
JS:
JS: TypeError: Cannot read property 'length' of undefined
JS: File: "/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js, line: 100, column: 25
JS:
JS: StackTrace:
JS: Frame: function:'_resync', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 100, column: 26
JS: Frame: function:'classList', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 115, column: 14
JS: Frame: function:'getClassList', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 184, column: 18
JS: Frame: function:'Object.defineProperty.get', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 188, column: 1
25
JS: Frame: function:'SlideContainer.createIndicator', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-slides/nativescript-slides.j
s', line: 520, column: 18
JS: Frame: function:'SlideContainer.buildFooter', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-slides/nativescript-slides.js',
line: 439, column: 43
JS: Frame: function:'', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-slides/nativescript-slides.js', line: 183, column: 43
JS: Frame: function:'Observable.notify', file:'/data/data/org.nativescript.demo/files/app/tns_modules/data/observable/observable.js', line: 158, column: 23
JS: Frame: function:'Observable._emit', file:'/data/data/org.nativescript.demo/files/app/tns_modules/data/observable/observable.js', line: 177, column: 18
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 611, column: 14
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 82, column: 35
JS: Frame: function:'eachChild', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 616, column: 23
JS: Frame: function:'LayoutBase._eachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/layouts/layout-base-common.js', line: 146,
column: 22
JS: Frame: function:'View._loadEachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 619, column: 18
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 609, column: 14
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 82, column: 35
JS: Frame: function:'eachChild', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 616, column: 23
JS: Frame: function:'ContentView._eachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/content-view/content-view.js', line: 65, c
olumn: 13
JS: Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/page/page-common.js', line: 265, column: 41
JS: Frame: function:'View._loadEachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 619, column: 18
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 609, column: 14
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 82, column: 35
JS: Frame: function:'Page.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/page/page-common.js', line: 45, column: 35
JS: Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 962, column: 18
JS: Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 127, column: 39
JS: Frame: function:'View._addView', file:
JS: '/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 952, column: 14
JS: Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11
JS: Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame.js', line: 6
12, column: 13
JS: Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38
JS:
JS:
JS: at com.tns.Runtime.callJSMethodNative(Native Method)
JS: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:862)
JS: at com.tns.Runtime.callJSMethodImpl(Runtime.java:727)
JS: at com.tns.Runtime.callJSMethod(Runtime.java:713)
JS: at com.tns.Runtime.callJSMethod(Runtime.java:694)
JS: at com.tns.Runtime.callJSMethod(Runtime.java:684)
JS: at com.tns.FragmentClass.onCreateView(FragmentClass.java:35)
JS: at android.app.Fragment.performCreateView(Fragment.java:2053)
JS: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894)
JS: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
JS: at android.app.BackStackRecord.run(BackStackRecord.java:833)
JS: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452)
JS: at android.app.FragmentManagerImpl$1.run(FragmentManager.java:447)
JS: at android.os.Handler.handleCallback(Handler.java:739)
JS: at android.os.Handler.dispatchMessage(Handler.java:95)
JS: at android.os.Looper.loop(Looper.java:135)
JS: at android.app.ActivityThread.main(ActivityThread.java:5221)
JS: at java.lang.reflect.Method.invoke(Native Method)
JS: at java.lang.reflect.Method.invoke(Method.java:372)
JS: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
JS: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
JS: *** nativeException *** : com.tns.NativeScriptException:
JS: Calling js method onCreateView failed
JS:
JS: TypeError: Cannot read property 'length' of undefined
JS: File: "/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js, line: 100, column: 25
JS:
JS: StackTrace:
JS: Frame: function:'_resync', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 100, column: 26
JS: Frame: function:'classList', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 115, column: 14
JS: Frame: function:'getClassList', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 184, column: 18
JS: Frame: function:'Object.defineProperty.get', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-dom/dom.js', line: 188, column: 1
25
JS: Frame: function:'SlideContainer.createIndicator', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-slides/nativescript-slides.j
s', line: 520, column: 18
JS: Frame: function:'SlideContainer.buildFooter', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-slides/nativescript-slides.js',
line: 439, column: 43
JS: Frame: function:'', file:'/data/data/org.nativescript.demo/files/app/tns_modules/nativescript-slides/nativescript-slides.js', line: 183, column: 43
JS: Frame: function:'Observable.notify', file:'/data/data/org.nativescript.demo/files/app/tns_modules/data/observable/observable.js', line: 158, column: 23
JS: Frame: function:'Observable._emit', file:'/data/data/org.nativescript.demo/files/app/tns_modules/data/observable/observable.js', line: 177, column: 18
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 611, column: 14
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 82, column: 35
JS: Frame: function:'eachChild', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 616, column: 23
JS: Frame: function:'LayoutBase._eachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/layouts/layout-base-common.js', line: 146,
column: 22
JS: Frame: function:'View._loadEachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 619, column: 18
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 609, column: 14
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 82, column: 35
JS: Frame: function:'eachChild', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 616, column: 23
JS: Frame: function:'ContentView._eachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/content-view/content-view.js', line: 65, c
olumn: 13
JS: Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/page/page-common.js', line: 265, column: 41
JS: Frame: function:'View._loadEachChildView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 619, column: 18
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 609, column: 14
JS: Frame: function:'View.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 82, column: 35
JS: Frame: function:'Page.onLoaded', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/page/page-common.js', line: 45, column: 35
JS: Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 962, column: 18
JS: Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view.js', line: 127, column: 39
JS: Frame: function:'View._addView',
JS: file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/core/view-common.js', line: 952, column: 14
JS: Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11
JS: Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame.js', line: 6
12, column: 13
JS: Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38
JS: