APM Rum error code 400, data decoding error: gzip: invalid header

Hi

We are getting "error code 400, data decoding error: gzip: invalid header" when using the Rum agent. We can see the request Content-type header is set to "gzip", but it is not a header we are setting. Are we missing something in the backend, for supporting gzip, or is the client side which is wrong?

The Rum agent configuration is this

app.use(ApmVuePlugin, {
    router,
    config: {
      serviceName: 'Sagshylden',
      serverUrl: 'https://apm.app-logging.domdev.lan:443',
      environment: 'development',
    },
  })

And the client error is this

[Elastic APM] Failed sending events! Error: https://apm.app-logging.domdev.lan:443/intake/v2/rum/events HTTP status: 400 data decoding error: gzip: invalid header

/Casper

Hi @Casper_Thrane,

Can you confirm which version of the agent you are using? Also can you share the Elastic npm imports you are using in the project (both the agent and Vue extension)?

I would double check you're using the Elastic RUM agent and not the Elastic Node.js APM agent. I found a similar issue here which was down to using the wrong agent in the app.

Let us know!

This is the depedency we are using

"@elastic/apm-rum-vue": "2.1.6"

Ok, which version of Vue are you using it with?

We are using ver. 3.4

Thanks for confirming. I did come across an old issue from a prior version that showed that Mirage mocks were interfering with the agent. Can you check if you are using that?

If not can you share the request and response headers?

We found the error. Our developer had setup up a gateway, which zipped all content and added to the Content-type: gzip. He has now create a passthrough rule all @elastic/apm-rum-vue calls.

1 Like