3
votes

Following the instructions in https://cloud.google.com/storage/docs/object-change-notification#_Authorize_Endpoint I'm trying to set a watchbucket notification. I'm running:

gsutil notification watchbucket https://-------.appspot.com  gs://-----

(with my real application id and bucket) The error string reported by gsutil suggest an internal bug:

BadRequestException: 400 No valid domain for WebHook callback: https://https://...

Note the double https:// in the error report

trying to remove the https:// ends with an error:

CommandException: The application URL must be an https:// URL.

I believe I've done all the things needed. I'm working with a service account of the application. the application URL is listed in https://console.developers.google.com/project/ywz-gcs-watch/apiui/notification. The service account has access to the watch bucket (tried it also with a bucket belong to the application project)

Is that a gsutil bug?

1

1 Answers

4
votes

I've faced the exactly same problem here. The issue was that my allowed domain was registered like 'https://example.com' while it should be 'example.com'.

Go to your google developer console and open your project page. In the sidebar on the left, click APIs & auth, then click Push. Double check if your domain is correct. If not, enter just the domain without the protocol part and wait a few minutes before test again. Hope it helps!

Kindly Regards, Vinícius Miasato