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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Crash mapbox::sqlite::Exception authorisation denied on iOS with Data Protection enabled #6205
Create a controller with a MGLMapView instance visible that appears as soon as you launch the app.
Expected behaviour
The app will be relaunched in background by the system as soon as a location update is available. The device can be locked and the data will be encrypted.
The app should be able to run anyway in background.
Actual behaviour
The app crashes as with a mapbox::sqlite::Exceptionauthorization denied.
I suppose that it is caused by MapBox trying to access a sqlite database that is present but not accessible as Data Protection kicks in.
If you really need to be always able to access the database, you should consider to create the file with no file protection specifying FileProtectionType.none:
The SQLite database is created in C++ code that the Objective-C code has no control over, but maybe we can set the attribute on the directory containing it like we do for excluding the database from backups.
I'm not interacting with the map or other MapBox APIs while the app is in background.
Do you think that removing the map from it's superview before entering background can solve the issue?
Or there still can be some other orphaned object (a singleton maybe) that will cause the issue?
The app dying while in background is a real blocking issue as the app itself won't be wake-up again to receive location updates until the user taps again on the icon.
We expect that this issue will be resolved by #8125 that is in the Mapbox iOS SDK as of 3.5.0 beta 2. I'll leave this issue open for tracking until we can collect more evidence that the sqlite errors noted here no longer occur.
Activity
1ec5 commentedon Aug 30, 2016
The SQLite database is created in C++ code that the Objective-C code has no control over, but maybe we can set the attribute on the directory containing it like we do for excluding the database from backups.
jfirebaugh commentedon Aug 30, 2016
Previously: #4841.
macteo commentedon Sep 1, 2016
I've got another crash, with different exception, but I think the cause is the same.
mapbox-crashlog-2.txt
macteo commentedon Sep 1, 2016
I'm not interacting with the map or other MapBox APIs while the app is in background.
Do you think that removing the map from it's superview before entering background can solve the issue?
Or there still can be some other orphaned object (a singleton maybe) that will cause the issue?
The app dying while in background is a real blocking issue as the app itself won't be wake-up again to receive location updates until the user taps again on the icon.
friedbunny commentedon Oct 13, 2016
For searchability, here’s the crashed thread from the original post:
And from #6205 (comment):
boundsj commentedon Mar 2, 2017
We expect that this issue will be resolved by #8125 that is in the Mapbox iOS SDK as of 3.5.0 beta 2. I'll leave this issue open for tracking until we can collect more evidence that the sqlite errors noted here no longer occur.