ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
700 stars 57 forks source link

Authentication issue #307

Closed JustRedTTG closed 1 month ago

JustRedTTG commented 2 months ago

Latest remarkable version has this error connecting to rmfakecloud, guessing maybe they updated the authentication token format since it states that in the following log I captured from my docker when my remarkable was stuck on "logging in..."

172.20.0.1 | GET      \"/notifications/ws/json/1\""
level=warning
msg="[auth-middleware]token parsing:wrong token format"

As a developer I might fork and check if I can hack this to work again in my spare time but I'm just putting the issue be known

nemunaire commented 2 months ago

Hi @JustRedTTG !

Could you check that you are still paired to your rmfakecloud account?

I think you just need to unpair/pair your device.

This error seems to be related to an empty auth token in the request.

Here is a HTTP dump of the reproduced error, right after upgrade:

GET /notifications/ws/json/1 HTTP/1.1
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Key: AaBbCcDdEeFfGgHhIiJjKk==
Sec-WebSocket-Version: 13
Authorization: Bearer
User-Agent: xochitl/3.11.0.849 (codex 4.0.447-3-g19f36ec9-dirty)
HTTP/1.1 401 Unauthorized
Content-Type: text/plain; charset=utf-8
Date: Thu, 09 May 2024 06:41:29 GMT
Content-Length: 12

Unauthorized

As we can see, the Authorization header lacks the token.

JustRedTTG commented 2 months ago

Right, it seems it was a bug on the remarkable side, even though I actually reinstalled the proxy after updating and it asked me to pair (where this issue occurred) but I later tried to pair again and it did in fact work just fine