GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials · Issue #1007 · googleapis/google-cloud-java

Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials #1007

New issue
Copy link
New issue
Copy link
Closed
Closed
Storage.readAllBytes() unauthorized when running on App Engine standard with default credentials#1007
Copy link
Assignees
mziccard
Labels
api: storageIssues related to the Cloud Storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@clementdenis
clementdenis
opened on May 13, 2016
Issue body actions

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 deployed on App Engine standard (did not try on flexible):

com.google.cloud.storage.StorageException: 401
Login Required
    at com.google.cloud.storage.spi.DefaultStorageRpc.translate(DefaultStorageRpc.java:98)
    at com.google.cloud.storage.spi.DefaultStorageRpc.load(DefaultStorageRpc.java:362)
    at com.google.cloud.storage.StorageImpl$16.call(StorageImpl.java:443)
    at com.google.cloud.storage.StorageImpl$16.call(StorageImpl.java:440)
    at com.google.cloud.RetryHelper.doRetry(RetryHelper.java:181)
    at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:247)
    at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:237)
    at com.google.cloud.storage.StorageImpl.readAllBytes(StorageImpl.java:440)

The workaround is to use Storage.reader() to get a ReadChannel.

Activity

  1. mziccard commented on May 13, 2016

    @mziccard
    mziccard
    on May 13, 2016
    Contributor
    More actions

    This is strange and I believe it does not depend on us. I need to do some digging but I might have a fix.

  2. mziccard
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    on May 13, 2016
  3. mziccard commented on May 14, 2016

    @mziccard
    mziccard
    on May 14, 2016
    Contributor
    More actions

    @clementdenis Would you mind giving a try to #1010? that should fix the readAllBytes issue.

  4. mziccard
    closed this as completedin #1010on May 18, 2016
  5. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  6. suztomo
    added a commit that references this issue on Feb 1, 2023

    chore: require hashes when installing dependencies in owlbot postproc…

    893564b
  7. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(main): release 0.129.5-SNAPSHOT (#1007)

    4682627
  8. chingor13
    added a commit that references this issue on Feb 24, 2026

    chore(deps): update dependency google-auth to v2.11.1 (#1007)

    474367c
  9. chingor13
    added a commit that references this issue on Mar 12, 2026

    chore(deps): update dependency google-auth to v2.11.1 (#1007)

    0bcb3cf
  10. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-spanner-…

    ee7dac0
  11. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore(main): release 1.115.5-SNAPSHOT (#1007)

    e377faf

    chore(main): release 1.115.5-SNAPSHOT (#1007)

    6411c1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

api: storageIssues related to the Cloud Storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.