i'm trying to setup a slack bot on my site.
Your deployed SSE endpoint is returning a non‑SSE response …and the browser immediately closes the connection. readyState: 2 means: EventSource.CLOSED
The browser tried to connect, got something that was NOT a valid SSE stream, and shut it down instantly. This is not a network issue. This is not a CORS issue. This is not a credentials issue. This is the browser saying: “I hit that URL, and the server did NOT give me a valid SSE stream.”
95c8c694ebafe2f0.js:1 SSE connecting... 1d233431dc2d0ddf.js:1 authProvider currentUser: Object 95c8c694ebafe2f0.js:1 Message sent. 95c8c694ebafe2f0.js:1 SSE error: Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …} isTrusted : true bubbles : false cancelBubble : false cancelable : false composed : false currentTarget : null defaultPrevented : false eventPhase : 0 returnValue : true srcElement : EventSource onerror : e=>console.log("SSE error:",e) onmessage : e=> {…} onopen : ()=>console.log("SSE connection opened") readyState : 2 url : "https://eldarlandslarp.appwrite.network/api/slack/stream" withCredentials : false [[Prototype]] : EventSource target : EventSource onerror : e=>console.log("SSE error:",e) onmessage : e=> {…} onopen : ()=>console.log("SSE connection opened") readyState : 2 url : "https://eldarlandslarp.appwrite.network/api/slack/stream" withCredentials : false [[Prototype]] : EventSource timeStamp : 35299.5 type : "error" [[Prototype]] : Event
I can help! Your SSE endpoint isn't sending valid Server-Sent Events format. The browser expects a specific format with Content-Type: text/event-stream and data in the SSE format (data: ...\n\n), but it's getting something else instead. What does your /api/slack/stream endpoint currently return? Can you share the code that handles that route?
I can see your frontend code, but I need to see the backend code the actual /api/slack/stream endpoint that's supposed to return the SSE stream. The issue is on the server side. Your endpoint needs to: Set headers: Content-Type: text/event-stream Send data in SSE format: data: {...}\n\n Keep the connection open Can you share the server-side code that handles the /api/slack/stream route? That's where the problem is.
AH you mean these.
Can you just send me a message if you don’t mind
Recommended threads
- How can I disable client-side account re...
Hi everyone! I’m currently building a game backend using Appwrite, and I’d like to prevent users from creating new accounts directly through the client. My go...
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...
- Domain is owned by a different organizat...
Hi Appwrite team, I'm trying to add my custom domain **futlive9.com** to my project, but I'm getting the error: "Domain is owned by a different organization." ...