Test Suite for smart-home-nodejs have "Test Refresh Token" failed and "Request Sync" failed - actions-on-google

I first tried to use the sample code to test the google home service.
smart-home-nodejs
When I push the sample to firebase and try to actions for console test website.
I get two errors. currently, I do not find more suggestions to resolve these problems.
usually use "actions test suite expected 'FAIL' to not equal 'FAIL'" to find info, if have better keywords to find solutions, hope to provide them to me or more suggestions.
Thank you.
Test Refresh Token
We expected invalid_grant with 400 error when refreshing with invalid token, but got no error.;Access token has not been updated after refresh.;: expected 'FAIL' to not equal 'FAIL'
Check HomeGraph devices after adding/removing/updating a device
RequestSync failed: Device list not changed: [{"id":"1086","type":"action.devices.types.AIRPURIFIER","traits":["action.devices.traits.OnOff","action.devices.traits.Toggles","action.devices.traits.FanSpeed"],"name":{"name":"Smart Air Purifier","nicknames":["air filter"],"defaultNames":["Smart Air Purifier"]},"willReportState":true,"deviceInfo":{"manufacturer":"L","model":"L","hwVersion":"1.0.0","swVersion":"2.0.0"},"attributes":{"availableFanSpeeds":{"ordered":true,"speeds":[{"speed_name":"0","speed_values":[{"lang":"en","speed_synonym":["off"]}]},{"speed_name":"1","speed_values":[{"lang":"en","speed_synonym":["low"]}]},{"speed_name":"2","speed_values":[{"lang":"en","speed_synonym":["medium"]}]},{"speed_name":"3","speed_values":[{"lang":"en","speed_synonym":["high"]}]}]},"availableToggles":[{"name":"uv","name_values":[{"lang":"en","name_synonym":["uv"]}]}],"reversible":true},"customData":{"gAdditionalInfo":{"agentId":"acerpure-iot","deviceSource":1}},"otherDeviceIds":[{"agentId":"acerpure-iot","deviceId":"abc"}]}]: expected false to be true

Related

Huawei push API throws error saying token count is wrong in postman

Using push API continuously returns token count should within 1 and 1,000. Please find the API error in the screenshot.
The possible causes of this problem is, you have placed the “token” attribute in wrong place.
Solution:
Please keep your “token” attribute within the “message” object,.
enter image description here
For details, check the following documents:
https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-server-dev-0000001050040110
Your token is outside the message body, "token", "android" should be within the message body.
Please check the sample code here
Also, if you want to use more tokens (>1000), the best method is to invoke the API using App server and send messages in batches.

Payouts errors on Sandbox

I am trying to create Payout functionality using REST API, and I have few errors.
While I am sending this request :
{"sender_batch_header":{"sender_batch_id":"test_0","email_subject":"RaceBets Withdrawal","recipient_type":"PAYPAL_ID"},"items":[{"recipient_type":"PAYPAL_ID","amount":{"currency":"EUR","value":"20.0"},"receiver":"XXXX","note":"Hello there!","sender_item_id":"71292226"}]}
I received:
JAXBException occurred : 4 counts of IllegalAnnotationExceptions.
or :
{"name":"REQUIRED_SCOPE_MISSING","message":"Access token does not have required scope.","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#REQUIRED_SCOPE_MISSING"}
the second error is also strange, because payments are working fine, and scope is also fine
{"scope":"https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/services/invoicing https://api.paypal.com/v1/vault/credit-card/.*","access_token":"xxx","token_type":"Bearer","app_id":"APP-xxx","expires_in":28800}
Any idea?
For the second error make sure you have checked the option for "payouts" under your application at developer.paypal.com .
Go to developer.paypal.com --> DashBoard --> My APP -- > Click your APP Name --> App Feature . Select Payout here .
Regarding the REQUIRED_SCOPE_MISSING error, I experienced this as well. Adding the scope as the other poster describes fixed the issue.
Please note that after changing scope (i.e. adding Payouts) it can take a few hours for the change to be reflected, so you'll continue getting the error for awhile. This confused me when I was testing because I didn't expect sandbox to have this latency.

Vauge PayFlow Error

I'm using PayFlow with Layout C, which uses an iFrame to embed the payment form. I've followed the instructions found here for testing: https://developer.paypal.com/docs/classic/payflow/gs_ppa_hosted_pages/
My request for a secure token returns successfully, but when I run a test charge, I get the following error:
Some required information is missing or incorrect. Please correct the
fields below and try again.
Error: An error has occurred. Please contact the system administrator.
The only fields below are card number and expiration date, which follow the testing guidelines.
What else could be going wrong?
Once you get the secure token, Instead of using the redirection url "https://payflowlink.paypal.com" , you should use "https://pilot-payflowlink.paypal.com" if you are in test mode .
This change happened after a certificate upgrade on 8th APR . You can check the link below :
https://ppmts.custhelp.com/app/answers/detail/a_id/1236

Facebook Test User error

I use facebook login in my app and have tests for it. I use the /{app-id}/accounts/test-users endpoint to create users for my tests but the endpoint fails with the very generic
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1
}
}
(which says the API is possibly down). I tried this with 3 different appids/secrets, both with using app_id|app_secret as the token and with a token from the get token endpoint. I also tested this on the Graph Api Explorer and it's giving me the same error. It was working fine but then it suddenly stopped.
What I want to know is 1. is it down? and 2. if not, what did i do wrong or what changed since yesterday?
+1 this also started to me yesterday mid-morning, with code and an FB app which had been working previously and was unchanged.
When I look at https://developers.facebook.com/apps/FB_APP_ID/roles/test-users/, I can see the new users.
So the call is "working" in that new users are being created, but it is broken in that we get a 500 and we don't get an access_token.
I don't have an answer yet.
I ran into a similar problem last week. After long hours of debugging I found out that I would get this same error every time I tried to create multiple test users with the same name simultaneously (i.e. when running tests in multiple threads).
So instead of setting custom a user name I don't even use the name field and I just let Facebook generate one. This way everything works fine. Seriously. I love Facebook API so much. :)
Hope this helps someone.

PayPal Sandbox Blank Address Error

I just recently started working with the PayPal API to start processing credit cards for a client and have run into an odd issue. I managed to get everything mostly working (the 400 Bad Request error that is all over SO is still outstanding for me) minus one thing. When I try to run a CC against the sandbox area with nothing specified for line 2 of the address I see the following error get logged:
Error Response: {"name":"VALIDATION_ERROR","details":[{"field":"payer.funding_instruments[0].credit_card.billing_address.line2","issue":"Must not be blank"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"cbaa2c4dfdb77"}
Why would address 2 be required? Their own documentation (https://developer.paypal.com/webapps/developer/docs/api/) says it isn't so I'm completely lost here.
This is using the RestAPISDK library downloaded from their GitHub instance and everything I'm doing is in C#.
When you have a blank value in a REST API call it will return an error. It isn't required to provide a line2 value but if you include the variable with a blank value the system will flip out. Remove the variable entirely and you should be good to go.