Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

As of 2022-02-22 Automatic detection of requesterPays buckets is failing #824

@BenWhitehead

Description

@BenWhitehead

First observed on PR #823 and visible in the integration tests related to Requester Pays (build results)

Environment details

  1. this library
  2. OS type and version: N/A
  3. Java version: N/A
  4. version(s): all released prior to 2022-02-22

Code example

public void testAutodetectWhenRequesterPays() throws IOException {
CloudStorageFileSystem testRPBucket = getRequesterPaysBucket(true, project);
Assert.assertEquals(
"Autodetect should have detected the RP bucket",
testRPBucket.config().userProject(),
project);
}

External references such as API reference guides

It seems the error message response changed subtly

- Bucket is requester pays bucket but no user project provided.
+ Bucket is a requester pays bucket but no user project provided.

According to public documentation, we should expect the reason to be userProjectMissing, however it is required as can be seen in

{
  "error": {
    "code": 400,
    "message": "Bucket is a requester pays bucket but no user project provided.",
    "errors": [
      {
        "message": "Bucket is a requester pays bucket but no user project provided.",
        "domain": "global",
        "reason": "required"
      }
    ]
  }
}

Related from NodeJS https://github.com/googleapis/nodejs-storage/pull/1791/files

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage-nio API.priority: p2Moderately-important priority. Fix may not be included in next release.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