Local files not opening on iOS simulator after restart

Viewed 440

I am trying to read and write local files in Flutter and till then everything is ok.

But then when i restart the simulator i get the error:


════════ Exception caught by image resource service ════════════════════════════
Cannot open file, path = '/Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/8A33D1B7-4647-4255-A759-65835BE2DBE6/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-17T23:57:11.239738Z.png' (OS Error: No such file or directory, errno = 2)
════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by image resource service ════════════════════════════
Cannot open file, path = '' (OS Error: Bad address, errno = 14)
════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: FileSystemException: Cannot open file, path = '' (OS Error: Bad address, errno = 14)

The strange thing is that i have a file in which i save all the paths for the images, and it is ok to read it.

I just save some images with DateTime.now() name and when i use Directory(path).list() i get them there:

flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/local_mask_files
flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-15T06:35:21.536337Z.png
flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-15T06:37:47.983926Z.png
flutter: /Users/username/Library/Developer/CoreSimulator/Devices/5A353A88-24B3-469C-9C9B-D2542FCAE084/data/Containers/Data/Application/95822A0C-C6E5-4A01-8267-04DC0054B57C/Documents/images/FzIkrXlx2OheqTzKp1AfffGFxMm1/savedPng/2020-08-17T23:57:11.239738Z.png

Is this a bug?

0 Answers
Related