Sorry for the lack of details but I’m having a really hard time to debug Chrome on my iPad…
Since I also have the problem with Safari, I can troubleshoot with the Web Inspector but I don’t get much.
At first, I thought it wasn’t working at all. But suddenly, (I think after I had restarted the API and/or the WebApp on IIS), it connected and was working fine for a long time.
But the next day, it wasn’t.
I dot not get any error when I start the client. It takes a bit of time and I end up in the onException function with the error {“isTrusted”:true}. What is strange is that it seems that the OnSubscribe is getting called on my API with a sub id, but the client never gets connected, onConnect never triggers and the hasConnected() always returns false.
When it works, the Network tab gives me this on event-stream call (which is weirdly spinning all the time)
Summary
URL: https://…/api/event-stream?channels=main&t=1646169295242
Status: 200
Source: Network
Request
Accept: text/event-stream
Cache-Control: no-cache
Origin: https://…
Referer: https://…/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15
Pragma: no-cache
Response
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
Content-Type: text/event-stream
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://…
Date: Tue, 01 Mar 2022 21:14:55 GMT
Access-Control-Allow-Headers: Content-Type,Allow,Authorization,X-Args,Access-Control-Allow-Headers,Access-Control-Allow-Origin,X-Requested-With,Cache-Control,Last-Event-ID
Cache-Control: no-cache
Vary: Accept
Server: Microsoft-IIS/10.0
x-aspnet-version: 4.0.30319
Query String Parameters
channels: main
t: 1646169295242
I do not get any errors in the backend API beside those very very very annoying Subscription xyz does not exist which I do not know how to get rid of…
Could it be something with how our Angular 12/ Ionic app is built? Would work ok with desktop but not with mobile in regards to SSE?
Thanks for your help.