This issue is already fixed on master.
Without wanting to abuse Anton, could you tell me if it was on the Web or server? On the server I commented these lines in the OverrideFilter.java file and the error stopped.
Thanks.
Commented code
if (((HttpServletRequest) request).getServletPath().startsWith("/api")) {
chain.doFilter(request, response);
return;
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
/* if (((HttpServletRequest) request).getServletPath().startsWith("/api")) {
chain.doFilter(request, response);
return;
}*/
ResponseWrapper wrappedResponse = new ResponseWrapper((HttpServletResponse) response);
chain.doFilter(request, wrappedResponse);
byte[] bytes = wrappedResponse.getCapture();
if (bytes != null) {
if (wrappedResponse.getContentType() != null && wrappedResponse.getContentType().contains("text/html")
|| ((HttpServletRequest) request).getPathInfo().endsWith("manifest.webmanifest")) {
Server server;
try {
server = permissionsServiceProvider.get().getServer();
} catch (StorageException e) {
throw new RuntimeException(e);
}
String title = server.getString("title", "Traccar");
String description = server.getString("description", "Traccar GPS Tracking System");
String colorPrimary = server.getString("colorPrimary", "#1a237e");
String alteredContent = new String(wrappedResponse.getCapture())
.replace("${title}", title)
.replace("${description}", description)
.replace("${colorPrimary}", colorPrimary);
response.setContentLength(alteredContent.length());
response.getOutputStream().write(alteredContent.getBytes());
} else {
response.getOutputStream().write(bytes);
}
}
}
I apologize Anton, it was not resolved by commenting on the lines mentioned above, after deleting, I went to navigate to another page and was logged out again. I thought it was important to add so that other users don't think it's the solution.
Look through git history.
Anton, I didn't find it in the history, please could you at least give a date, last week, last month. I downloaded the front directly from the master and the error still persists, the UpdateController.tsx file.
https://github.com/traccar/traccar-web/commit/85d5322a78332175fd870e588469fc9653fa8257
Thank you very much Anton.
It worked perfectly Anton. Thanks!
Greetings. Could anyone guide me how to solve this problem? This happens when deleting a user.
There are no errors in the logs.ser.
I saw something in a topic but in the version 5.9 code this implementation already exists.
Thank you in advance, have a great day everyone!
Correção
https://github.com/traccar/traccar-web/commit/47ffffb6f90bfd9a8aaae1fd696d588c175c94a6
Error
Log's