Sporadic 400 BAD REQUEST responses from Matomo

I am trying to analyze a phenomenon on our Matomo installation. When accessing our website, several users can constantly reproduce BAD REQUEST responses from Matomo while scrolling our page. For other users, this does not happen. My admins say there is no messages in Matomo logs about any errors.

Here is a screenshot how it looks like in Dev Tools Network Monitor:

Here are the Request headers of the failing request:

And here the Response Headers:

When looking at the Payload of the XHR request, it contains this:

hsr_vid=RE5OAX&hsr_ev[0][ti]=20872&hsr_ev[0][ty]=6&hsr_ev[0][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.997755%200.06697%20-0.06697%200.997755%2028.592806%20-22.534315)%22%7D%7D%5D%7D&hsr_ev[1][ti]=20888&hsr_ev[1][ty]=6&hsr_ev[1][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.999366%200.035597%20-0.035597%200.999366%2015.002031%20-12.210111)%22%7D%7D%5D%7D&hsr_ev[2][ti]=20838&hsr_ev[2][ty]=3&hsr_ev[2]=0&hsr_ev[2][y]=406&hsr_ev[3][ti]=20905&hsr_ev[3][ty]=6&hsr_ev[3][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.999998%20-0.002094%200.002094%200.999998%20-0.868824%200.734786)%22%7D%7D%5D%7D&hsr_ev[4][ti]=20922&hsr_ev[4][ty]=6&hsr_ev[4][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.999289%20-0.03769%200.03769%200.999289%20-15.399994%2013.501651)%22%7D%7D%5D%7D&hsr_ev[5][ti]=20939&hsr_ev[5][ty]=6&hsr_ev[5][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.997466%20-0.071149%200.071149%200.997466%20-28.653149%2025.982954)%22%7D%7D%5D%7D&hsr_ev[6][ti]=20956&hsr_ev[6][ty]=6&hsr_ev[6][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.994301%20-0.106611%200.106611%200.994301%20-42.267946%2039.722861)%22%7D%7D%5D%7D&hsr_ev[7][ti]=20972&hsr_ev[7][ty]=6&hsr_ev[7][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.989876%20-0.141938%200.141938%200.989876%20-55.385013%2053.938709)%22%7D%7D%5D%7D&hsr_ev[8][ti]=20994&hsr_ev[8][ty]=6&hsr_ev[8][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.984564%20-0.175023%200.175023%200.984564%20-67.260914%2067.736969)%22%7D%7D%5D%7D&hsr_ev[9][ti]=21006&hsr_ev[9][ty]=6&hsr_ev[9][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.97771%20-0.20996%200.20996%200.97771%20-79.364917%2082.824742)%22%7D%7D%5D%7D&hsr_ev[10][ti]=21022&hsr_ev[10][ty]=6&hsr_ev[10][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.969616%20-0.244631%200.244631%200.969616%20-90.924166%2098.333821)%22%7D%7D%5D%7D&hsr_ev[11][ti]=21039&hsr_ev[11][ty]=6&hsr_ev[11][te]=%7B%22att%22%3A%5B%7B%22id%22%3A969%2C%22attributes%22%3A%7B%22transform%22%3A%22matrix(0.960876%20-0.276979%200.276979%200.960876%20-101.292698%20113.297863)%22%7D%7D%5D%7D&hsr_ev[12][ti]=21055&hsr_ev[12][ty]=6&hsr_ev[12][te]=%7B%22att%22%3A%5B%7B%22id%22%3A882%2C%22attributes%22%3A%7B%22class%22%3A%22frame%20frame-type-text%20frame-layout-0%20frame-space-before-none%20frame-space-after-medium%20frame-padding-top-none%20frame-padding-bottom-none%20frame-%20ce-icon-inframe%20ce-icon-block-left%20d-flex%20d-sm-flex%20d-md-flex%20d-lg-flex%20d-xl-flex%20d-xxl-flex%20aos-init%22%7D%7D%5D%7D&hsr_ev[13][ti]=21056&hsr_ev[13][ty]=6&hsr_ev[13][te]=%7B

We are using the following plugins:
A/B Testing
Heatmap & Session Recording
Conversion Export

There seem to be no direct consequences of these errors, tracking seems to work fine, but we are determined to find and eliminate the cause. We’re just out of ideas how to track this down further.

Can anyone help with finding the origin of this failing message (what is this Payload about?) and help to narrow down the cause for the BAD REQUEST?

Hi @Jan089
Looking at the querystring, it seems this is a request for Heatmap / Session recording.
Then I updated your post category in consequence.
Maybe @innocraft have an idea about this problem?

1 Like

Hi @Jan089 ,

This request is related to Heatmaps and Session recording.

Thanks! Any ideas where to look and what to check to find the root cause for the 400 BAD REQUEST response? Or is this maybe known or expected for Heatmaps and Session recording occasionally?