supabase / realtime-js

An isomorphic Javascript client for Supabase Realtime server.
https://supabase.com
MIT License
313 stars 53 forks source link

Losing sub connection after some time #411

Open lschaupp opened 2 months ago

lschaupp commented 2 months ago

I am losing the subscription connection and I don't know what the cause is. I am using PyBridge for the bridge between Javascript and Python. PyBridge is reporting a timeout after a couple of hours of connection. Is my current setup even correct?:

            from javascript import require
            self.js_createClient = require("@supabase/supabase-js").createClient
            self.realtime = self.js_createClient(url, SERVICE_API, {
                "db": {
                    "schema": 'public',
                },
                "auth": {
                    "autoRefreshToken": True,
                    "persistSession": True,
                    "detectSessionInUrl": True,
                    "headers": {
                        "apikey": 'custom-supabase-signed-jwt-token',
                    },
                    "params": {
                        "apikey": SERVICE_API,
                    },
                },
                "realtime": {
                    "log_level": "info",
                },
                # "global": {
                #    "fetch": "customFetch",
                #    "headers": "DEFAULT_HEADERS",
                # },
            })
            self.realtime.realtime.setAuth(SERVICE_API)
filipecabaco commented 2 weeks ago

You now have realtime-py available, could you try it? https://github.com/supabase/realtime-py