Traccar 6.1 with nginx frontend cycle reload /modern/

Eradicator7 months ago

Hi!
I got some troubles with my installation of traccar + nginx fronend.
From android phone traccar web UI opens without problems, but from PC browsers loading is cycled on https://<sitename>/modern/
with requests:

"GET /modern/app.css HTTP/2.0" 404 90
"GET /modern/load.js HTTP/2.0" 404 90

This server was installed two years ago, and nginx config doesn't changed from this times, but traccar got update every release.
Thank you in advance!

Anton Tananaev7 months ago

Make sure you clear all the browser cache related to the app.

Eradicator7 months ago

Did it twice, but it not helped.

Anton Tananaev7 months ago

What did you do exactly? Please provide a screenshot.

Eradicator7 months ago

Now i'm completly rebuild my nginx config with this guide:
https://rcs.is/knowledgebase/1742/How-to-Install-the-Traccar-GPS-Tracking-System-on-Ubuntu-20.04-LTS.html
but it still not working.
I'm even tried to connect from my windows laptop which never used before for browsing traccar.

Anton Tananaev7 months ago

I can tell you that Traccar 6.1 does not use modern subfolder, so you're clearly missing something.

Eradicator7 months ago

Here is what i got when try to curl my server

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Traccar</title>
<link rel="icon" sizes="192x192" href="/icon.png">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="spinner"></div>
<script>localStorage.getItem('legacyApp') || location.replace('/modern/');</script>
<div id="update"><a href="javascript:localStorage.removeItem('legacyApp') || location.replace('/modern/');">Switch to Modern App</a></div>
<div id="attribution">Powered by <a href="https://www.traccar.org/" target="_blank">Traccar GPS Tracking System</a></div>
<script id="loadScript" src="load.js"></script>
</body>
</html>
Anton Tananaev7 months ago

This is from an old version. Definitely not Traccar 6.1.

Eradicator7 months ago

so, lets reinstall it. it will takes couple of minutes

Eradicator7 months ago
 1005  systemctl stop nginx
 1006  systemctl stop traccar
 1007  wget https://www.traccar.org/download/traccar-linux-64-latest.zip
 1008  unzip traccar-linux-64-latest.zip 
 1009  ./traccar.run 
 1010  chown -R traccar:traccar /opt/traccar
 1011  rm traccar*
 1012  rm README.txt 
 1013  systemctl start traccar
 1014  systemctl status traccar
 1015  systemctl start nginx
 1016  systemctl status nginx

and same html in answer
maybe i need to clean something in /opt/traccar?

Eradicator7 months ago

Seems like i'm done it.
I clean /opt/traccar with backup of my config, and then done clean installation. Now all fine. Thank you for your help!

tecseguridad7 months ago

Hello, next time you need to update, I recommend uninstalling Traccar as described in the documentation. This way, you won't encounter any problems.

https://www.traccar.org/linux/

Greetings