Skip to content

Setting automationText to a number crashes the app on Android #3064

Closed

Description

@vchimev

Which platform does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • Cross-platform modules: 2.4.0 RC

Please tell us how to recreate the issue in as much detail as possible.

If you set the automationText property to a number, the app crashes on Android.

Is there code involved?

<Button text="test" automationText="11" />

Output

11-10 19:36:50.484 11245 11245 W System.err: com.tns.NativeScriptException: 
11-10 19:36:50.484 11245 11245 W System.err: Calling js method onCreateView failed
11-10 19:36:50.484 11245 11245 W System.err: 
11-10 19:36:50.484 11245 11245 W System.err: Error: Cannot convert number to Ljava/lang/CharSequence; at index 0
11-10 19:36:50.484 11245 11245 W System.err: File: "/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js, line: 16, column: 21
11-10 19:36:50.484 11245 11245 W System.err: 
11-10 19:36:50.484 11245 11245 W System.err: StackTrace: 
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'onAutomationTextPropertyChanged', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 16, column: 22
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'ProxyObject._trySetNativeValue', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/proxy.js', line: 98, column: 27
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'eachPropertyCallback', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/proxy.js', line: 68, column: 18
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'DependencyObservable._eachSetProperty', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/dependency-observable.js', line: 253, column: 18
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'ProxyObject._syncNativeProperties', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/proxy.js', line: 71, column: 14
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'View._syncNativeProperties', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view-common.js', line: 1281, column: 48
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'eachChild', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 167, column: 23
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'LayoutBase._eachChildView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/layouts/layout-base-common.js', line: 150, column: 22
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'View._onAttached', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 170, column: 18
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'eachChild', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 162, column: 23
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'LayoutBase._eachChildView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/layouts/layout-base-common.js', line: 150, column: 22
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'View._onAttached', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 170, column: 18
11-10 19:36:50.484 11245 11245 W System.err: 	Frame: function:'eachChild', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 162, column: 23
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'ContentView._eachChildView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/content-view/content-view.js', line: 66, column: 13
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'Page._eachChildView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/page/page-common.js', line: 291, column: 41
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'View._onAttached', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 170, column: 18
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'View._addViewCore', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view.js', line: 129, column: 18
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'View._addView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/core/view-common.js', line: 1195, column: 14
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'onFragmentShown', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/frame/frame.js', line: 44, column: 11
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'FragmentCallbacksImplementation.onCreateView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/frame/frame.js', line: 655, column: 13
11-10 19:36:50.485 11245 11245 W System.err: 	Frame: function:'FragmentClass.onCreateView', file:'/data/data/org.nativescript.apps/files/app/tns_modules/ui/frame/fragment.js', line: 23, column: 38
11-10 19:36:50.485 11245 11245 W System.err: 
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.Runtime.callJSMethodNative(Native Method)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1022)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.Runtime.callJSMethodImpl(Runtime.java:907)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:895)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:879)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:871)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.tns.FragmentClass.onCreateView(android.app.Fragment.java)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.Fragment.performCreateView(Fragment.java:2352)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:995)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.BackStackRecord.run(BackStackRecord.java:815)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.FragmentManagerImpl$1.run(FragmentManager.java:483)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.os.Handler.handleCallback(Handler.java:751)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:95)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.os.Looper.loop(Looper.java:154)
11-10 19:36:50.485 11245 11245 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
11-10 19:36:50.485 11245 11245 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
11-10 19:36:50.485 11245 11245 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
11-10 19:36:50.488 11245 11245 W JS      : The application crashed because of an uncaught exception. You can look at "stackTrace" or "nativeException" for more detailed information about the exception.
11-10 19:36:50.488 11245 11245 V JS      : ### NativeScriptError: Error: The application crashed because of an uncaught exception. You can look at "stackTrace" or "nativeException" for more detailed information about the exception.

Activity

  1. self-assigned this
    on Nov 21, 2016
  2. added this to the 2.5.0 milestone on Nov 21, 2016
  3. added a commit that references this issue on Nov 21, 2016
    b42fc7f
  4. lock commented on Aug 29, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked and limited conversation to collaborators on Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions