usefathom / fathom

Fathom Lite. Simple, privacy-focused website analytics. Built with Golang & Preact.
https://usefathom.com/
MIT License
7.52k stars 364 forks source link

Site switcher doesn't work #361

Closed cadusilva closed 1 year ago

cadusilva commented 1 year ago

Hello there,

Site switcher doesn't work on version 1.3.0, commit ae8d578fcab8e971e0982cd969a94e3ecfb937b0. Tried Firefox 108.0.1, Chromium 108.0.5359.125 and Chrome mobile 108.0.5359.128. Server running on Debian 11 5.10.0-20-amd64 and browsers running on Windows 11 and Android 12.

Console error as reported by Chromium desktop:

Uncaught ReferenceError: hashParams is not defined
    at script.js?t=1669482962932:1:48110
    at Array.some (<anonymous>)
    at e.value (script.js?t=1669482962932:1:48067)
    at HTMLAnchorElement.c (script.js?t=1669482962932:1:339108)
(anonymous) @ script.js?t=1669482962932:1
value @ script.js?t=1669482962932:1
c @ script.js?t=1669482962932:1

Console error as reported by Firefox desktop:

Uncaught ReferenceError: hashParams is not defined
    value https://stats.example.com/assets/js/script.js?t=1669482962932:1
    value https://stats.example.com/assets/js/script.js?t=1669482962932:1
    c https://stats.example.com/assets/js/script.js?t=1669482962932:1
[script.js:1:48110](https://stats.example.com/assets/js/script.js?t=1669482962932)
    value https://stats.example.com/assets/js/script.js?t=1669482962932:1
    some self-hosted:137
    value https://stats.example.com/assets/js/script.js?t=1669482962932:1
    value self-hosted:1356
    c https://stats.example.com/assets/js/script.js?t=1669482962932:1

The problem happens when accessing Fathom both directly, via server IP + port, and via nginx reverse proxy. Extensions like uBlock Origin and Tampermonkey are disabled or the Fathom site is in the allowlist during the use/tests.

A workaround while this is sorted out involves manually setting a number in the page URL, where it says site=N. Simply pressing Enter won't work due to the # symbol in the URL, it needs a page refresh so I can switch between sites.

Thank you and happy holidays 🎆

pfinette commented 1 year ago

Same here. Running v 1.3.0 on a Ubuntu VM (AMD) and using a bunch of browsers on macOS. Console log gives me this when I try to switch a site:

script.js?t=1669482962932:1 Uncaught ReferenceError: hashParams is not defined at script.js?t=1669482962932:1:48110 at Array.some () at e.value (script.js?t=1669482962932:1:48067) at HTMLAnchorElement.c (script.js?t=1669482962932:1:339108)

LKaemmerling commented 1 year ago

Thanks to @oetiker ! I released the bugfix as v1.3.1