question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request Sync broken: Request contains an invalid argument.

See original GitHub issue

according to https://developers.google.com/actions/smarthome/create-app#request-sync

curl -i -s -k -X POST -H "Content-Type: application/json" -d '{agent_user_id: "59c7a80d27e03a44449accb2"}' "https://homegraph.googleapis.com/v1/devices:requestSync?key=asd"
HTTP/1.1 400 Bad Request
Vary: X-Origin
Vary: Referer
Content-Type: application/json; charset=UTF-8
Date: Thu, 23 Nov 2017 14:37:11 GMT
Server: ESF
Cache-Control: private
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}

Trying with invalid agent_user_id I got:

HTTP/1.1 404 Not Found
Vary: X-Origin
Vary: Referer
Content-Type: application/json; charset=UTF-8
Date: Thu, 23 Nov 2017 14:40:58 GMT
Server: ESF
Cache-Control: private
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked

{
  "error": {
    "code": 404,
    "message": "Requested entity was not found.",
    "status": "NOT_FOUND"
  }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
daaru00commented, Oct 15, 2018

Hi @asturel, I received the same error and I found the error was not about the request you made but the response received from your server about the SYNC request. For example, using the async parameter I no longer receive the error because the request will be made asynchronously after being queued:

POST https://homegraph.googleapis.com/v1/devices:requestSync
{
  "agentUserId": string,
  "async": boolean
}

here the documentation about it: https://developers.google.com/actions/reference/smarthome/rest/v1/devices/requestSync

1reaction
iifawzicommented, Feb 27, 2022

Using async: true won’t solve the problem! it doesn’t return errors because the requests are handled asynchronously.

The error is usually because there’s a not allowed property in the request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Assistant Error on Request Sync - Configuration
If not, the service will log an error that reads something like “Request contains an invalid argument”. If this happens, then unlink the ......
Read more >
There was an error: 400 INVALID_ARGUMENT Request ...
The topic 'There was an error: 400 INVALID_ARGUMENT Request contains an invalid argument.' is closed to new replies. WP Google My Business Auto...
Read more >
Google Homegraph API: can't send status:"ERROR" in ...
reporting device state to homegraph: {"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT"}}.
Read more >
Error messages | Document AI - Google Cloud
BadRequest details. message: "Request contains an invalid argument."
Read more >
YouTube Data API - Errors | Google Developers
The following tables identify API error messages that are not specific ... invalidValue (400), invalidMetadata, The request contains invalid ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found