HTTP/415 received when configuring a github trigger(Invalid media type)

Problem:

After configuring a github trigger, the Harness delegate will throw one or more of the following when attempting to utilize the new trigger:

  • Uncaught exception resembling:
> io.grpc.StatusRuntimeException: UNAVAILABLE: HTTP/2 error code: NO_ERROR Received Goaway session_timed_out 
>  at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244) 
> ....

* HTTP/415 response received(Invalid media type) received on github side.

Resolution:

This is indicative of github being configured to send/accept the wrong content-type, as the harness manager only communicates over https using content-type application/json, you can check your github webhook configuration to ensure it is correct by doing the following:

  1. Navigate to your github repository that has the problematic webhook, and click ‘Settings’:




  2. On the left menu, then click ‘Webhooks’, and to the right you will see a drop-down box labeled ‘Content type’, it should read application/json as follows:

  1. If you find it is set to ‘application/x-www-form-urlencoded’, simply update the webhook to the proper content outlined above, save it and you should be set.
2 Likes