Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draw Over(Overlay) other apps not working in background and kill mode. #48301

Open
pchauhan opened this issue Dec 17, 2024 · 1 comment
Open
Labels
Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@pchauhan
Copy link

Description

previously we are using react-native -'0.73' , newArchEnabled= 'false' draw Over(Overlay) other app is working for foreground ,background and kill mode.
We did using native modules.

Now , when we upgrade to react-native -'0.76.5' newArchEnabled= 'true'.draw Over(Overlay) other app is not working in background and kill mode.

Steps to reproduce

1.Send FCM Notification.
2. keep your app in background and kill mode .you will get notification but not get overlay

React Native Version

0.76.5

Affected Platforms

Runtime - Android, Runtime - iOS

Areas

Other (please specify)

Output of npx react-native info

ext {
         buildToolsVersion = "35.0.0"
        minSdkVersion = 24
        compileSdkVersion = 35
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.24"
    }

Stacktrace or Logs

Exception in native call
                                                                                                    java.lang.RuntimeException: Could not invoke UIManager.createView
                                                                                                    	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:381)
                                                                                                    	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:146)
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
                                                                                                    Caused by: java.lang.reflect.InvocationTargetException
                                                                                                    	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:146) 
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method) 
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99) 
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230) 
                                                                                                    	at android.os.Looper.loop(Looper.java:319) 
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217) 
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0) 
                                                                                                    	at java.lang.Thread.run(Thread.java:1012) 
                                                                                                    Caused by: java.lang.AssertionError: Root node with tag 171 doesn't exist
                                                                                                    	at com.facebook.infer.annotation.Assertions.assertNotNull(Assertions.java:19)
                                                                                                    	at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:251)
                                                                                                    	at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:438)
                                                                                                    	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:146) 
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method) 
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99) 
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230) 
                                                                                                    	at android.os.Looper.loop(Looper.java:319) 
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217) 
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0) 
                                                                                                    	at java.lang.Thread.run(Thread.java:1012) 
2024-12-17 13:24:18.296 10777-10777 unknown:ReactNative     com.remindnmore.app                  E  Unable to launch redbox because react activity is not available, here is the error that redbox would've displayed: Could not invoke UIManager.createView
                                                                                                    
                                                                                                    null
                                                                                                    
                                                                                                    Root node with tag 171 doesn't exist

'Failed to print error: ', 'Exception in HostFunction: Could not enqueue microtask because they are disabled in this runtime'

Reproducer

https://snack.expo.dev/@paragzip/cranky-orange-pastry?platform=android

Screenshots and Videos

396391368-0108e206-5ccd-41b0-bfa6-38ac400593fa

@pchauhan pchauhan added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Dec 17, 2024
@shubhamguptadream11
Copy link
Collaborator

@pchauhan There is a same issue just closed by you as not planned.
Also, can you provide a sample reproducer here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

2 participants