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] Push notification token registration fails for chat #1314

Open
3 tasks done
sasatarbuk opened this issue Feb 25, 2023 · 0 comments
Open
3 tasks done

[BUG] Push notification token registration fails for chat #1314

sasatarbuk opened this issue Feb 25, 2023 · 0 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@sasatarbuk
Copy link

Describe the bug
Chat push notifications are not being received due to token registration failure.

Exception or Stack Trace

219461 [main] DEBUG com.azure.android.communication.chat.implementation.notifications.fcm.PushNotificationClient  - device_id: fV8hPgbMSF2JVN58kFM9r6:APA91bFU84YtTrvS1GLc7ZVC1_SI9zWUDwSUj8mrXTNY0F1cKU7N4pZTgSwqGmA43B8LrhkUzLCfXfjUtqkVwU_gUomgUheMNjFqWdxNrqVBUoQodW0HiTZIpqmGfw452LWxqzNrd7hH
219464 [main] INFO com.azure.android.communication.chat.implementation.notifications.fcm.PushNotificationClient  - Successfully started push notifications!
219465 [main] INFO com.azure.android.communication.chat.implementation.notifications.fcm.PushNotificationClient  - Initialize RegistrationRenewalWorker in background
220310 [main] INFO com.azure.android.communication.chat.implementation.notifications.fcm.PushNotificationClient  - Renew token succeeded
220310 [androidx.work-4] INFO com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationRenewalWorker  - RegistrationRenewalWorker execution in background: 0
220313 [androidx.work-4] DEBUG com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationRenewalWorker  - DirectoryPath is
220314 [androidx.work-4] INFO com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationKeyManager  - Refresh credentials
220320 [androidx.work-4] ERROR com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationRenewalWorker  - For input string: "AdalKey"
java.lang.NumberFormatException: For input string: "AdalKey"
	at java.lang.Integer.parseInt(Integer.java:615)
	at java.lang.Integer.parseInt(Integer.java:650)
	at com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationKeyManager.extractIndex(RegistrationKeyManager.java:160)
	at com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationKeyManager.rotateKeys(RegistrationKeyManager.java:171)
	at com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationKeyManager.refreshCredentials(RegistrationKeyManager.java:146)
	at com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationRenewalWorker.refreshCredentials(RegistrationRenewalWorker.java:107)
	at com.azure.android.communication.chat.implementation.notifications.fcm.RegistrationRenewalWorker.doWork(RegistrationRenewalWorker.java:81)
	at androidx.work.Worker$1.run(Worker.java:86)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)

To Reproduce
Steps to reproduce the behavior:

  • Initialize work manager with RegistrationRenewalWorkerFactory.

Code Snippet

WorkManager.initialize(
    applicationContext,
    Configuration.Builder().setWorkerFactory(
        RegistrationRenewalWorkerFactory(credential) { it.printStackTrace() }
    ).build(),
)

Expected behavior
Firebase token should be registered with the Notification Hub.

Screenshots
N/A

Setup (please complete the following information):

  • OS: Android 10, Android 13
  • IDE: Android Studio
  • Library: com.azure.android:azure-communication-chat:2.0.0

Additional context
N/A

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant