You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
teolemon
added
🤳🥫 Scan
We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
🐛 bug
Something isn't working
labels
Oct 25, 2023
Looks like it's an error specific to ios.
We're using the "Application Support" directory that does not seem to be clearer automatically (e.g. when space is needed).
Since iOS 8.0, every time you rebuild your code, the name of the application folder (which contains your documents and library directories) changes. This is the intended behaviour.
So if you want to store a path, you should only store the filename, and then combine it with the location of the documents directory on the fly. This way, it will always point to the correct location.
And indeed we're storing the full path in the background tasks (e.g. '/var/mobile/Containers/Data/Application/23AE7B1D-8B8C-4F4D-BD35-E1A8CC463589/Library/Application Support/full_image_4.jpeg').
The solution, specific to ios, would be to retry with the same filename but with the latest generation of the folder.
I can code that, I just cannot test it on actual ios devices.
(for the record, on android the same path is something like '/data/data/org.openfoodfacts.scanner/files/full_image_1.jpeg.cropped.jpg')
Sentry Issue: SMOOTHIE-2BF
Background task error (PathNotFoundException: Cannot open file, path = '/var/mobile/Containers/Data/Application/4639D148-C579-4CC4-9A11-267614A0DDE4/Library/Application Support/full_image_4.jpeg' (OS Error: No such file or directory, errno = 2))
debug
10:01:47
default
New permission value: DevicePermission{permission: Permission.camera, status: DevicePermissionStatus.granted}
The text was updated successfully, but these errors were encountered: