{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/issues/1079","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/issues/1079/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/issues/1079/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/issues/1079/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-php/issues/1079","id":328703618,"node_id":"MDU6SXNzdWUzMjg3MDM2MTg=","number":1079,"title":"[Storage] \"No project ID was provided\" error adding notification to just-created bucket","user":{"login":"zynyz","id":38676205,"node_id":"MDQ6VXNlcjM4Njc2MjA1","avatar_url":"https://avatars1.githubusercontent.com/u/38676205?v=4","gravatar_id":"","url":"https://api.github.com/users/zynyz","html_url":"https://github.com/zynyz","followers_url":"https://api.github.com/users/zynyz/followers","following_url":"https://api.github.com/users/zynyz/following{/other_user}","gists_url":"https://api.github.com/users/zynyz/gists{/gist_id}","starred_url":"https://api.github.com/users/zynyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zynyz/subscriptions","organizations_url":"https://api.github.com/users/zynyz/orgs","repos_url":"https://api.github.com/users/zynyz/repos","events_url":"https://api.github.com/users/zynyz/events{/privacy}","received_events_url":"https://api.github.com/users/zynyz/received_events","type":"User","site_admin":false},"labels":[{"id":279132864,"node_id":"MDU6TGFiZWwyNzkxMzI4NjQ=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/labels/api:%20storage","name":"api: storage","color":"f8f8f8","default":false},{"id":268638473,"node_id":"MDU6TGFiZWwyNjg2Mzg0NzM=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/labels/type:%20question","name":"type: question","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-06-02T02:09:32Z","updated_at":"2018-06-06T19:15:58Z","closed_at":null,"author_association":"NONE","body":"I'm creating a bucket, then trying to set a notification on it. The bucket is created fine, CORS is set fine, but when I try to add the notification, it throws an exception  with \"No project ID was provided, and we were unable to detect a default project ID.\"\r\n\r\nMy code (simplified):\r\n\r\n```\r\n$opts =\r\n[\r\n  'storageClass' => 'REGIONAL',\r\n  'location' => 'us-central1',\r\n  'predefinedAcl' => 'publicRead',\r\n  'cors' => [ /* elided for simplicity */ ],\r\n];\r\n\r\n$bucket = $client -> createBucket('my-bucket-name', $opts);\r\n$bucket -> createNotification('my-topic', ['event_types' => 'OBJECT_FINALIZE']);\r\n```\r\nAm I doing something wrong here?\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/issues/comments/395182491","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-php/issues/1079#issuecomment-395182491","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/issues/1079","id":395182491,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTE4MjQ5MQ==","user":{"login":"zynyz","id":38676205,"node_id":"MDQ6VXNlcjM4Njc2MjA1","avatar_url":"https://avatars1.githubusercontent.com/u/38676205?v=4","gravatar_id":"","url":"https://api.github.com/users/zynyz","html_url":"https://github.com/zynyz","followers_url":"https://api.github.com/users/zynyz/followers","following_url":"https://api.github.com/users/zynyz/following{/other_user}","gists_url":"https://api.github.com/users/zynyz/gists{/gist_id}","starred_url":"https://api.github.com/users/zynyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zynyz/subscriptions","organizations_url":"https://api.github.com/users/zynyz/orgs","repos_url":"https://api.github.com/users/zynyz/repos","events_url":"https://api.github.com/users/zynyz/events{/privacy}","received_events_url":"https://api.github.com/users/zynyz/received_events","type":"User","site_admin":false},"created_at":"2018-06-06T19:15:58Z","updated_at":"2018-06-06T19:15:58Z","author_association":"NONE","body":"The service account has Editor permissions - it's just the default service account for the project. My test code creates the topic, creates the bucket, then attempts to add a notification, so it's all using the same account. \r\n\r\nThe code is blowing up on the call to get the existing policy, so it's not even a problem setting the policy.\r\n\r\nAccording to [this page](https://cloud.google.com/pubsub/docs/access-control), I need roles/owner perms to see the policy for a topic I just created with roles/editor perms. Is that actually the case?"}}
{"actor":{"display_login":"zynyz"}}