-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
Describe the bug & problem
An exception without stacktrace occurs:
"No such proxy method: HuaweiMobileServices.Push.PushListenerWrapper.onNewToken(System.String, UnityEngine.AndroidJavaObject)"
The problem is that there is no apparent way to handle this exception in managed code and it drops the whole app.
To Reproduce
- Create new Unity project, install HMS plugin and add single "PushDemo" scene in the build settings.
- Build unity player and install it on a device with huawei services.
- Turn internet off (both mobile and wi-fi).
- Launch the app, see "Push Token: No message received" text on black screen.
- Connect with logcat.
- Turn internet on.
- See the exception in logcat.
Expected behavior
Exception is handled and either HmsPlugin.HMSPushKitManager.OnTokenFailure or OnTokenSuccess is called.
Environment:
- Unity Version 2021.3.43f1
- HMS Unity Plugin Version 2.3.9
Smartphone:
- Device: Huawei (HONOR 8X)
Additional context
There is no method onNewToken with matching signature in decompiled PushListenerWrapper, so the bold guess is that there is mistyped method name in native android code.
polyblank66