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

[BUG] v4: File system watching is not supported on this platform (iOS) #43

Closed
meli27 opened this issue Feb 23, 2022 · 10 comments
Closed
Assignees
Labels
blocked This issue's resolution can't be worked on right now bug This issue reports broken functionality or another error

Comments

@meli27
Copy link

meli27 commented Feb 23, 2022

Hello! When I run the v4 example on iPad Air 4th gen (iOS 14.5) it returns this

═══════ Exception caught by widgets library ═══════════════════════════════════
The following FileSystemException was thrown building Consumer<GeneralProvider>(dirty, dependencies: [_InheritedProviderScope<GeneralProvider?>]):
File system watching is not supported on this platform, path = ''

The relevant error-causing widget was
Consumer<GeneralProvider> Consumer:[file:///Users/melissavillalobos/Downloads/flutter_map_tile_caching-4/example/lib/pages/home/components/panel/panel.dart:26:16]()
When the exception was thrown, this was the stack
.....

I already added the background_fetch and permission_handler configurations.
I am not sure if I did something wrong , hope someone can help, thanks.

@JaffaKetchup
Copy link
Owner

Hi there, thanks for your report.
It appears that you haven't done anything wrong on your side, as the example app should be preconfigured.
The panel in that example uses MapCachingManager.watchStoreChanges(), which internally uses .watch() from 'dart:io'. The error would lead me to believe that that method is not supported on iOS, but the official documentation contradicts that:

  • Linux: Uses inotify. The implementation supports watching both files and directories. Recursive watching is not supported. Note: When watching files directly, delete events might not happen as expected.
  • OS X: Uses FSEvents. The implementation supports watching both files and directories. Recursive watching is supported.

(I'm not sure which iOS comes under, I think it comes under OS X)

I see that you have downloaded the code onto your device. Could you please add some code just to help me debug (I can't test iOS): print() out the parentDirectory.path in use, then send that string on here . You can find this by awaiting MapCachingManager.normalCache, perhaps in the main() method? This would be a huge help, as I can see that the path that it's supposedly watching is empty.

Thanks.

@JaffaKetchup JaffaKetchup added bug This issue reports broken functionality or another error needs verification This needs to be verified/tested before fixes (or not) can be made and removed question/help labels Feb 23, 2022
@JaffaKetchup JaffaKetchup changed the title File system watching is not supported on this platform, path = '' [BUG] File system watching is not supported on this platform, path = '' Feb 23, 2022
@meli27
Copy link
Author

meli27 commented Feb 23, 2022

Hello, got it.

Right now is printing this
Screen Shot 2022-02-23 at 14 57 36

flutter: [/Users/melissavillalobos/Library/Developer/CoreSimulator/Devices/CCD52F2D-F674-4FBE-A5F3-185408E7C7FB/data/Containers/Data/Application/9011A34B-E6B0-4BF8-85B9-B3B676BA0C8D/Documents/mapCache]()

@JaffaKetchup

This comment was marked as off-topic.

@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Feb 24, 2022

Oops, sorry for that last comment. That was unrelated.
It seems the path is correct, but I'm not sure why the platform support is wrong. I will do some more digging, but (as I said before) I am very limited in my methods to debug iOS. This may be of interest: https://groups.google.com/g/flutter-dev/c/9T4aptRMmqE?

@JaffaKetchup JaffaKetchup removed the needs verification This needs to be verified/tested before fixes (or not) can be made label Feb 24, 2022
@JaffaKetchup
Copy link
Owner

I am planning to release whilst this bug is still present. Should it become a big issue, I will try to allocate more hours to solving this, but I am unfortunately quite busy at the moment.
If you have anymore information, please do comment here. Thanks!

@JaffaKetchup JaffaKetchup changed the title [BUG] File system watching is not supported on this platform, path = '' [BUG] v4: File system watching is not supported on this platform (iOS) Feb 25, 2022
@JaffaKetchup JaffaKetchup pinned this issue Feb 25, 2022
@akeblom
Copy link

akeblom commented Feb 28, 2022

I am getting the same issue.

@JaffaKetchup
Copy link
Owner

Can you both update to the latest version, and let me know if you now receive another error? Many thanks.

@akeblom
Copy link

akeblom commented Feb 28, 2022

Yes indeed. Now I get the unsupported error.

@JaffaKetchup
Copy link
Owner

Unfortunately, this is unresolvable then, as this is not this library's limitation. If you agree with my above comments (that this looks like it could be a bug in Flutter), I'd suggest creating a bug report there and linking here.
Thanks for your reports! If you can donate, please do - Kofi doesn't take a fee!

@JaffaKetchup JaffaKetchup added the blocked This issue's resolution can't be worked on right now label Feb 28, 2022
@JaffaKetchup JaffaKetchup unpinned this issue Feb 28, 2022
@meli27
Copy link
Author

meli27 commented Mar 3, 2022

flutter/flutter#99456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue's resolution can't be worked on right now bug This issue reports broken functionality or another error
Projects
None yet
Development

No branches or pull requests

3 participants