-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.2.0
- Cross-platform modules:
- tns-android: 6.2.0
- Android Runtime:
- Devices with Android 8, 9, and 10.
Describe the bug
Changing accessibility font-size within the context of a BottomNavigation causes a runtime error.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onStart failed
System.err: Error: java.lang.IllegalArgumentException: No view found for id 0x2 (unknown) for fragment FragmentBase_vendor_15352_26_TabFragmentImplementation{54a9e51 #1 id=0x2 android:bottomnavigation:2:1}
System.err:
System.err: StackTrace:
System.err: BottomNavigation.commitCurrentTransaction(file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:347:37)
System.err: at BottomNavigation.changeTab(file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:361:13)
System.err: at BottomNavigation.onLoaded(file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:289:13)
System.err: at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:312:89)
System.err: at ViewBase.callFunctionWithSuper(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:305:8)
System.err: at ViewBase.callLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:312:13)
System.err: at ViewBase.loadView(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:440:17)
System.err: at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:234:18)
System.err: at ContentView.eachChildView(file:///node_modules/@nativescript/core/ui/content-view/content-view.js:70:12)
System.err: at PageBase.eachChildView(file:///node_modules/@nativescript/core/ui/page/page-common.js:126:39)
System.err: at ViewCommon.eachChild(file:///node_modules/@nativescript/core/ui/core/view/view-common.js:1010:13)
System.err: at ViewBase.onLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:233:13)
System.err: at View.onLoaded(file:///node_modules/@nativescript/core/ui/core/view/view.js:247:34)
System.err: at Page.onLoaded(file:///node_modules/@nativescript/core/ui/page/page.js:43:34)
System.err: at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:312:89)
System.err: at ViewBase.callFunctionWithSuper(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:305:8)
System.err: at ViewBase.callLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:312:13)
System.err: at ViewBase.loadView(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:440:17)
System.err: at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:234:18)
System.err: at FrameBase.eachChildView(file:///node_modules/@nativescript/core/ui/frame/frame-common.js:422:12)
System.err: at ViewCommon.eachChild(file:///node_modules/@nativescript/core/ui/core/view/view-common.js:1010:13)
System.err: at ViewBase.onLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:233:13)
System.err: at View.onLoaded(file:///node_modules/@nativescript/core/ui/core/view/view.js:247:34)
System.err: at FrameBase.onLoaded(file:///node_modules/@nativescript/core/ui/frame/frame-common.js:87:34)
System.err: at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:312:89)
System.err: at ViewBase.callFunctionWithSuper(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:305:8)
System.err: at ViewBase.callLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:312:13)
System.err: at ActivityCallbacksImplementation.onStart(file:///node_modules/@nativescript/core/ui/frame/frame.js:872:21)
System.err: at NativeScriptActivity.onStart(file:///node_modules/@nativescript/core/ui/frame/activity.js:29:24)
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1160)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1138)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1134)
System.err: at com.tns.NativeScriptActivity.onStart(NativeScriptActivity.java:29)
System.err: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1514)
System.err: at android.app.Activity.performStart(Activity.java:7838)
System.err: at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3398)
System.err: at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
System.err: at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
System.err: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2109)
System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
System.err: at android.os.Looper.loop(Looper.java:214)
System.err: at android.app.ActivityThread.main(ActivityThread.java:7682)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
System.err: Caused by: java.lang.IllegalArgumentException: No view found for id 0x2 (unknown) for fragment FragmentBase_vendor_15352_26_TabFragmentImplementation{54a9e51 #1 id=0x2 android:bottomnavigation:2:1}
System.err: at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1454)
System.err: at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
System.err: at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
System.err: at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802)
System.err: at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
System.err: at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
System.err: at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
System.err: at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2243)
System.err: at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:654)
System.err: ... 21 moreTo Reproduce
- Download the sample-project zip.
- Unzip and install dependencies
- run:
tns debug android - Tap press "tap to login" and get navigated to the actual tab-navigation.
- Switch to any tab
- Change font-size either from Settings or use adb command: adb shell settings put system font_scale 1.5
- Go to desktop or another app and return
- Observe crash
Expected behavior
Application should resize the text and not crash afterwards.
Sample project
Additional context
The bug was first issued to @nota/nativescript-accessibility-ext plugin but the author @m-abs of the plugin found logs pointing towards NativeScript upstream
Notalib/nativescript-accessibility-ext#40