Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Load failed" error when trying to sync on iOS 17.2 #1

Open
tobiaskn opened this issue Dec 23, 2023 · 7 comments
Open

"Load failed" error when trying to sync on iOS 17.2 #1

tobiaskn opened this issue Dec 23, 2023 · 7 comments

Comments

@tobiaskn
Copy link

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!

@alensiljak
Copy link
Owner

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.

@tobiaskn
Copy link
Author

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.

@alensiljak
Copy link
Owner

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.

@tobiaskn
Copy link
Author

I now also checked with Cashier II, but the result is nearly the same: Now I get three error notifications:

  1. "Error: TypeError: Load failed"
  2. No accounts received
  3. Root investment account not set

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.

@alensiljak
Copy link
Owner

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.

@alensiljak
Copy link
Owner

A few more links to watch

@alensiljak
Copy link
Owner

https://appleinsider.com/articles/24/03/01/apple-reverses-course-on-death-of-progressive-web-apps-in-eu

I'm still having trouble understanding why is Apple so erratic about PWAs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants