Open tobiaskn opened 11 months ago
I'm sorry to hear that. I've had experienced the issue with network access in Brave, where they explicitly prohibited apps to connect to localhost. In your case, it is not even connecting to localhost. I've tried with an internet search but could not find anything relevant.
In the meantime, may I suggest to try the same with a new version of Cashier: https://cashier-ii.alensiljak.eu.org ? It is using the same fetch so will likely result in the same error but may provide different information.
Thanks for replying so quickly. I’ll try your suggestion tomorrow when I have access to my local server. I could also imagine that the cause is some permission issue on iOS, but it’s hard to track down.
I'm sure it is a security feature. That implies that there might be a permission that can be added. Just checked in Cashier II. I removed the menu for testing this. I could add it back soon. A simple page with a text box, where one can enter a URL and have it try to connect. Some are blocking the network requests from a PWA for various reasons and that's not a bad thing. But it would be good to also have a user being able to allow it because there are also legitimate reasons to have that functionality. Not everyone works with a cloud server.
I now also checked with Cashier II, but the result is nearly the same: Now I get three error notifications:
Looking at this support page from Apple (https://support.apple.com/en-mk/102229) it seems that apps require this particular "Local Network" permission. However, the PWA didn't ask for it and there's no way to add this manually without the app having asked for it. I also tried with another iPhone (same iOS version) from a family member and the result was the same.
I'll keep googling a bit for potential causes for this but I'm not overly optimistic that it can be solved easily.
Thanks for the link. I'll see how to request this. A similar situation was at some point with the permanent storage in IndexedDb. But the browser would ask automatically on the first access.
A few more links to watch
I'm still having trouble understanding why is Apple so erratic about PWAs.
Using the live app that you provide, I'm not able to use CashierSync. After entering the server URL/IP ("http://192.168.x.y:3000") and clicking on "Test" I get a notification "Connecting to CashierSync: Load failed".
I'm using Safari on the phone. When I manually enter the server URL in a browser tab on Safari I receive a "pong" in response to the "ping" and I can see the successful request in the server logs.
Do you have any idea what might be causing this issue? Thanks a lot!