SupabaseS
Supabase•3mo ago
Sebas

`MalformedJWT` error in local development

I am testing the basic building blocks of the Broadcast feature by simply testing the publishing of one broadcast message to a channel.
However, when running the script you see attached with:
SUPABASE_URL="http://localhost:54321"
SUPABASE_KEY=<Secret_Key>

(<Secret_Key> is the sb_secret_ key given by supabase status)

I get continuous error logs:
šŸ“” Channel status: CHANNEL_ERROR
šŸ“” Channel status: CHANNEL_ERROR
šŸ“” Channel status: CHANNEL_ERROR
šŸ“” Channel status: CHANNEL_ERROR


The logs from the realtime docker container show:
17:21:27.686 project=realtime-dev external_id=realtime-dev error_code=MalformedJWT [error] MalformedJWT: The token provided is not a valid JWT
17:21:28.716 project=realtime-dev external_id=realtime-dev error_code=MalformedJWT [error] MalformedJWT: The token provided is not a valid JWT
17:21:28.763 project=realtime-dev [info] Billing metrics: [:realtime, :connections]
17:21:30.738 project=realtime-dev external_id=realtime-dev error_code=MalformedJWT [error] MalformedJWT: The token provided is not a valid JWT
17:21:33.777 [info] Replica region not found, defaulting to Realtime.Repo
17:21:33.782 project=realtime-dev [info] Billing metrics: [:realtime, :connections]
17:21:35.763 project=realtime-dev external_id=realtime-dev error_code=MalformedJWT [error] MalformedJWT: The token provided is not a valid JWT


How can I fix this? What am I doing wrong?
image.png
Was this page helpful?