bradleygore / nativescript-textinputlayout

Android Material Design TextInputLayout for NativeScript
36 stars 14 forks source link

Upgrade to tns 6.0 crashes on TextInputLayout #39

Open nmandyam opened 5 years ago

nmandyam commented 5 years ago

I don't know where the problem is, so I'm going to stick my neck out and say it's here, with this plugin, sorry! I upgraded NativeScript to 6.0 and a working app now fails to run. It complains as below. Any thoughts? BTW, I had to rename other plugins (nstudio: nativescript-checkbox, nativescript-cardview, nativescript-snackbar) to make them run OK after migration. Here's the log:

An uncaught Exception occurred on "main" thread.
Calling js method onCreateView failed
TypeError: Cannot read property 'widget' of undefined

StackTrace:
    Frame: function:'push.../node_modules/nativescript-textinputlayout/textInputLayout.js.TextInputLayout.createNativeView', file:'file:///data/data/.../files/app/vendor.js', line: 35452, column: 43
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69526, column: 31
    Frame: function:'', file:'file:///data/data/.../files/app/vendor.js', line: 69568, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/layouts/layout-base-common.js.LayoutBaseCommon.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 78785, column: 26
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild', file:'file:///data/data/.../files/app/vendor.js', line: 70821, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69567, column: 14
    Frame: function:'', file:'file:///data/data/.../files/app/vendor.js', line: 69568, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/layouts/layout-base-common.js.LayoutBaseCommon.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 78785, column: 26
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild', file:'file:///data/data/.../files/app/vendor.js', line: 70821, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69567, column: 14
    Frame: function:'', file:'file:///data/data/.../files/app/vendor.js', line: 69568, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/layouts/layout-base-common.js.LayoutBaseCommon.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 78785, column: 26
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild', file:'file:///data/data/.../files/app/vendor.js', line: 70821, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69567, column: 14
    Frame: function:'', file:'file:///data/data/.../files/app/vendor.js', line: 69568, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/layouts/layout-base-common.js.LayoutBaseCommon.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 78785, column: 26
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild', file:'file:///data/data/.../files/app/vendor.js', line: 70821, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69567, column: 14
    Frame: function:'', file:'file:///data/data/.../files/app/vendor.js', line: 69568, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/layouts/layout-base-common.js.LayoutBaseCommon.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 78785, column: 26
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild', file:'file:///data/data/.../files/app/vendor.js', line: 70821, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69567, column: 14
    Frame: function:'', file:'file:///data/data/.../files/app/vendor.js', line: 69568, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/content-view/content-view.js.ContentView.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 67310, column: 13
    Frame: function:'push.../node_modules/tns-core-modules/ui/page/page-common.js.PageBase.eachChildView', file:'file:///data/data/.../files/app/vendor.js', line: 79956, column: 40
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild', file:'file:///data/data/.../files/app/vendor.js', line: 70821, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._setupUI', file:'file:///data/data/.../files/app/vendor.js', line: 69567, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._addViewCore', file:'file:///data/data/.../files/app/vendor.js', line: 69466, column: 18
    Frame: function:'push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase._addView', file:'file:///data/data/.../files/app/vendor.js', line: 69455, column: 14
    Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.FragmentCallbacksImplementation.onCreateView', file:'file:///data/data/.../files/app/vendor.js', line: 75492, column: 19
    Frame: function:'push.../node_modules/tns-core-modules/ui/frame/fragment.js.FragmentClass.onCreateView', file:'file:///data/data/.../files/app/vendor.js', line: 73465, column: 38
    at com.tns.Runtime.callJSMethodNative(Native Method)
    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
    at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
    at com.tns.Runtime.callJSMethod(Runtime.java:1109)
    at com.tns.Runtime.callJSMethod(Runtime.java:1089)
    at com.tns.Runtime.callJSMethod(Runtime.java:1081)
    at com.tns.FragmentClass.onCreateView(FragmentClass.java:53)
    at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439)
    at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460)
    at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
    at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
    at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802)
    at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
    at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
    at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
    at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
    at androidx.fragment.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Thank you for a great plugin!

yalva commented 4 years ago

I had the same issue, stumbled across this v2 plugin https://market.nativescript.org/plugins/nativescript-textinputlayout-v2

Everything working as before after replacing nativescript-textinputlayout with nativescript-textinputlayout-v2