- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近在华为手机上试用了我的应用程序。
问题是 PushKit 不返回 token 和 getToken
结果为空。
在日志中我得到 GetTokenTask receive a empty token, please check HmsMessageService.onNewToken receive result.
, 但是 onNewToken
中没有给出 token 任何一个。
检索 token 的代码:
GlobalScope.launch(context = Dispatchers.IO) {
try {
val appId = AGConnectServicesConfig.fromContext(this@MainActivity).getString("client/app_id")
val token = HmsInstanceId.getInstance(this@MainActivity).getToken(appId, "HCM")
Pulp.debug("Huawei", "Token received") {
"token" to token
}
} catch (e: java.lang.Exception) {
Pulp.error("Huawei", "Failed to fetch token", e) {
"Cause" to (e.message ?: "Empty")
}
}
}
结果也不异常(exception)。但是 token 是空的(请参阅日志的最后一行)。
HMSService
中的代码:
override fun onNewToken(token: String?) {
super.onNewToken(token)
Pulp.debug("Huawei", "(onNewToken): Huawei messaging token received") {
"Token" to (token ?: "NO token")
}
}
来自
auto_init
的完整日志到 token 请求:
2020-09-16 15:33:50.791 19954-19954/ir.malv.plusdependencytest I/HMSSDK_AutoInit: Push init start
2020-09-16 15:33:50.854 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HMSBIInitializer: Builder->biInitFlag :false
2020-09-16 15:33:50.856 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HMSBIInitializer: Builder->biSetting :false
2020-09-16 15:33:50.859 19954-19954/ir.malv.plusdependencytest I/HMSSDK_CountryCodeBean: getCountryCode get country code from SIM_COUNTRY
2020-09-16 15:33:50.863 19954-19954/ir.malv.plusdependencytest W/HMSSDK_CountryCodeBean: countryCode from system language is not reliable.
2020-09-16 15:33:50.864 19954-19954/ir.malv.plusdependencytest E/HMSSDK_HMSBIInitializer: Failed to get device issue country
2020-09-16 15:33:50.909 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HMSPackageManager: Succeed to find HMS apk: com.huawei.hwid version: 40100308
2020-09-16 15:33:50.934 19954-20000/ir.malv.plusdependencytest I/HMSSDK_HMSBIInitializer: Builder->biInitFlag :false
2020-09-16 15:33:50.936 19954-20000/ir.malv.plusdependencytest I/HMSSDK_HMSBIInitializer: Builder->biSetting :false
2020-09-16 15:33:50.936 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HMSBIInitializer: Builder->biInitFlag :false
2020-09-16 15:33:50.937 19954-20000/ir.malv.plusdependencytest I/HMSSDK_CountryCodeBean: getCountryCode get country code from SIM_COUNTRY
2020-09-16 15:33:50.938 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HMSBIInitializer: Builder->biSetting :false
2020-09-16 15:33:50.939 19954-20000/ir.malv.plusdependencytest W/HMSSDK_CountryCodeBean: countryCode from system language is not reliable.
2020-09-16 15:33:50.940 19954-20000/ir.malv.plusdependencytest E/HMSSDK_HMSBIInitializer: Failed to get device issue country
2020-09-16 15:33:50.953 19954-20000/ir.malv.plusdependencytest I/HMSSDK_HiAnalyticsUtils: issueCountry initial
2020-09-16 15:33:50.953 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HiAnalyticsUtils: issueCountry initial
2020-09-16 15:33:50.954 19954-20000/ir.malv.plusdependencytest I/HMSSDK_CountryCodeBean: getCountryCode get country code from SIM_COUNTRY
2020-09-16 15:33:50.954 19954-19954/ir.malv.plusdependencytest I/HMSSDK_CountryCodeBean: getCountryCode get country code from SIM_COUNTRY
2020-09-16 15:33:50.956 19954-19954/ir.malv.plusdependencytest W/HMSSDK_CountryCodeBean: countryCode from system language is not reliable.
2020-09-16 15:33:50.956 19954-20000/ir.malv.plusdependencytest W/HMSSDK_CountryCodeBean: countryCode from system language is not reliable.
2020-09-16 15:33:50.956 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HiAnalyticsUtils: not ChinaROM
2020-09-16 15:33:50.956 19954-20000/ir.malv.plusdependencytest I/HMSSDK_HiAnalyticsUtils: not ChinaROM
2020-09-16 15:33:50.959 19954-20000/ir.malv.plusdependencytest I/HMSSDK_HiAnalyticsUtils: hw_app_analytics_state value is 0
2020-09-16 15:33:50.959 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HiAnalyticsUtils: hw_app_analytics_state value is 0
2020-09-16 15:33:50.960 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HmsMessaging: invoke turnOnPush
2020-09-16 15:33:50.963 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HmsMessaging: turn on/off with AIDL
2020-09-16 15:33:50.970 19954-20004/ir.malv.plusdependencytest I/HMSSDK_HuaweiApiManager: sendRequest
2020-09-16 15:33:50.971 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: ====== HMSSDK version: 50000301 ======
2020-09-16 15:33:50.972 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: Enter connect, Connection Status: 1
2020-09-16 15:33:50.973 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: connect minVersion:30000000
2020-09-16 15:33:50.975 19954-20004/ir.malv.plusdependencytest I/HMSSDK_Util: available exist: true
2020-09-16 15:33:50.976 19954-20004/ir.malv.plusdependencytest E/HMSSDK_Util: In isAvailableLibExist, Failed to read meta data for the availableLoaded.
2020-09-16 15:33:50.977 19954-20004/ir.malv.plusdependencytest I/HMSSDK_Util: available exist: true
2020-09-16 15:33:50.981 19954-20004/ir.malv.plusdependencytest I/HMSSDK_HMSPackageManager: current versionCode:40100308, minimum version requirements: 30000000
2020-09-16 15:33:50.986 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: check available result: 0
2020-09-16 15:33:50.987 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: enter bindCoreService
2020-09-16 15:33:51.007 19954-20004/ir.malv.plusdependencytest I/HMSSDK_HuaweiApiManager: sendRequest
2020-09-16 15:33:51.008 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: ====== HMSSDK version: 50000301 ======
2020-09-16 15:33:51.009 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: Enter connect, Connection Status: 1
2020-09-16 15:33:51.010 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: connect minVersion:30000000
2020-09-16 15:33:51.010 19954-20004/ir.malv.plusdependencytest I/HMSSDK_Util: available exist: true
2020-09-16 15:33:51.013 19954-20004/ir.malv.plusdependencytest I/HMSSDK_HMSPackageManager: current versionCode:40100308, minimum version requirements: 30000000
2020-09-16 15:33:51.016 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: check available result: 0
2020-09-16 15:33:51.017 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: enter bindCoreService
2020-09-16 15:33:51.681 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BinderAdapter: Enter onServiceConnected.
2020-09-16 15:33:51.682 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: Enter onServiceConnected.
2020-09-16 15:33:51.684 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BinderAdapter: Enter onServiceConnected.
2020-09-16 15:33:51.684 19954-20004/ir.malv.plusdependencytest I/HMSSDK_HmsClient: post msg api_name:push.setNotifyFlag, app_id:102760085|, pkg_name:ir.malv.plusdependencytest, sdk_version:50000301, session_id:*, transaction_id:102760085fyFlag20200916153350948378003, kitSdkVersion:50002300, apiLevel:1
2020-09-16 15:33:51.685 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BaseHmsClient: Enter onServiceConnected.
2020-09-16 15:33:51.689 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseAdapter: in baseRequest + uri is :push.setNotifyFlag, transactionId is : 102760085fyFlag20200916153350948378003
2020-09-16 15:33:51.692 19954-20004/ir.malv.plusdependencytest I/HMSSDK_PendingResultImpl: init uri:push.setNotifyFlag
2020-09-16 15:33:51.694 19954-20004/ir.malv.plusdependencytest I/HMSSDK_PendingResultImpl: setResultCallback
2020-09-16 15:33:51.698 19954-20004/ir.malv.plusdependencytest I/HMSSDK_HmsClient: post msg api_name:push.gettoken, app_id:102760085|, pkg_name:ir.malv.plusdependencytest, sdk_version:50000301, session_id:*, transaction_id:102760085ttoken20200916153350948306787, kitSdkVersion:50002300, apiLevel:1
2020-09-16 15:33:51.706 19954-20004/ir.malv.plusdependencytest I/HMSSDK_BaseAdapter: in baseRequest + uri is :push.gettoken, transactionId is : 102760085ttoken20200916153350948306787
2020-09-16 15:33:51.708 19954-20004/ir.malv.plusdependencytest I/HMSSDK_PendingResultImpl: init uri:push.gettoken
2020-09-16 15:33:51.709 19954-20004/ir.malv.plusdependencytest I/HMSSDK_PendingResultImpl: setResultCallback
2020-09-16 15:33:51.720 19954-19972/ir.malv.plusdependencytest I/HMSSDK_PendingResultImpl: setResult:0
2020-09-16 15:33:51.745 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BaseAdapter: baseCallBack.onComplete
2020-09-16 15:33:51.746 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HmsClient: receive msg status_code:0, error_code0, api_name:push.setNotifyFlag, app_id:102760085|, pkg_name:ir.malv.plusdependencytest, session_id:*, transaction_id:102760085fyFlag20200916153350948378003, resolution:null
2020-09-16 15:33:51.748 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BaseVoidTask: Operate succeed
2020-09-16 15:33:51.771 19954-19972/ir.malv.plusdependencytest I/HMSSDK_PendingResultImpl: setResult:0
2020-09-16 15:33:51.837 19954-19954/ir.malv.plusdependencytest I/HMSSDK_BaseAdapter: baseCallBack.onComplete
2020-09-16 15:33:51.839 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HmsClient: receive msg status_code:0, error_code0, api_name:push.gettoken, app_id:102760085|, pkg_name:ir.malv.plusdependencytest, session_id:*, transaction_id:102760085ttoken20200916153350948306787, resolution:null
2020-09-16 15:33:51.842 19954-19954/ir.malv.plusdependencytest I/HMSSDK_HmsInstanceId: GetTokenTask receive a empty token, please check HmsMessageService.onNewToken receive result.
带有标签=
pushlog
的日志:
2020-09-16 20:15:10.585 7731-24998/? I/PushLog40100308_HMS: [Core-GWTask-84-859]enter set self show message control flag, req:{"enable":true,"packageName":"ir.malv.plusdependencytest"}(:289)
2020-09-16 20:15:10.586 7731-24998/? I/PushLog40100308_HMS: [Core-GWTask-84-859]init uri:pushcore.enableNotify(:289)
2020-09-16 20:15:10.586 7731-24998/? I/PushLog40100308_HMS: [Core-GWTask-84-859]await(:289)
2020-09-16 20:15:10.586 7731-24998/? I/PushLog40100308_HMS: [Core-GWTask-84-859]awaitOnAnyThread timeout:10 unit:SECONDS(:289)
2020-09-16 20:15:10.588 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Request, URI: pushcore.enableNotify, clientId: {packageName: com.huawei.hwid, sdkVersion: 10000000, originPackageName: ir.malv.plusdependencytest, originAppId: 102760085, originHostAppId: 102760085, originSdkVersion: 50000301}
2020-09-16 20:15:10.588 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]enter enable notify request:EnableNotifyReq{packageName='ir.malv.plusdependencytest', enable=true}
2020-09-16 20:15:10.590 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Response, uri: pushcore.enableNotify, statusCode: 0
2020-09-16 20:15:10.591 7731-24999/? I/PushLog40100308_HMS: [Core-GWTask-85-860]enter get token request:com.huawei.hms.support.api.entity.push.TokenReq{ pkgName: ir.malv.plusdependencytest isFirstTime: true scope: null appId: null} , transactionId:102760085ttoken20200916201509611018781(:289)
2020-09-16 20:15:10.592 7731-19020/? I/PushLog40100308_HMS: [Binder:7731_7-784]setResult:0(:289)
2020-09-16 20:15:10.592 7731-24999/? I/PushLog40100308_HMS: [Core-GWTask-85-860]init uri:pushcore.gettoken(:289)
2020-09-16 20:15:10.593 7731-24999/? I/PushLog40100308_HMS: [Core-GWTask-85-860]await(:289)
2020-09-16 20:15:10.593 7731-24999/? I/PushLog40100308_HMS: [Core-GWTask-85-860]awaitOnAnyThread timeout:10 unit:SECONDS(:289)
2020-09-16 20:15:10.595 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Request, URI: pushcore.gettoken, clientId: {packageName: com.huawei.hwid, sdkVersion: 10000000, originPackageName: ir.malv.plusdependencytest, originAppId: 102760085, originHostAppId: 102760085, originSdkVersion: 50000301}
2020-09-16 20:15:10.595 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]GetTokenRequest: com.huawei.android.pushagent.core.support.entity.TokenReq{ pkgName: ir.malv.plusdependencytest},userId:0,transactionId:102760085ttoken20200916201509611018781
2020-09-16 20:15:10.596 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]check push connection is not exist, reconnect it.
2020-09-16 20:15:10.599 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]dispatchIntent over
2020-09-16 20:15:10.599 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]TRS exceed valid time, so need to query TRS again
2020-09-16 20:15:10.600 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]com.huawei.action.CONNECT_PUSHSRV alarm trigger, expectTriggerTime:0, current trigger time:1600271110600
2020-09-16 20:15:10.602 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]connect srv: TRS is invalid, so need to query TRS
2020-09-16 20:15:10.604 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:10.613 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:10.613 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]begin to get token from pushSrv, pkgName : ir.malv.plusdependencytest, userId :00
2020-09-16 20:15:10.617 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]apply token: TRS is invalid, so need to query TRS
2020-09-16 20:15:10.624 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:10.630 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Response, uri: pushcore.gettoken, statusCode: 0
2020-09-16 20:15:10.632 7731-19020/? I/PushLog40100308_HMS: [Binder:7731_7-784]setResult:0(:289)
2020-09-16 20:15:10.636 7731-24999/? I/PushLog40100308_HMS: [Core-GWTask-85-860]request token for HMS from system push.(:289)
2020-09-16 20:15:10.640 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]request token for HMS by AIDL.(:289)
2020-09-16 20:15:10.641 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]init uri:pushcore.gettoken(:289)
2020-09-16 20:15:10.642 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]await(:289)
2020-09-16 20:15:10.642 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]awaitOnAnyThread timeout:10 unit:SECONDS(:289)
2020-09-16 20:15:10.644 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Request, URI: pushcore.gettoken, clientId: {packageName: com.huawei.hwid, sdkVersion: 10000000, originPackageName: ir.malv.plusdependencytest, originAppId: 102760085, originHostAppId: 102760085, originSdkVersion: 50000301}
2020-09-16 20:15:10.644 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]GetTokenRequest: com.huawei.android.pushagent.core.support.entity.TokenReq{ pkgName: com.huawei.hwid},userId:0,transactionId:102760085ttoken20200916201509611018781
2020-09-16 20:15:10.645 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]check push connection is not exist, reconnect it.
2020-09-16 20:15:10.647 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]dispatchIntent over
2020-09-16 20:15:10.647 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]TRS exceed valid time, so need to query TRS again
2020-09-16 20:15:10.648 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]com.huawei.action.CONNECT_PUSHSRV alarm trigger, expectTriggerTime:0, current trigger time:1600271110648
2020-09-16 20:15:10.653 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]connect srv: TRS is invalid, so need to query TRS
2020-09-16 20:15:10.657 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:10.657 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:10.664 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]begin to get token from pushSrv, pkgName : com.huawei.hwid, userId :00
2020-09-16 20:15:10.667 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]apply token: TRS is invalid, so need to query TRS
Tags: [Huawei]
Message: Succefully turned on Push
2020-09-16 20:15:10.675 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:10.678 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Response, uri: pushcore.gettoken, statusCode: 0
2020-09-16 20:15:10.679 7731-8371/? I/PushLog40100308_HMS: [Binder:7731_6-640]setResult:0(:289)
2020-09-16 20:15:23.427 7731-25033/? I/PushLog40100308_HMS: [Core-GWTask-86-862]enter get token request:com.huawei.hms.support.api.entity.push.TokenReq{ pkgName: ir.malv.plusdependencytest isFirstTime: false scope: null appId: null} , transactionId:102760085ttoken20200916201523364702182(:289)
2020-09-16 20:15:23.428 7731-25033/? I/PushLog40100308_HMS: [Core-GWTask-86-862]init uri:pushcore.gettoken(:289)
2020-09-16 20:15:23.429 7731-25033/? I/PushLog40100308_HMS: [Core-GWTask-86-862]await(:289)
2020-09-16 20:15:23.429 7731-25033/? I/PushLog40100308_HMS: [Core-GWTask-86-862]awaitOnAnyThread timeout:10 unit:SECONDS(:289)
2020-09-16 20:15:23.432 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Request, URI: pushcore.gettoken, clientId: {packageName: com.huawei.hwid, sdkVersion: 10000000, originPackageName: ir.malv.plusdependencytest, originAppId: 102760085, originHostAppId: 102760085, originSdkVersion: 50000301}
2020-09-16 20:15:23.433 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]GetTokenRequest: com.huawei.android.pushagent.core.support.entity.TokenReq{ pkgName: ir.malv.plusdependencytest},userId:0,transactionId:102760085ttoken20200916201523364702182
2020-09-16 20:15:23.433 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]check push connection is not exist, reconnect it.
2020-09-16 20:15:23.436 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]dispatchIntent over
2020-09-16 20:15:23.436 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]TRS exceed valid time, so need to query TRS again
2020-09-16 20:15:23.437 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]com.huawei.action.CONNECT_PUSHSRV alarm trigger, expectTriggerTime:0, current trigger time:1600271123437
2020-09-16 20:15:23.439 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]connect srv: TRS is invalid, so need to query TRS
2020-09-16 20:15:23.443 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:23.444 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:23.449 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]begin to get token from pushSrv, pkgName : ir.malv.plusdependencytest, userId :00
2020-09-16 20:15:23.453 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]apply token: TRS is invalid, so need to query TRS
2020-09-16 20:15:23.458 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:23.462 6359-25001/? I/PushLog100101302: [IO-pool-thread-35-1642]Response, uri: pushcore.gettoken, statusCode: 0
2020-09-16 20:15:23.462 7731-8371/? I/PushLog40100308_HMS: [Binder:7731_6-640]setResult:0(:289)
2020-09-16 20:15:23.465 7731-25033/? I/PushLog40100308_HMS: [Core-GWTask-86-862]request token for HMS from system push.(:289)
2020-09-16 20:15:23.465 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]request token for HMS by AIDL.(:289)
2020-09-16 20:15:23.466 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]init uri:pushcore.gettoken(:289)
2020-09-16 20:15:23.466 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]await(:289)
2020-09-16 20:15:23.466 7731-14337/? I/PushLog40100308_HMS: [Push-Task-1-717]awaitOnAnyThread timeout:10 unit:SECONDS(:289)
2020-09-16 20:15:23.469 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Request, URI: pushcore.gettoken, clientId: {packageName: com.huawei.hwid, sdkVersion: 10000000, originPackageName: ir.malv.plusdependencytest, originAppId: 102760085, originHostAppId: 102760085, originSdkVersion: 50000301}
2020-09-16 20:15:23.470 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]GetTokenRequest: com.huawei.android.pushagent.core.support.entity.TokenReq{ pkgName: com.huawei.hwid},userId:0,transactionId:102760085ttoken20200916201523364702182
2020-09-16 20:15:23.471 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]check push connection is not exist, reconnect it.
2020-09-16 20:15:23.474 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]dispatchIntent over
2020-09-16 20:15:23.474 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]TRS exceed valid time, so need to query TRS again
2020-09-16 20:15:23.476 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]com.huawei.action.CONNECT_PUSHSRV alarm trigger, expectTriggerTime:0, current trigger time:1600271123476
2020-09-16 20:15:23.480 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:23.481 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]connect srv: TRS is invalid, so need to query TRS
2020-09-16 20:15:23.487 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]begin to get token from pushSrv, pkgName : com.huawei.hwid, userId :00
2020-09-16 20:15:23.491 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]apply token: TRS is invalid, so need to query TRS
2020-09-16 20:15:23.492 6359-6417/? I/PushLog100101302: [ReceiverDispatcher-383]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:23.500 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Not allow to use push in this area, and not pass interval,result code: 26, belong id is -1, server ip is , region of TRS server is -1
2020-09-16 20:15:23.503 6359-25003/? I/PushLog100101302: [IO-pool-thread-36-1644]Response, uri: pushcore.gettoken, statusCode: 0
2020-09-16 20:15:23.504 7731-8371/? I/PushLog40100308_HMS: [Binder:7731_6-640]setResult:0(:289)
'com.huawei.agconnect:agcp:1.4.1.300'
"com.huawei.hms:push:5.0.2.300"
"com.huawei.agconnect:agconnect-core:1.4.1.300"
<meta-data
android:name="push_kit_auto_init_enabled"
android:value="true" />
<service
android:name=".services.HmsService"
android:exported="false">
<intent-filter>
<action android:name="com.huawei.push.action.MESSAGING_EVENT" />
</intent-filter>
</service>
v5.0.0.304
Phone
允许 HMS 核心 Link 最佳答案
自动搅拌push_kit_auto_init_enabled
和手动检索方法getToken()
加在一起就会出问题。
我们有一个类似的问题,有时会收到 token ,有时却没有。它看起来非常随机,但作为基本规则,您应该使用描述的自动方法之一 here或者你坚持this部分描述了如何在完成所有配置后立即申请 token ( part 1 、 part 2 、 part 3 和 part 4 )。
对于在允许推送消息的国家/地区遇到此问题的任何其他人,这应该可以解决问题。
关于android - 华为推送包: Token returns empty on Huawei phone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63918878/
我正在尝试将多个值放入数组中。 当我使用时: csvData.push('data[0][index],data[1][index],data[2][index],data[3][index]');
我想在数组声明中直接使用函数 push(),但它不能正常工作。在我的示例中,我的数组返回值 2 : var j = ["b"].push("a"); document.write(j); // ret
我编写了以下Powershell,它为所选文件夹中的所有驱动程序创建了一个bat安装程序,然后应重新启动PC。 New-Item C:\Tools\Drivers\DellLatitude3450.b
例: $ git clone git@gitlab:carlos/test.git Cloning into 'asd'... ssh: connect to host gitlab port 22:
我正在构建一个具有数组类型属性的对象数组: 这里是一些简化的代码: var _data = []; for(var i=0;i<10;i++) { var element = {
我有一个简单的 PHP/MySql 应用程序,它通常会选择几个数据库之一(假设每个客户一个)进行操作。但是,经常调用访问公共(public)数据库的实用程序函数。 我不想在我的代码中散布 USE 子句
我在推送 View Controller 时遇到问题。这就是我所做的:单击一个按钮,我使用这段代码添加了一个模态视图,我工作正常: - (void)addAction:(id)sender {
我想为socket can写一个android系统服务器。我目前正在设计这个,想知道是否有任何方法可以在 Linux/POSIX 套接字上的数据是否可用而无需调用 read() 并随时轮询结果的情况下
我正在编写一个 Bootstrap 站点,我想知道这是否可以接受。该网站看起来像我想要的那样,但我想知道这是否是最佳做法? 我采用的方法是对每两个缺失的列使用 1 个偏
删除远程分支是通过: git push origin :master 如果本地在远程之后,则需要完成: git push --force origin :master 但是强制删除例如master 基
假设我有一个 git 服务器。在每次推送时,我都需要启动一个进程,我可以通过一个钩子(Hook)来完成。 需要将进程的标准输出写入执行推送的 git 客户端。这与 Heroku 或 Openshift
我刚刚开始学习 Git,有些事情我无法解决。在我的 Mac 上本地创建和使用 git 存储库后,我可以将副本推送到其他地方的另一台服务器吗?我在防火墙后面,所以不幸的是我无法从另一台机器运行 git
这个问题在这里已经有了答案: warning: remote HEAD refers to nonexistent ref, unable to checkout (13 个答案) 关闭 7 年前。
我已经安装了 SCM Sync 配置插件(0.0.10)来将我的 jenkins 设置保存在我的 git 存储库中。 我已经设置了 git url 存储库但插件没有提交/推送,请看截图 我试过: 私钥
这可能看起来很矛盾,我知道 secret 变更集是私有(private)的,但是如果我想备份这些 secret 变更集怎么办? 我与一些分支并行工作,有时我想插入一个,而不是其他的。为了实现这一点,我
我正在使用 TortoiseHg用于版本控制。提交到本地后,我推送到远程存储库。如何撤消到特定的提交点? 有三个不同的插入,我想恢复到第一个插入。我读到了 Mercurial 回滚和 hg 撤销 命令
我知道以前有人问过这个问题,但我似乎无法理解这件事...... git checkout master git pull git git checkout feature git rebase ori
下面的代码片段中 return { Push:function ..... 的含义是什么?当我用谷歌搜索时,我发现push()方法将新项目添加到数组的末尾,并返回新的长度。所以我不确定什么是push:
我正在使用 Mercurial 1.6。我有一个带有几个子存储库的存储库 (11)。我想将父存储库推送到默认远程存储库,而不推送子存储库。想要这样做的原因包括: 我使用的是 SSH 存储库,需要很长时
我分配了一个按钮来将 segue 推送到另一个 View Controller ,但是当我执行这部分代码时,我得到以下信息: 2014-02-20 10:44:29.357 nar[20244:70b
我是一名优秀的程序员,十分优秀!