Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gax: Quota project id cannot be used in combination with no credentials #1687

Closed
irock opened this issue May 18, 2023 · 0 comments · Fixed by #1688
Closed

gax: Quota project id cannot be used in combination with no credentials #1687

irock opened this issue May 18, 2023 · 0 comments · Fixed by #1688
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@irock
Copy link
Contributor

irock commented May 18, 2023

Environment details

  1. Specify the artifact at the beginning of the title. For example, "api-common", "gax" etc)
  2. OS type and version: OSX 13.3.1
  3. Java version: 17.0.6
  4. artifact version(s): 2.24.0

Steps to reproduce

If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

  1. Create a Pub/Sub Subscriber with NoCredentialsProvider and a quota project set.
  2. The created Subscriber will not be able to process messages, but critically fail during startup.

Code example

Subscriber.newBuilder(...)
    .setCredentialsProvider(NoCredentialsProvider.create())
    .setHeaderProvider(() -> Map.of("x-goog-user-project", "test"))
    ...
    .build()
    .startAsync();

Stack trace

com.google.api.gax.rpc.UnauthenticatedException: com.google.api.gax.rpc.UnauthenticatedException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Failed computing credential metadata
        at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:116)
        at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:41)
        at com.google.cloud.pubsub.v1.StreamingSubscriberConnection$1.onFailure(StreamingSubscriberConnection.java:340)
        at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:67)
        at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1132)
        at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
        at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270)
        at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
        at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:808)
        at com.google.api.core.AbstractApiFuture$InternalSettableFuture.setException(AbstractApiFuture.java:92)
        at com.google.api.core.AbstractApiFuture.setException(AbstractApiFuture.java:74)
        at com.google.api.core.SettableApiFuture.setException(SettableApiFuture.java:51)
...

External references such as API reference guides

  • ?

Any additional information below

Following these steps guarantees the quickest resolution possible.

Thanks!

@burkedavison burkedavison added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3 Desirable enhancement or fix. May not be included in next release. labels May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants