elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.41k stars 558 forks source link

Reloading Elk is required to see my newly posted content #2427

Open akaregi opened 11 months ago

akaregi commented 11 months ago

Description

When I compose a new post and send it to the server, the server will process it but Elk won't show its post. To review the post, I need to reload Elk.

I don't know if this is Elk-side problem or other-side one.

Behavior

Expected:

Actual:

System info

Environment:

Error (Outputs from DevTools console):

entry.3481dbe8.js:8  WebSocket connection to 'wss://go.ecarlate.app/api/v1/streaming?stream=user' failed: 
(anonymous) @ entry.3481dbe8.js:8
connect @ entry.3481dbe8.js:8
stream @ entry.3481dbe8.js:8
streamUser @ entry.3481dbe8.js:8
r.value @ entry.3481dbe8.js:8
v @ notification.b15faa75.js:1
home:1

Uncaught (in promise) Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 0, …}

System behavior:

Other info

illfygli commented 2 months ago

I have the same issue. I noticed that the request contains an access token on Semaphore:

wss://a.gts.instance/api/v1/streaming?stream=user&access_token=TOKENSTUFFZ5QAQKKMUTN5P4SKTEF5PRMQMSCH742MXVCQQ

But not on Elk:

wss://a.gts.instance/api/v1/streaming

Comparing the request headers, it looks as if Elk is sending the access token in a Sec-Websocket-Protocol header instead.

illfygli commented 2 months ago

Might get fixed on the GtS end soon: https://github.com/superseriousbusiness/gotosocial/pull/3169

shuuji3 commented 1 month ago

The above PR was merged recently so it should be available on snapshot releases. It would be helpful if someone using the snapshot version can confirm this issue was also fixed. 🙂

akaregi commented 1 month ago

Thank you for updates! Unfortunately, I couldn't confirm that the problem is fixed.However, the error like WebSocket connection to 'wss://go.ecarlate.app/api/v1/streaming?stream=user' failed: has been disappeared.

Tested in:

This may be my deployment problem (I've changed the base from Docker to K8S), so I hope someone will test if the problem still exists too.