78
Views
8
Comments
[SSE Push Event Hub] SSE connection is not made with iOS native app!
sse-server-event-hub-and-client
Service icon
Forge asset by Nuno Damaso
Application Type
Reactive

Hi, 

We are building a forge and facing an issue with SSE refresh only on iOS native app. We are okay with Android and web but on iOS there is no response from GET.

When debugging we are realized the logic OpenStream runs without any issue, and SSE_Open runs without any issue but on the ios, the API request has no response. From Service center we only see this issue .


We are unsure if this issue is related to the API’s being called from iOS or something else. 


This is what is saved on the Service studio:





This is the API request from the iOS phone. you can see the response body is empty instead of 200.


2024-09-08 11-13-40
Nuno Damaso
 
MVP

Hi Ali,


I have been receiving reports of this issue for IOS.

This seems to be related with the MABS 6.0 update (specifically loading from outsystems:// instead of https://) and it seems to affect not only the SSE component but some other components too.

This might be a limitation altogether but I will need some time to check this through.


Thanks for reporting

UserImage.jpg
António Ribeiro

Hi,

I'm having the same trouble, did you find any solution to this problem?


2024-09-08 11-13-40
Nuno Damaso
 
MVP

Hi Antonio,


Not yet unfortunately. I haven't had the opportunity to disclose this. On PWA's it seems fine though.

I might need some help from Outsystems, not sure, this can be as simple as a header or not.


Meanwhile I did find some posts with similar issues:

https://www.outsystems.com/forums/discussion/66214/mobile-app-error-failed-to-handle-request-nsmutableurlrequest-0x281eb1580-ios/

https://www.outsystems.com/forums/discussion/69754/unable-launch-mobile-app-it-shows-there-was-an-error-processing-your-request/


I will make an effort during this month and drop an answer here soon.

UserImage.jpg
António Ribeiro

Hi, did you had the opportunity to disclose this?

2024-09-08 11-13-40
Nuno Damaso
 
MVP

Hey Antonio, no not yet

I had some problems with my IOS developer account, and postponed it. 

I want to release a new version in the next days, can't say if this weekend or the next - I'm just missing the IOS thing and some minor docs.

UserImage.jpg
António Ribeiro

Hi Nuno,

Yes in pwa it works fine, but i'm implementing this in a native app, in android it works fine.

I will wait for further news. Thank you

2024-09-08 11-13-40
Nuno Damaso
 
MVP

I have been able to replicate this, where the first flush is completely empty.

I'm still not sure what the issue is, but I seem to be missing something required from IOS either at server-side with some header or client-side with regards to the url schema (outsystems://) or even somehow related to the switch from UIWebView WKWebView.


I have noticed that, together with the ServiceCenter Cancelled request, there seems to be a "Content Security Policy (CSP) violation" together with those errors. Could anyone confirm to have them as well?

I will try to set the CSP policies for the app, add similar headers as a normal rest request response, and add an Origin scheme to the Preflight request (IOS only).


It will take more time - I'm open to any ideas if anyone wants to add something.


2024-09-08 11-13-40
Nuno Damaso
 
MVP

Hi

I have not been able to solve this.

I have tried about everything I can think of, but for some reason the IOS implementation of the readable stream is not firing when the buffer emits at neither the native EventSource(using xhr) or the Fetch implementation.

It fires correctly when the end signal is sent, which leaves some options for a polling fallback if I am unable to solve this in the near future. I am also unable to get this sample page to work https://developer.chrome.com/articles/fetch-streaming-requests/ under safari which might be the root of it.

I am still trying to figure this out, but unfortunately had to opt it out from the current release and mark the IOS native apps as unsupported.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.