Can't access offline files when Nextcloud server is down
Steps to reproduce
- Host a self-hosted Nextcloud server on my local home network only
- Sync the files on the server with the Nextcloud iOS app
- Set the files on the phone as available offline
- Turn off the computer hosting the server
- Try to access the offline files on the phone, while leaving Wifi turned on
Expected behaviour
Files should open, since no network activity should be happening to open offline files.
Actual behaviour
Get an error that can't connect to 198.168.2.35 (the private IP address of my server on my home network).
Reasoning or why should it be changed/implemented?
I'm thinking of Nextcloud as a tool to sync my phone and computer. Once the files are synced to the phone, I should be able to access them without needing to turn off my network connection, for example if I leave my house and want to access them when I'm somewhere else.
Environment data
iOS version: iOS 16.4.1(a)
Nextcloud iOS app version: 4.8.0.5
Server operating system: Linux Mint
Web server: Nextcloud Snap package
Database:
PHP version:
Nextcloud version: 25.0.6
Possible duplicate: https://github.com/nextcloud/ios/issues/2404
@mpivchev This is not a duplicate. My issue applies to all file types. The referenced issue is about specifically .txt files. My issue occurs when wifi is still turned on, but the server is turned off, whereas that issue occurs when wifi is turned off. Can you please reopen? (I can't see an option to reopen.)
I see. Will investigate this. Can you please provide a video showing this, maybe a .png or a .jpg or .mp4? Thanks.
After trying a few things I think it actually only happens with certain file types. Offline PDFs and jpgs do seem to still be accessible offline when I disconnect my server from the internet. But html files aren't. But I didn't get the same error as in my report when I tried to open one, I got an error "The request timed out". Attaching a screencast as requested (you can't see it in the video but I touched the bottom file, index.html). As you can see it hangs for about 30 seconds before giving the error.
https://github.com/nextcloud/ios/assets/31423103/e41f3918-dfb0-44d5-ac79-4c7137224c4d
Can confirm this issue is occurring on iOS 26 and Nextcloud server 32.0.1.
When the server is offline, going into the Nextcloud app and clicking on any of my offline files (whether I'm on the files tab or Manage Offline Files) does not do anything. I also do not see any client logs on my iPhone related to this error.
The workaround I have found is to open the iOS Files app, and open the Nextcloud directory. From here, you can open your offline files with any supported app. The new iOS Preview app seems to do a good job opening most common file formats.