Closed ueman closed 1 month ago
Same here, we found out it happens on some Samsung devices
Unless you can provide some way to reproduce this then it'll be difficult to find out what's going on. Out of interest, what's the earliest version of the plugin that the app used?
I'm currently on vacation, but I'll try to get some more details when I'm back next week
We're using the plugin for two years already. Not sure, what the first version with the issue is, though.
We still get the issue with the current, latest version (17.1.2
):
PlatformException(getNotificationChannelsError, Unable to find resource ID #0x7f14000a, android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f14000a
at android.content.res.ResourcesImpl.getResourceEntryName(ResourcesImpl.java:412)
at android.content.res.Resources.getResourceEntryName(Resources.java:2229)
at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.getMappedNotificationChannel(FlutterLocalNotificationsPlugin.java:170)
at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.getNotificationChannels(FlutterLocalNotificationsPlugin.java:32)
at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(FlutterLocalNotificationsPlugin.java:399)
at ne.j$a.a(MethodChannel.java:18)
at be.c.l(DartMessenger.java:19)
at be.c.m(DartMessenger.java:42)
at be.c.i(Unknown Source:0)
at be.b.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8349)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
, null)
It happens on a Huawei Mate 20 Pro (LYA-AL00) for example. The app is in the foreground when it happens. The app is installed via Google Play.
We're using the plugin for two years already. Not sure, what the first version with the issue is, though.
My question was asking about the earliest/first version of the plugin that your app uses in general. That is, it's not about the first version with this issue. Presumably, the app you're working on is in source control that this can be looked up
It happens on a Huawei Mate 20 Pro (LYA-AL00) for example. The app is in the foreground when it happens. The app is installed via Google Play.
Is your app using a custom sound? Do you by chance have access to a device that can reproduce the issue to see if it can be reproduced with the example app?
Note asking these questions as I suspect there's two possible issues but not sure what's the cause
If you're able to help out, you could try forking to put in a fix and submit a PR back. I suspect the fix of sorts is to catch the exception thrown when calling https://github.com/MaikuB/flutter_local_notifications/blob/5375645b01c845998606b58a3d97b278c5b2cefa/flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java#L2068 such that the code soundSource
is same but sound
is null
My question was asking about the earliest/first version of the plugin that your app uses in general. That is, it's not about the first version with this issue. Presumably, the app you're working on is in source control that this can be looked up
The earliest version we were using is flutter_local_notifications: ^9.7.1
.
Is your app using a custom sound? Do you by chance have access to a device that can reproduce the issue to see if it can be reproduced with the example app?
No, we don't use custom sounds. Unfortunately, we only see this issue in prod, not on our test devices. We use a custom icon though: AndroidInitializationSettings('ic_notification');
Sounds more like an issue with IDs changing after an app is updated then. Are you able to try make a fork with the changes I mentioned to see if it fixes the issue and submit a PR back? Would say that's the best way to confirm
We would like to try out the following: https://github.com/Goddchen/flutter_local_notifications/commit/a6316c18246ede6f685cb06bafccb12c069ec7ec Fine with you?
@lColinDl makes sense to me. Have you been running into this issue yourself? It should at least catch the exception and allow data to be returned back
Have you been running into this issue yourself?
@ueman and me are working on the same project. So no, I also cannot reproduce this myself. But we will try out the fix mentioned above and come back to you.
PR incoming -> #2406
Closing this as @Goddchen's PR has been merged and released as part of 17.2.3. Thanks!
Describe the bug
The following code
results in the following exception
To Reproduce Unfortunately, we're seeing this only in production without any actionable reproduction steps. The app is in foreground and active though.
Expected behavior I expect no exception to be thrown.
Sample code to reproduce the problem See above