com.tns.NativeScriptException: Calling js method onTouch failed TypeError: Cannot read property 'android' of undefined File: "/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js, line: 97, column: 40 StackTrace: Frame: function:'Page._showNativeModalView', file:'/data/data/package_name/files/app/tns_modules/ui/page/page.js', line: 138, column: 47 Frame: function:'Page.showModal', file:'/data/data/package_name/files/app/tns_modules/ui/page/page-common.js', line: 222, column: 18 Frame: function:'buscarCliente', file:'/data/data/package_name/files/app/views/abrir/ver-cotizacion/clonar/clonar.js', line: 99, column: 14 Frame: function:'_executeCallback', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 151, column: 27 Frame: function:'TapAndDoubleTapGestureListener.onSingleTapUp', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 171, column: 17 Frame: function:'GesturesObserver.androidOnTouchEvent', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 97, column: 41 Frame: function:'onTouch', file:'/data/data/package_name/files/app/tns_modules/ui/core/view.js', line: 113, column: 37

GitHub | Pip3r4o | 4 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Problem when calling a page on modal view

    GitHub | 4 months ago | dgmaar
    com.tns.NativeScriptException: Calling js method onTouch failed TypeError: Cannot read property 'android' of undefined File: "/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js, line: 97, column: 40 StackTrace: Frame: function:'Page._showNativeModalView', file:'/data/data/package_name/files/app/tns_modules/ui/page/page.js', line: 138, column: 47 Frame: function:'Page.showModal', file:'/data/data/package_name/files/app/tns_modules/ui/page/page-common.js', line: 222, column: 18 Frame: function:'buscarCliente', file:'/data/data/package_name/files/app/views/abrir/ver-cotizacion/clonar/clonar.js', line: 99, column: 14 Frame: function:'_executeCallback', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 151, column: 27 Frame: function:'TapAndDoubleTapGestureListener.onSingleTapUp', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 171, column: 17 Frame: function:'GesturesObserver.androidOnTouchEvent', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 97, column: 41 Frame: function:'onTouch', file:'/data/data/package_name/files/app/tns_modules/ui/core/view.js', line: 113, column: 37
  2. 0

    Problem when calling a page on modal view

    GitHub | 4 months ago | Pip3r4o
    com.tns.NativeScriptException: Calling js method onTouch failed TypeError: Cannot read property 'android' of undefined File: "/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js, line: 97, column: 40 StackTrace: Frame: function:'Page._showNativeModalView', file:'/data/data/package_name/files/app/tns_modules/ui/page/page.js', line: 138, column: 47 Frame: function:'Page.showModal', file:'/data/data/package_name/files/app/tns_modules/ui/page/page-common.js', line: 222, column: 18 Frame: function:'buscarCliente', file:'/data/data/package_name/files/app/views/abrir/ver-cotizacion/clonar/clonar.js', line: 99, column: 14 Frame: function:'_executeCallback', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 151, column: 27 Frame: function:'TapAndDoubleTapGestureListener.onSingleTapUp', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 171, column: 17 Frame: function:'GesturesObserver.androidOnTouchEvent', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 97, column: 41 Frame: function:'onTouch', file:'/data/data/package_name/files/app/tns_modules/ui/core/view.js', line: 113, column: 37
  3. 0

    How to use custom native java classes / functions in nativescript?

    Stack Overflow | 3 months ago | Fonix
    com.tns.NativeScriptException: Calling js method onTouch failed [object Object] File: "file:///data/data/org.nativescript.HelloWorld/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js, line: 97, column: 40 StackTrace: Frame: function:'GesturesObserver.androidOnTouchEvent', file:'file:///data/data/org.nativescript.HelloWorld/files/app/tns_modules/tns-core-modules/ui/gestures/gestures.js', line: 97, column: 41 Frame: function:'onTouch', file:'file:///data/data/org.nativescript.HelloWorld/files/app/tns_modules/tns-core-modules/ui/core/view.js', line: 113, column: 37
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    tns-core-modules@next is giving me errors.

    GitHub | 6 months ago | 9thwall
    com.tns.NativeScriptException: Calling js method onCreateView failed TypeError: Cannot read property 'LayoutParams' of undefined File: "/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js, line: 507, column: 68 StackTrace: Frame: function:'ViewStyler.setNativeLayoutParamsProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 507, column: 69 Frame: function:'StylePropertyChangedHandler.applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1263, column: 14 Frame: function:'Style._applyStyleProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1036, column: 25 Frame: function:'Style._applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 999, column: 14 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 980, column: 14 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'onLayoutParamsChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 130, column: 11 Frame: function:'DependencyObservable._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 213, column: 13 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 978, column: 45 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 856, column: 18 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 521, column: 42 Frame: function:'Page._addViewToNativeVisualTree', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page.js', line: 102, column: 41 Frame: function:'eachChild', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 160, column: 61 Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page-common.js', line: 286, column: 9 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 165, column: 18 Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 126, column: 18 Frame: function:'View._addView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 1136, column: 14 Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11 Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 612, column: 13 Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38
  6. 0

    tns-core-modules@next is giving me errors.

    GitHub | 6 months ago | hdeshev
    com.tns.NativeScriptException: Calling js method onCreateView failed TypeError: Cannot read property 'LayoutParams' of undefined File: "/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js, line: 507, column: 68 StackTrace: Frame: function:'ViewStyler.setNativeLayoutParamsProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 507, column: 69 Frame: function:'StylePropertyChangedHandler.applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1263, column: 14 Frame: function:'Style._applyStyleProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 1036, column: 25 Frame: function:'Style._applyProperty', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 999, column: 14 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 980, column: 14 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'onLayoutParamsChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 130, column: 11 Frame: function:'DependencyObservable._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 213, column: 13 Frame: function:'Style._onPropertyChanged', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 978, column: 45 Frame: function:'DependencyObservable._setValueInternal', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 307, column: 18 Frame: function:'DependencyObservable._setValue', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/dependency-observable.js', line: 133, column: 14 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/styling/style.js', line: 856, column: 18 Frame: function:'Object.defineProperty.set', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 521, column: 42 Frame: function:'Page._addViewToNativeVisualTree', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page.js', line: 102, column: 41 Frame: function:'eachChild', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 160, column: 61 Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/page/page-common.js', line: 286, column: 9 Frame: function:'View._onAttached', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 165, column: 18 Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view.js', line: 126, column: 18 Frame: function:'View._addView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/core/view-common.js', line: 1136, column: 14 Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 40, column: 11 Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/frame.js', line: 612, column: 13 Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.app/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.tns.NativeScriptException

      Calling js method onTouch failed TypeError: Cannot read property 'android' of undefined File: "/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js, line: 97, column: 40 StackTrace: Frame: function:'Page._showNativeModalView', file:'/data/data/package_name/files/app/tns_modules/ui/page/page.js', line: 138, column: 47 Frame: function:'Page.showModal', file:'/data/data/package_name/files/app/tns_modules/ui/page/page-common.js', line: 222, column: 18 Frame: function:'buscarCliente', file:'/data/data/package_name/files/app/views/abrir/ver-cotizacion/clonar/clonar.js', line: 99, column: 14 Frame: function:'_executeCallback', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 151, column: 27 Frame: function:'TapAndDoubleTapGestureListener.onSingleTapUp', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 171, column: 17 Frame: function:'GesturesObserver.androidOnTouchEvent', file:'/data/data/package_name/files/app/tns_modules/ui/gestures/gestures.js', line: 97, column: 41 Frame: function:'onTouch', file:'/data/data/package_name/files/app/tns_modules/ui/core/view.js', line: 113, column: 37

      at com.tns.Runtime.callJSMethodNative()
    2. com.tns
      Runtime.callJSMethod
      1. com.tns.Runtime.callJSMethodNative(Native Method)
      2. com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1022)
      3. com.tns.Runtime.callJSMethodImpl(Runtime.java:907)
      4. com.tns.Runtime.callJSMethod(Runtime.java:895)
      5. com.tns.Runtime.callJSMethod(Runtime.java:879)
      6. com.tns.Runtime.callJSMethod(Runtime.java:871)
      6 frames
    3. com.tns.gen
      View_OnTouchListener.onTouch
      1. com.tns.gen.android.view.View_OnTouchListener.onTouch(android.view.View$OnTouchListener.java)
      1 frame
    4. Android Platform
      ViewGroup.dispatchTouchEvent
      1. android.view.View.dispatchTouchEvent(View.java:8802)
      2. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      3. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      4. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      5. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      6. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      7. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      8. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      9. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      10. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      11. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      12. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      13. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      14. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      15. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      16. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2581)
      17. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
      17 frames
    5. Android
      PhoneWindow.superDispatchTouchEvent
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2607)
      2. com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1779)
      2 frames
    6. Android Platform
      Dialog.dispatchTouchEvent
      1. android.app.Dialog.dispatchTouchEvent(Dialog.java:765)
      1 frame
    7. Android
      PhoneWindow$DecorView.dispatchTouchEvent
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2568)
      1 frame
    8. Android Platform
      ActivityThread.main
      1. android.view.View.dispatchPointerEvent(View.java:9003)
      2. android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4209)
      3. android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4072)
      4. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3627)
      5. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3680)
      6. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3646)
      7. android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3763)
      8. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3654)
      9. android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3820)
      10. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3627)
      11. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3680)
      12. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3646)
      13. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3654)
      14. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3627)
      15. android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5910)
      16. android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5884)
      17. android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5855)
      18. android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6000)
      19. android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
      20. android.os.MessageQueue.nativePollOnce(Native Method)
      21. android.os.MessageQueue.next(MessageQueue.java:143)
      22. android.os.Looper.loop(Looper.java:122)
      23. android.app.ActivityThread.main(ActivityThread.java:5910)
      23 frames
    9. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    10. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
      2 frames