googleapis / elixir-google-api

Elixir client libraries for accessing Google APIs.

Home Page:https://hex.pm/users/google-cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elixir-google-api broke with latest gcloud pub/sub emulator 0.7.1

cwang25 opened this issue · comments

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Is this a client library issue or a product issue? We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.

If the support paths suggested above still do not result in a resolution, please provide the following details.

Environment details

  • Programming language: Elixir
  • OS: Linux
  • Language runtime version: 1.13
  • Package version: 0.36

Steps to reproduce

  1. Set up gcloud cli env
  2. Run gcloud -q components install pubsub-emulator
  3. Confirm the installed emulator version is 0.7.1
  4. Start using and connecting emulator via elixir-google-api
  5. Error will show and seems occurs in java as underlying protocol related erros
WARNING: Metadata key is 'Connection', which should not be used. That is used by HTTP/1 for connection-specific headers which are not to be forwarded. There is probably an HTTP/1 conversion bug. Simply removing the Connection header is not enough; you should remove all headers it references as well. See RFC 7230 section 6.1
java.lang.RuntimeException: exception to show backtrace
	at io.grpc.Metadata$Key.validateName(Metadata.java:740)
	at io.grpc.Metadata$Key.<init>(Metadata.java:762)
	at io.grpc.Metadata$Key.<init>(Metadata.java:671)
	at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:971)
	at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:966)
	at io.grpc.Metadata$Key.of(Metadata.java:708)
	at io.grpc.Metadata$Key.of(Metadata.java:704)
	at io.gapi.emulators.grpc.HttpAdapter$StubMethodHandler.handle(HttpAdapter.java:537)
	at io.gapi.emulators.grpc.HttpAdapter$UnaryMethodHandler.handle(HttpAdapter.java:572)
	at io.gapi.emulators.grpc.HttpAdapter.handleRequest(HttpAdapter.java:195)
	at io.gapi.emulators.netty.HttpHandler.channelRead(HttpHandler.java:52)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:[296](https://github.com/compound-finance/treasury/actions/runs/3371781924/jobs/5594978958#step:14:297))
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.lang.Thread.run(Thread.java:829)
(CaseClauseError) no case clause matching: {:error, %Tesla.Env{__client__: %Tesla.Client{adapter: nil, fun: nil, post: [], pre: [{Tesla.Middleware.Headers, :call, [[{"authorization", "*** token"}]]}]}, __module__: GoogleApi.PubSub.V1.Connection, body: "{\"error\":{\"code\":500,\"message\":\"RST_STREAM closed stream. HTTP\\/2 error code: PROTOCOL_ERROR\",\"status\":\"INTERNAL\"}}", headers: [{"content-length", "115"}, {"content-type", "application/json"}], method: :put, opts: [], query: [], status: 500, url: "http://localhost:18086/v1/projects/treasury-integration/topics/treasury"}}

Confirmed that if uses older pub_sub_emulator version the error won't occur. But gcloud command doesn't allow to install pub_sub_emulator with specific version.

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!