Xamarin.Android & Azure 推送通知内部服务器错误

Xamarin.Android & Azure Push Notifications Internal Server Error

我正在遵循 https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-android-get-started-push 上的指南(以及这似乎抄袭的原始 Xamarin 指南),但我 运行 在注册我的客户端时遇到了问题。

我在设置推送通知服务之前成功登录了用户。

GcmClient.CheckDevice(...)GcmClient.CheckManifest(...)都成功了,正在调用我的PushHandlerService。

Push.RegisterAsync(...) 在我的 PushHandlerService 中抛出 MobileServiceInvalidOperationException,因为它从服务收到 HTTP 500 内部服务器错误。

查看 FREB 日志,似乎 "error" 实际上应该是成功的,有趣的是它与 EasyAuthModule 有某种关系:

  1. NOTIFY_MODULE_COMPLETION ModuleName="EasyAuthModule_64bit", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="true", CompletionBytes="297", ErrorCode="操作成功完成。 (0x0)" 05:51:01.092

  2. Module_set_response_error_status 警告 ModuleName="EasyAuthModule_64bit", Notification="AUTHENTICATE_REQUEST", HttpStatus="500", HttpReason="Internal Server Error", HttpSubStatus="79", ErrorCode="Unspecified error (0x80004005)", ConfigExceptionInfo="" 05:51:01.092

  3. NOTIFY_MODULE_COMPLETION ModuleName="EasyAuthModule_64bit", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="true", CompletionBytes="0", ErrorCode="操作成功完成。 (0x0)" 05:51:01.092

我认为您调用 client.GetPush().RegisterAsync() 时发生了错误?这是当前的一个问题,我们正在 Azure 端部署修复程序来解决此问题。在此期间,您可以在此处查看对此的修复:https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter5/android/