Native App after login raise an error: JSApplicationIllegalArgumentException: Could find root view for a given ancestor with tag 279

0
I’ve created a project with Blank Native Template. And made these change: Change the Home Page of the native profile to the Login Page. Change the security to Prototype/demo And then click menu “App” → “Build Native Mobile App”. Choose “Config App for local building”. Generated the source into one folder. And then go to the folder, run “npm i”, “npm run configure”. Then open the android app in Android Studio. After the app run in the phone, and typed in the username and password. from the log I see the login is success. But after login an error is raised: 2023-09-04 16:46:03.543 30025-30103 unknown:ReactNative myapp.nativetest01 W Warning : attempted to resolve a non-existent react shadow node. reactTag=279 2023-09-04 16:46:03.553 30025-30103 AndroidRuntime myapp.nativetest01 E FATAL EXCEPTION: mqt_native_modules Process: myapp.nativetest01, PID: 30025 com.facebook.react.bridge.JSApplicationIllegalArgumentException: Could find root view for a given ancestor with tag 279 at com.swmansion.gesturehandler.react.RNGestureHandlerModule.tryInitializeHandlerForReactRootView(RNGestureHandlerModule.java:577) at com.swmansion.gesturehandler.react.RNGestureHandlerModule.attachGestureHandler(RNGestureHandlerModule.java:487) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188) at com.facebook.jni.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) at android.os.Looper.loop(Looper.java:214) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228) at java.lang.Thread.run(Thread.java:919) 2023-09-04 16:46:03.554 30025-30102 ReactNativeJS myapp.nativetest01 D [Navigation] Navigation stack was changed with action: { "type": "Navigation/NAVIGATE", "routeName": "SideBarStack", "action": { "type": "Navigation/PUSH", "routeName": "DefaultPageWithoutBottomBar", "params": { "formId": "form_eoe_7", What can I do to fix this error? Thanks
asked
1 answers
0

Found the reason. No need to manually open a page after login. The desired home page will be show after user login, according to the user’s role

answered