Title: Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials · Issue #1007 · googleapis/google-cloud-java · GitHub
Open Graph Title: Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials · Issue #1007 · googleapis/google-cloud-java
X Title: Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials · Issue #1007 · googleapis/google-cloud-java
Description: Create an application running this code: StorageOptions.defaultInstance().service().readAllBytes(bucket, objectName) It will work on a local environment using application default credentials, but it will throw the following error when de...
Open Graph Description: Create an application running this code: StorageOptions.defaultInstance().service().readAllBytes(bucket, objectName) It will work on a local environment using application default credentials, but i...
X Description: Create an application running this code: StorageOptions.defaultInstance().service().readAllBytes(bucket, objectName) It will work on a local environment using application default credentials, but i...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/1007
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials","articleBody":"Create an application running this code:\n\n```\nStorageOptions.defaultInstance().service().readAllBytes(bucket, objectName)\n```\n\nIt will work on a local environment using application default credentials, but it will throw the following error when deployed on App Engine standard (did not try on flexible):\n\n```\ncom.google.cloud.storage.StorageException: 401\nLogin Required\n at com.google.cloud.storage.spi.DefaultStorageRpc.translate(DefaultStorageRpc.java:98)\n at com.google.cloud.storage.spi.DefaultStorageRpc.load(DefaultStorageRpc.java:362)\n at com.google.cloud.storage.StorageImpl$16.call(StorageImpl.java:443)\n at com.google.cloud.storage.StorageImpl$16.call(StorageImpl.java:440)\n at com.google.cloud.RetryHelper.doRetry(RetryHelper.java:181)\n at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:247)\n at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:237)\n at com.google.cloud.storage.StorageImpl.readAllBytes(StorageImpl.java:440)\n```\n\nThe workaround is to use Storage.reader() to get a ReadChannel.\n","author":{"url":"https://github.com/clementdenis","@type":"Person","name":"clementdenis"},"datePublished":"2016-05-13T14:22:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1007/google-cloud-java/issues/1007"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:79cfc29a-7b64-1ffe-b674-c91cfece7cdf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 833A:299194:B95CEF:F99B1C:6A4D78C0 |
| html-safe-nonce | 35e52bde891fd6b8001269191fbe7ec0b4535e99af15a4208d057fc3b3836955 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzNBOjI5OTE5NDpCOTVDRUY6Rjk5QjFDOjZBNEQ3OEMwIiwidmlzaXRvcl9pZCI6IjY0OTc3MjQxMjk3NTExNjkyMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3614031c7640872af1a964f6bf2be4a6b333f903b131c9d9039a4143a1ebc7b6 |
| hovercard-subject-tag | issue:154723353 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/1007/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4d03825c6379857cca687267f459c50856c7a6b315b24feda2416ced2a435371/googleapis/google-cloud-java/issues/1007 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4d03825c6379857cca687267f459c50856c7a6b315b24feda2416ced2a435371/googleapis/google-cloud-java/issues/1007 |
| og:image:alt | Create an application running this code: StorageOptions.defaultInstance().service().readAllBytes(bucket, objectName) It will work on a local environment using application default credentials, but i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | clementdenis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f8e15305e2ab58890ca84b830615e375f5df303cf471cafcba0c08272981be3 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8608b0750fc35e283e5ec5b094bff942d7a0e197 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width