hrm, ok, i’ve got some of those logs around the connection, does this help at all?
When the issue triggers, I get a new websocket connection in the browser console. This shows what you described - a redirect, which is followed by that same authorization error, and then the leave events.
# message 1 (06:30:50)
[
"19",
"19",
"lv:phx-GC2DPcp2YEoImw2C",
"phx_join",
{
"redirect": "https://(redacted)",
"params": {
"_csrf_token": "(redacted)",
"_track_static": [
"https://(redacted)/assets/app.css",
"https://(redacted)/assets/app.js"
],
"_mounts": 1,
"_mount_attempts": 0,
"_live_referer": "(redacted)"
},
"session": "(redacted)",
"static": "(redacted)",
"flash": null
}
]
# message 1 response (06:30:51)
[
"19",
"19",
"lv:phx-GC2DPcp2YEoImw2C",
"phx_reply",
{
"status": "error",
"response": {
"reason": "unauthorized"
}
}
]
# message 2 (06:30:51)
[
"19",
"20",
"lv:phx-GC2DPcp2YEoImw2C",
"phx_leave",
{}
]
After this happens, I then see the log in the server logs (assuming the timestamps are reasonably accurate).
2025-03-17 06:30:51.022 [warning]
mfa=Phoenix.LiveView.Channel.authorize_session/3
navigate event to "(redacted)" failed because you are redirecting across live_sessions. A full page reload will be performed instead
Then in the browser, I get the next websocket connecting. This seems more like the full page load, not errors in this one.
# message 1 (06:30:56)
[
"4",
"4",
"lv:phx-GC2DWaHB-O9pYgJC",
"phx_join",
{
"url": "(redacted)",
"params": {
"_csrf_token": "(redacted)",
"_track_static": [
"https://(redacted)/assets/app.css",
"https://(redacted)/assets/app.js"
],
"_mounts": 0,
"_mount_attempts": 0
},
"session": "(redacted)",
"static": "(redacted)"
}
]
# message 1 response
[
"4",
"4",
"lv:phx-GC2DWaHB-O9pYgJC",
"phx_reply",
{
"status": "ok",
"response": {
"liveview_version": "1.0.2",
"rendered": {
(bunch of html/diff)
}
}
}
]