OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
625 stars 215 forks source link

[Bug]: Permission Not Granted #900

Closed arabnology closed 4 months ago

arabnology commented 5 months ago

What happened?

I'm using OneSignal 5.2.0. The problem with this package on Android is that it always shows "Permission Not Granted" on the OneSignal dashboard, even though I have accepted the permission and successfully called the optIn() function. The user appears on the dashboard but with the status "Permission Not Granted," and they do not receive any notifications. The app is in release mode but has not been published in the Google Play Store. Note: The same user logged in on multiple devices, like iOS device and other Android devices.

Tested on Android platform only.

Steps to reproduce?

1. Add OneSignal 5.2.0 package to pubspec.yaml
2. Init OneSignal
3. Login the user with Id on multiple devices and in release mode
4. Call optIn() function
5. Try to send a notification to that user

What did you expect to happen?

I'm expecting to successfully receive any notifications sent to that user.

OneSignal Flutter SDK version

5.2.0

Which platform(s) are affected?

Relevant log output

No log, everything ok in log section.

Code of Conduct

jkasten2 commented 5 months ago

@arabnology thanks for reporting, could you enable OneSignal Verbose logging and share your Android logcat? We are mainly looking for what REST API calls are being made to see where the issue is.

arabnology commented 5 months ago

@arabnology thanks for reporting, could you enable OneSignal Verbose logging and share your Android logcat? We are mainly looking for what REST API calls are being made to see where the issue is.

Ok, I will. Please keep in mind that I have also tested it in debug mode on Android simulator and physical device, it was working perfectly in debug mode, but it is not working in release mode.

ydolzhenko commented 5 months ago

I have the similar behaviour - it doesn't work when same user/external_id is being used for another subscription (on ios). when it's a brand new user - it looks like things work as expected.

wasilni2022 commented 4 months ago

This bug will take forever to be fixed by the team! OneSignal, we trusted you at first, and now you left us at this risky time ?!

We need a fix, we can't release our app because this is a critical issue!

jkasten2 commented 4 months ago

The issue on Android when accepting notification permissions around the same time as calling OneSignal.login() was fixed this week on the OneSignal backed.

@ydolzhenko there isn't currently a known issue with iOS with this, could you open an new issue with additional details?