Check by referring to this documents(Especially Step 3.d) and whether the AppGallery Connect configuration is correct.
Check whether appid in the agconnect-services.json file matches the package name. You can download a new JSON file.
The problem may be caused by the cache of the HMS Core (APK). Uninstall and update the HMS Core (APK), disconnect the network, connect the HMS Core (APK), and start the application again.
If the problem persists, provide a complete log for us to check.
Description
I trying get Push token as described in https://developer.huawei.com/consumer/en/doc/HMS-Plugin-Guides/apptoken-0000001050157797-V1, but evey time get the error.
I also builded an example from https://github.com/HMS-Core/hms-react-native-plugin/tree/master/react-native-hms-push/example (I changed package ID to registered in AppGallery Connect and added agconnect-services.json), but after press the button "Get Token" the error message appeared again.
Expected behavior
Display alert with Token
Current behavior
Display alert with error message:
[getToken] Error/Exception: {"framesToPop": 1, "nativeStackAndroid": [], "userInfo": null, "code": "907122045", "line": 15, "column": 1745, "sourceURL": "index.android.bundle"}
Screenshots
Logs
Logs from logcat:
Environment
Huawei Nova i5 HMS Core 6.6.0.332 @hmscore/react-native-hms-push: 6.5.0-300
System: OS: macOS 12.5 Shell: 3.2.57 - /bin/bash Binaries: Node: 18.5.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.5.5 - /usr/local/bin/npm Watchman: 2022.07.04.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 28, 29, 30, 31 Build Tools: 28.0.3, 30.0.2, 30.0.3, 31.0.0, 32.0.0 IDEs: Android Studio: Chipmunk 2021.2.1 Patch 2 Chipmunk 2021.2.1 Patch 2 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 1.8.0_312 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.67.4 => 0.67.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Other Add any other context about the problem here