Skip to content

No such proxy method: HuaweiMobileServices.Push.PushListenerWrapper.onNewToken #527

@lar3811

Description

@lar3811

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

  1. Create new Unity project, install HMS plugin and add single "PushDemo" scene in the build settings.
  2. Build unity player and install it on a device with huawei services.
  3. Turn internet off (both mobile and wi-fi).
  4. Launch the app, see "Push Token: No message received" text on black screen.
  5. Connect with logcat.
  6. Turn internet on.
  7. 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions