Skip to content

[question]: Getting error code 907135701 when requesting for the Huawei push token #724

@pongloongyeat

Description

@pongloongyeat

How can we help?

I am getting error code 907135701 when attempting to fetch Huawei push token. The following are my build.gradle files:

In the build.gradle file:

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
        maven { url 'https://developer.huawei.com/repo/' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.huawei.agconnect:agcp:1.6.5.300'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://developer.huawei.com/repo/' }
    }
}

In the app level build.gradle:

...

apply plugin: 'com.huawei.agconnect'

...

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.huawei.hms:push:6.3.0.304'
}

app.dart:

class _AppState extends State<App> {
  @override
  void initState() {
    super.initState();
    _initialiseOneSignal();
  }

  Future<void> _initialiseOneSignal() async {
    await OneSignal.Debug.setLogLevel(OSLogLevel.verbose);
    OneSignal.initialize(...);
    await OneSignal.Notifications.requestPermission(true);
  }
}

What is observed:

  • Device is unable to subscribe
    image

Additional helpful logs:

09-01 15:04:12.006 27017 27017 I HMSSDK_HmsClient: receive msg status_code:0, error_code:907135701, api_name:push.gettoken, app_id:...|, pkg_name:com.package.name, session_id:*, transaction_id:..., resolution:null
09-01 15:04:12.010 27017 27017 I HMSSDK_TaskApiCall: doExecute, uri:push.gettoken, errorCode:907135701, transactionId:...
09-01 15:04:12.011 27017 27017 E HMSSDK_HmsInstanceId: TokenTask failed, ErrorCode:907135701
09-01 15:04:12.017 27017 27017 I HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
09-01 15:04:12.020 27017 27017 I HMSSDK_RequestManager: removeReqByTransId
09-01 15:04:12.022 27017 27175 I HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
09-01 15:04:12.025 27017 27175 E OneSignal: HMS ApiException getting Huawei push token!
09-01 15:04:12.025 27017 27175 E OneSignal: com.huawei.hms.common.ApiException: 907135701: scope list empty

What I've tried:

  • Huawei documentation asks to check the following:
    1. Verify that your phone has Internet access. (Yes, it can access the internet)
    2. Verify that the current app has been created and has applied for related services. (PushKit is enabled for the project)
  • Contacted Huawei support, which asked me to:
    • enable Precise Messaging on PushKit, which did not resolve the issue
    • set the app ID to the client ID when requesting for the Huawei Push token. Is this possible?

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions