shiori icon indicating copy to clipboard operation
shiori copied to clipboard

Failed to check token error

Open rmayergfx opened this issue 10 months ago • 8 comments

ERRO[2025-01-09T14:34:06Z] Failed to check token error="error parsing token: error parsing token: token is malformed: token contains an invalid number of segments"

v1.7.4 installed in docker.

Error is seen when i try to access via web-extension or after reboot.

how to fix this?

rmayergfx avatar Jan 09 '25 14:01 rmayergfx

Hello same for me on freebsd just after an upgrade from the git repo from the latest v1.7.4

time="2025-01-10T20:30:49+01:00" level=warning msg="x.x.x.x- shiori [10/Jan/2025:20:30:49 +0100] \"GET /api/v1/auth/me\" 403 27 \"https://domain.fr/\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36\" (1ms)" clientIP=x.x.x.x dataLength=27 hostname=shiori latency=1 method=GET path=/api/v1/auth/me referer0

Authentication never finish ... When I press CTRL + F5 I can login in kind of "read only mode", I can read my url but can't add it anymore.

Oxyaxion avatar Jan 10 '25 19:01 Oxyaxion

Can you provide more details about your setup, as the issue template suggests? I have been running 1.7.4 before release (I test releases manually) and I haven't experienced any of this. What browser are you using? What do you see in the browsers console?

fmartingr avatar Jan 10 '25 19:01 fmartingr

Everything works fine after a whole reboot of the plateform ... probably yet another nginx/reverse-proxy/ browser cache issue ... Sorry for the noise.

Oxyaxion avatar Jan 13 '25 08:01 Oxyaxion

I actually have the same error even after full restart: I simply did: docker pull ghcr.io/go-shiori/shiori Then mounted: ./data:/shiori Thanks

tarbib avatar Feb 11 '25 12:02 tarbib

Why is this closed? Still having this issue on Docker on Synology NAS, nothing changed. Also the webextension is still not working with the latest version...

rmayergfx avatar Feb 12 '25 10:02 rmayergfx

Why is this closed? Still having this issue on Docker on Synology NAS, nothing changed. Also the webextension is still not working with the latest version...

Ups sorry I thought one of the answers that said it was working ok was yours 😅

fmartingr avatar Feb 12 '25 10:02 fmartingr

I think the problem happens before you login, when you neither have an Authorization header nor a token cookie.

A quickfix could be to add a check against empty values in the auth middleware before checking it.

if token == "" {
return
}

pudymody avatar Feb 22 '25 19:02 pudymody

I think the problem happens before you login, when you neither have an Authorization header nor a token cookie.

A quickfix could be to add a check against empty values in the auth middleware before checking it.

if token == "" { return }

Thanks for the hint, fixed in #1064, available in the next release.

fmartingr avatar Mar 01 '25 09:03 fmartingr