Token / share links not working (in preview)

Andres11 days ago

Hi, i’m testing the latest web UI from master together with the current preview server build from the downloads page.

I noticed that commit 8040a23fd9bae08bd7253d89e60b0639ce417daa (token revocation) introduces database changes, so there might be a mismatch between the preview server and the latest web app.

What I’m seeing:

Using “Share device” generates the link and token correctly, but opening that URL in another browser/incognito just redirects to the login page.

The same happens with tokens generated from User Preferences: the token is created, but using it only redirects to login and never starts a valid session.

If I run both server and web locally from the latest GitHub master, everything works correctly. The problem appears only when combining the latest web UI with the preview server build.

Would it be possible to release a new preview version to test the latest improvements?

Thank you very much for your help and for all your work on Traccar.

Anton Tananaev10 days ago

Preview is probably outdated.

Andres10 days ago

Hi Anton,
Quick update in case it helps others using preview builds.

After updating to the latest preview (with token revocation support), I found that in my case the problem was not the code, but the database state from older previews.

On my production database, the DATABASECHANGELOG table already had the changelog-6.11.0 changeSet marked as executed from a previous preview, but the tc_revoked_tokens table did not exist. Because of that, the new token validation logic was always querying a non-existent table, and every token/share link silently failed and redirected to the login page.

The fix was simply to create the missing table manually:

CREATE TABLE tc_revoked_tokens (
  id BIGINT NOT NULL,
  PRIMARY KEY (id)
);

After creating the table, token and share links started working normally.

Anton thank you for releasing the new preview. It helped me track down this edge case, and hopefully this note will save some time for other users who upgraded through multiple preview builds.