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

[Bug]: Android device not registered on initialization (Android v12 and older) #931

Closed
2 of 3 tasks
swebSi opened this issue Oct 9, 2023 · 4 comments
Closed
2 of 3 tasks

Comments

@swebSi
Copy link

swebSi commented Oct 9, 2023

What happened?

We are using Angular + Capacitor v5 with OneSignal 5.0.2.
After calling OneSignal.initialize - Android devices are not visible under subscriptions.
With the same codebase iOS devices are correctly registered.

Reverting the library to v3.3.1 works as expected.

Steps to reproduce?

1. Upgrade to v5.0.2
2. Call OneSignal.initialize as per documentation
3. Observe subscription list in oneSignal dashboard

What did you expect to happen?

I expect to see my client registered in order to send push notifications.

OneSignal Cordova SDK version

5.0.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jennantilla
Copy link
Contributor

@swebSi thanks for reaching out!

Are you prompting your users at all?

In your initialization code, we suggest either including our requestPermission method or using an In-App Message to prompt for notification permission.

If you are still having issues, can you please send over your device logs so we can take a closer look?

Thanks!

@swebSi
Copy link
Author

swebSi commented Oct 11, 2023

Hi @jennantilla,

yes, of course I am prompting the users after Onesignal. initialize. Also, we are testing on devices without Android 13 which have automatically subscribed notifications. Same codebase on iOS works as expected.
Reverting back to v3.3.1 with the same workflow, devices are registered without an issue.

Added verbose log with a clean angular project.
log-level-6.txt

@swebSi swebSi closed this as completed Oct 11, 2023
@swebSi swebSi reopened this Oct 11, 2023
@swebSi
Copy link
Author

swebSi commented Oct 16, 2023

Hi @jennantilla ,
this seems to be an issue only on Android devices prior to Android 13. Testing the same flow with Android 13 device works as expected.

update: Only physical device with angular < 13 have this issues. Emulator is correctly registered. We tested on devices with android 8, 10 & 12.

@swebSi swebSi changed the title [Bug]: Android device not registered on initialisation [Bug]: Android device not registered on initialization (Android v12 and older) Dec 11, 2023
@swebSi
Copy link
Author

swebSi commented Dec 13, 2023

On devices with android 12 or older, its was required to call OneSignal.User.setLanguage();

[DefaultDispatcher-worker-6] HttpClient: POST RECEIVED JSON: {"errors":[{"title":"The provided language value is not a supported ISO 639-1 value"}]}

@swebSi swebSi closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants