Failure 50005: Unknown authorization error when calling activityRecord API of Health Kit - huawei-mobile-services

I have an app with Huawei Health SDK integrated. I applied some data Read/Write permission of Fitness and Health data. The app works fine for some of features like step count data. However, it reports following error when calling activityRecord API:
activityRecord failure 50005: Unknown authorization error
Can someone help?

You need to ensure that your app for Health Kit data has been approved, and the scope of Activity Record has been added in Signing in and Applying for permission.
It looks like the app has been approved for the access of some fitness and health data because the step count works on the app. However, it seems that you have not requested the “user activity records data” in Health Kit service.
You need to enable Read/Write for user activity records data in Motion record data as you did for other data. You can refer the link for the details on HMS SDK v5 or link on HMS SDK v6 error codes.
After the application is approved, please try again. Hope this fix the issue. If you still get the result code 50005 error, the HMS Core version may be too low. Please upgrade the HMS Core version.

Related

Firebase App Check rejecting all requests from Android devices

I set up App Check for iOS and Android on Flutter. iOS devices are working fine and able to access my RT Database and Cloud Functions. However, Android devices are blocked. I used the SHA-256 certificate fingerprint generated on Google Play Console. Also, Firebase says my Android app is registered. So, everything looks ok, but it's not.
I don't know what to check at this point because there is no error on my side. The only thing I can see is unverified: invalid requests from App Check request metrics.
This is my Flutter code to activate App Check:
void main() async {
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await FirebaseAppCheck.instance.activate();
runApp(MyApp());
}
This is a log info from Cloud Functions:
Callable request verification passed {"verifications"{"auth":"MISSING","app":"MISSING"}}
I have solved my problem and I have recently received my first "App Check Verified Request" successfully at my Firebase Cloud Firestore App Check request metrics.
I only added "Play Integrity" until now, because the Firebase documentation (https://firebase.google.com/docs/app-check/android/safetynet-provider) uses the following statement: "Note: The SafetyNet Attestation API is deprecated and has been replaced by the Play Integrity API. Consider enabling App Check with Play Integrity instead. See the deprecation timeline for more information."
To solve the problem, it will be enough to apply the following:
Firebase Console -> Project Settings -> App Check -> Apps -> Add SafetyNet as additional Attestation providers.
I have now Play Integrity and SafetyNet both together. Now App Check Requests are working also for "Real device", "Release build" and "Closed Testing" scenario.
I suggest using "Consider enabling App Check with both Play Integrity and SafetyNet." instead of "Consider enabling App Check with Play Integrity instead." on Firebase Documentation.
Thanks for adding such a great service that improves security in any case.
So just leaving a comment in case this helps.
I had the same issue but made this work after using the SHA-256 under "App Signing key certificate" (It wasn't working until I used Upload key certificate). Hope this helps in any way.

Why HMS Push Kit Via Coding Assistant shows error code : 80200003:error message : Oauth Token expired

While implementing Push kit through HMS Coding Assistant I'am gettingthe given error
error code : 80200003, error message : Oauth Token expired
How to solve the issue
Reason
Error code 80200003 means that the token used by the Push Kit has expired. Normally the tool automatically reapplies for a new token. If the tool fails to reapply for it, the failure cause is also displayed.
Solution
If the fault persists, please restart the system. Besides, in the latest version 3.0.2.300, the tool automatically applies for a new token each time it is used. Therefore, the token will not expire.
You can use the auxiliary tools provided by Coding Assistant: Message Test and Error Codes, to automatically fill in the app token.
Message Test is a tool used to test the Push Kit's function of pushing messages from the server to phones.
Error Codes: error codes and handling suggestions provided by Push Kit. Before debugging, ensure that Auto Analysis is enabled.
The process is as follows:
Parameter: Please Input your token
Setting: This parameter is automatically set when an app is running on a device.
To automatically fill in the app token, manually enable the log analysis function and run the app again.
If the log analysis function is not enabled, use either of the following ways:
a. When you run the app, the Event Log window prompts you whether to enable the log analysis function. Click Turn On.
b. Click Error Codes and turn on Auto Analysis in the upper right corner.
For more information, see docs.

Google smart action

We develop an app to be used with Google assissant. All works fine in develop envirnoment, than when we deploy in test envirnoment on aws we have these errors from Google:
DEADLINE_EXCEDEED
RESOURCE_EXHAUSTED
these when we answer to a Sync request.
The account link and the First Sync are working fine!
Any idea?
DEADLINE_EXCEEDED - This generally happens when an intent request times out waiting for a response. If you're seeing these errors during account linking, it may also be related to the time taken to issue the OAuth token in addition to the initial SYNC.
RESOURCE_EXHAUSTED - This happens when you call Request Sync more than once concurrently for a given agentUserId. For more details see the Error responses section of the Request Sync developer guide.

Kontakt iBeacon: REST API - Updating the Beacon using the secure config

Anyone here have used the Kontakt's REST API, to completely update the beacon the new way (beacon with at least Firmware 4.0) using the secure config? I have followed their API document and have done the steps below, but I am stuck at the last/3rd step. Just checking here while waiting from Kontakt's technical support to help me out.
STEPS:
Update beacon by creating a config e.g. "/config/create?uniqueId=abc&deviceType=beacon&txPower=2"
For the newest beacon (Firmware 4.1), get the secure config from the response of e.g. "/config/encrypt?uniqueId=abc". The secure response is from response's configs[0].config value, and this is what I send in the response parameter in the 3rd step below.
I am not sure if that is the right one to pass as it's not clearly stated in the document.
And lastly to synchronize state, update the cloud by sending the secure config e.g. "/device/update?uniqueId=abc&updated=1489619160440&response=AAMQIgDbyMlY7zruGWl89..."
The API is throwing Error 500 - Internal Server Error with this exact error code API_ERROR_1489800045650.
A beacon's configuration needs to be applied to the beacon by connecting to it using a Bluetooth interface, this cannot be done through a RESTful API service alone.
Changes in configuration for Kontakt.io beacons can be prepared over their RESTful API, but need to be applied through a BLE connection; at which point, the beacon will create a "secure response" that needs to be synced back to their API.
Kontakt.io's SDK already handles this, documentation for "Writing a new configuration to a beacon" covers this in depth, and there is some sample code in their GitHub account:
Fetch configs from API
Apply configs to nearby devices

Intuit API : Unable to retrieve Error Code

Am implementing the exception handling for the Intuit Customer Account Data API in my application. I get a "null" for the Error code but when I check through the API explorer, I am able to see the error code and message. How do I access this through the AggregationCategorizationException object?
Make sure you are using IPP .Net SDK for Customer Account Data 1.4.0 or later.
There was an update to "provide detailed error codes and messages". See release notes here:
https://developer.intuit.com/docs/0020_customeraccountdata/devkits/0250.net_cad_devkit_1.0/release_notes
If you can't/don't want to upgrade, you could consider using reflection to access the private information in the AggregationCategorizationException object. I know for 1.3 the information was in the object, just private.