Meteor WebSocket not working properly on iOS browser like Safari

Hello everyone!

Do you also encounter some issues with your Meteor Web app not working properly when viewed on iOS Safari or Chrome but working fine in Browsers on Windows and Mac (specifically I assume the issue is about the WebSocket since I am seeing that it is being closed right away not responding when I tested it on my iPad).

At first, I thought Browserstack was blocking or there was a problem with the WebSocket connection when locally testing (I am using Browserstack for testing on other devices). But when I tried on my real iPad device it also had the same issue.

Do you guys have any idea where to start looking for a solution?

Really appreciate any response. :slightly_smiling_face:

Is it this issue?

Only other time I had iOS specific problems I ended up needing to play with the supported browsers of the legacy bundle.

1 Like

I think this is different. I want to reference this issue from Safari forum Our web-application doesn't resume… | Apple Developer Forums

I checked Safari forum with bunch of issues not being solved with regards to WebSocket

Related Links:

The root cause of the problem is country-state-city npm package that was used in the client-side (React) of the MeteorJs Web app that we have. That is why it is displaying a RangeError: Maximum call stack size exceeded and then the web socket constantly open and closing over and over again.

We removed the said package and fetch the cities we need base on state code from the meteor method.

We initially identify the problem by looking at the file that is being called on itself and also by running meteor run --exclude-archs web.browser.legacy,web.cordova --port 4000 --extra-packages bundle-visualizer --productio to see and visualize what are the packages that makes up the size of the project.

Thanks to @filipenevola