-
Notifications
You must be signed in to change notification settings - Fork 62
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] Hub.Register() Errors in Release, works fine in Debug #171
Comments
Howdy - I've seen reports of similar issues. In those cases, the Xamarin.Android Release profile was using a code shrinker that was more (read: too) aggressive than the Debug profile. To see if this is your issue, you'll need to ensure that the proguard configuration file is setup to not strip out anything in the com.microsoft.windowsazure.messaging.notificationhubs namespace. Something like:
|
Apologies for a slow reply. I'll look to try this today; as far as I was aware however I don't believe I had a code shrinker set on the release build. But it wouldn't surprise me if there was something strange going on under the hood of the release build so I'll investigate further and report back. |
So I actually set the R8 shrinker to run as it was set to blank, that's produced the following error:
I can see that there's a reference to a status code this time and a 400 error. Any thoughts on what could be causing that because as far as I know this is all set up exactly as it should be based on the Microsoft documentation. |
Also not sure if it's relevant but while looking at logcat I get the following warning just after the above error:
|
Describe the bug
In a Xamarin Forms project implementing the Azure Notification Hub throws an exception in release mode that it does not exhibit during debugging that causes remote PNS registrations to fail.
Exception or Stack Trace
To Reproduce
Simply run the example project for Xamarin Forms focusing on the android platform, switch to release mode and look out for the errors in the logcat.
Code Snippet
FireBaseService in the Android Native project:
Android Manifest:
Expected behavior
I would expect this to register the device with the notification hub and be visible as a registration in Service Bus Explorer.
Setup (please complete the following information):
Xamarin.Azure.NotificationHubs.Android
Version: 1.1.3
The text was updated successfully, but these errors were encountered: