Search Issue Tracker
By Design
Votes
0
Found in
2022.3.17f1
Issue ID
UUM-60029
Regression
No
A "java.lang.RuntimeException: Failed to determine Activity to be opened when tapping notification" error is being thrown and prevents notifications from the app to appear when running on Android
How to reproduce:
1. Open the attached “IN-63561.zip” Project
2. Connect any Android Phone
3. Build and Run
4. Tap 3 times in the top-left corner of the screen
5. Observe the console errors on the device
Expected result: No errors are being thrown
Actual result: “AndroidJavaException: java.lang.RuntimeException: Failed to determine Activity to be opened when tapping notification” error is thrown
Reproducible with: 2022.3.17f1
Couldn’t test with: 2021.3.34f1(Compilation errors due to downgrade), 2023.2.5f1, 2023.3.0b2 (TMP errors due to deprecation causing some functions to not work)
Testing environment: Windows 11
Reproducible on:
VLNQA00122, Samsung Galaxy S9 (SM-G960F), Android 10, CPU: Exynos 9 (9810), GPU: Mali-G72
VLNQA00341, Samsung Galaxy Note20 Ultra 5G (SM-N986B), Android 11, CPU: Exynos 990, GPU: Mali-G77
VLNQA00517, Oneplus OnePlus 10 Pro 5G (NE2213), Android 12, CPU: Snapdragon 8 Gen 1 (SM8450), GPU: Adreno (TM) 730
VLNQA00520, Samsung Galaxy S22 (SM-S901U), Android 12, CPU: Snapdragon 8 Gen 1 (SM8450), GPU: Adreno (TM) 730
VLNQA00531, Oneplus OnePlus 11 5G (CPH2449), Android 13, CPU: Snapdragon 8 Gen 2 (SM8550), GPU: Adreno (TM) 740
VLNQA00591, Samsung Galaxy S23 (SM-S911B), Android 13, CPU: Snapdragon 8 Gen 2 (SM8550), GPU: Adreno (TM) 740
Couldn’t test with:
VLNQA00411 - Galaxy Z Fold3 5G (SM-F926B), CPU: Snapdragon 888, GPU: Adreno 660, OS: 11 - App Crashes on opening
Full error message:
java.lang.RuntimeException: Failed to determine Activity to be opened when tapping notification
com.unity.androidnotifications.UnityNotificationManager.initialize(UnityNotificationManager.java:119)
com.unity.androidnotifications.UnityNotificationManager.getNotificationManagerImpl(UnityNotificationManager.java:142)
com.unity3d.player.UnityPlayer.nativeRender(Native Method)
com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(Unknown Source:0)
com.unity3d.player.UnityPlayer$F$a.handleMessage(Unknown Source:122)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loopOnce(Looper.java:226)
android.os.Looper.loop(Looper.java:313)
com.unity3d.player.UnityPlayer$F.run(Unknown Source:24)
UnityEngine.AndroidJNISafe.CheckException () (at /home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJNISafe.cs:24)
UnityEngine.AndroidJNISafe.CallStaticObjectMethod (System.IntPtr clazz, System.IntPtr methodID, System.Span`1[T] args) (at /home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJNISafe.cs:237)
UnityEngine.AndroidJavaObject._CallStatic[ReturnType] (System.IntPtr methodID, System.Object[] args) (at /home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:878)
UnityEngine.AndroidJavaObject._CallStatic[ReturnType] (System.String methodName, System.Object[] args) (at /home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:836)
UnityEngine.AndroidJavaObject.CallStatic[ReturnType] (System.String methodName, System.Object[] args) (at /home/bokken/build/output/unity/unity/Modules/AndroidJNI/AndroidJava.cs:530)
Unity.Notifications.Android.AndroidNotificationCenter.Initialize () (at ./Library/PackageCache/com.unity.mobile.notifications@2.2.2/Runtime/Android/AndroidNotificationCenter.cs:653)
Unity.Notifications.Android.AndroidNotificationCenter.RegisterNotificationChannel (Unity.Notifications.Android.AndroidNotificationChannel channel) (at ./Library/PackageCache/com.unity.mobile.notifications@2.2.2/Runtime/Android/AndroidNotificationCenter.cs:861)
NotificationController.ManageAndroidNotificationChannel () (at C:/Projects/Gazebo/Assets/_Cha/Scripts/Notifications/NotificationController.cs:76)
NotificationController.Initialize () (at C:/Projects/Gazebo/Assets/_Cha/Scripts/Notifications/NotificationController.cs:16)
Cha.Controller.Awake () (at C:/Projects/Gazebo/Assets/_Cha/Scripts/Bases/Controller.cs:7)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
This error is thrown when activity is not setup in notification settings and application has more than one activity with either both regular and GameActivity Unity activities enabled or neither.
This failure is by design, otherwise it would lead to bugs that are only reproducible when notification arrives with app not running nor in background.