Possible bug in Events report after "Address in events report" change causes 414 (Request-URI Too Long)

Andres16 days ago

Hello everyone,

I think I've found a possible bug in the Events report related to this change:
Commit: Address in events report: 0fa27548b1260007b2e38483a9d894d0436ddcf2 (traccar-web).

Symptom:
When running an Events report for one device over one month, I get approximately 1,300 events. Immediately after the report loads, the web client issues a request to get all related positions, like this:

GET /api/positions?id=9798462&id=9798477&id=9798525&id=9798582&id=9798609&id=... (thousands of characters)

The proxy responds:

414 Request-URI Too Long
The length of the requested URL exceeds the capacity limit of this server.

The browser console shows: Failed to load resource: the server responded with a 414 (Request-URI Too Long).

Steps to reproduce:

  1. Run the Events report for a single device with a wide time range (e.g., one month) that generates more than ~1,300 events.
  2. Observe the subsequent request to /api/positions with thousands of id= parameters.

Thanks!

Anton Tananaev16 days ago

What is the use case for loading 1300 events with positions?

Andres16 days ago

Hi Anton,
for example, event types box: all events, on devices one or more devices, in period: the previous month.

Andres16 days ago

When performing other tests, the most common events generated in a month are vehicle ignition on and ignition off.

More than 800 can occur in a month, generating a 414 URL limit error.

Anton Tananaev16 days ago

Implemented a workaround for now to limit number of positions in the request.

Andres15 days ago

Thanks!