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

Akavache crashes silently (apps just disappear) after data is cleared #248

Closed
khle opened this Issue Sep 25, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@khle

khle commented Sep 25, 2015

On Android, go to settings and clear data. Launch apps again(from device directly, NOT from Visual Studio). Apps come up momentarily and just shut down silently. I suspect that Akavache would need to check if backing SQLite is there. If not, create and register blobs.db, userblobs.db and secret.db (I think). Apps works fine after deployment and continue to work fine until the data is cleared in the settings.

@khle

This comment has been minimized.

Show comment
Hide comment
@khle

khle Sep 26, 2015

If the app has to ensure the db is present, then the document can specify the name and path of all the dbs that are required.

khle commented Sep 26, 2015

If the app has to ensure the db is present, then the document can specify the name and path of all the dbs that are required.

@flagbug

This comment has been minimized.

Show comment
Hide comment
@flagbug

flagbug Sep 26, 2015

Member

What's the exception that occurs when the app crashes? Also I guess you're talking about Android?

Member

flagbug commented Sep 26, 2015

What's the exception that occurs when the app crashes? Also I guess you're talking about Android?

@pragmaticlogic

This comment has been minimized.

Show comment
Hide comment
@pragmaticlogic

pragmaticlogic Sep 26, 2015

No exception. As I wrote, app just shut down silently.

No exception. As I wrote, app just shut down silently.

@paulcbetts

This comment has been minimized.

Show comment
Hide comment
@paulcbetts

paulcbetts Sep 26, 2015

Member

logcat output?

Member

paulcbetts commented Sep 26, 2015

logcat output?

@khle

This comment has been minimized.

Show comment
Hide comment
@khle

khle Sep 28, 2015

The issue only happens after the data and cache is cleared in the App Settings. When one starts launching the app from VS IDE (or XS), the app is deployed to the device. At this time, the bundled db is also deployed. So no problem would happen here. After the cache is cleared, the backing SQLite db is gone. I suspect that at this time, any code that assumes the db is present might encounter some problem.

So I think Akavache, as a library can handle this situation. If the apps using Akavache are to handle, then the paths to the backing dbs would just need to be exposed.

Anyway, the following is the logcat output that I captured:

monodroid-assembly Could not load assembly 'MyApp.Droid' during startup registration
monodroid-assembly This might be due to an invalid debug registration
monodroid-assembly A common cause is to 'adb install' the app directly instead of from the IDE.

I wouldn't bother so much on this logcat output because they look kind of generic. The issue can be fairly easy to reproduce by simply clearing the cache and launch the app again.

Lastly, I don't think this is limited to Android. But I will confirm on other platforms.

khle commented Sep 28, 2015

The issue only happens after the data and cache is cleared in the App Settings. When one starts launching the app from VS IDE (or XS), the app is deployed to the device. At this time, the bundled db is also deployed. So no problem would happen here. After the cache is cleared, the backing SQLite db is gone. I suspect that at this time, any code that assumes the db is present might encounter some problem.

So I think Akavache, as a library can handle this situation. If the apps using Akavache are to handle, then the paths to the backing dbs would just need to be exposed.

Anyway, the following is the logcat output that I captured:

monodroid-assembly Could not load assembly 'MyApp.Droid' during startup registration
monodroid-assembly This might be due to an invalid debug registration
monodroid-assembly A common cause is to 'adb install' the app directly instead of from the IDE.

I wouldn't bother so much on this logcat output because they look kind of generic. The issue can be fairly easy to reproduce by simply clearing the cache and launch the app again.

Lastly, I don't think this is limited to Android. But I will confirm on other platforms.

@flagbug

This comment has been minimized.

Show comment
Hide comment
@flagbug

flagbug Sep 28, 2015

Member

Are you deploying the app in a Debug configuration with fast deployment via VS or XS? If that's the case, the problem isn't Akavache, but Xamarin, as it doesn't handle data/cache clears when fast deployment is enabled

Member

flagbug commented Sep 28, 2015

Are you deploying the app in a Debug configuration with fast deployment via VS or XS? If that's the case, the problem isn't Akavache, but Xamarin, as it doesn't handle data/cache clears when fast deployment is enabled

@khle

This comment has been minimized.

Show comment
Hide comment
@khle

khle Sep 28, 2015

@flagbug Yes, you're totally right. I had "fast deployment" enabled. After seeing your response, I disabled "fast deployment" and repeat the same steps again. The problem NO longer happens. You're right that the problem is not with Akavache. I am closing this ticket. Thanks.

khle commented Sep 28, 2015

@flagbug Yes, you're totally right. I had "fast deployment" enabled. After seeing your response, I disabled "fast deployment" and repeat the same steps again. The problem NO longer happens. You're right that the problem is not with Akavache. I am closing this ticket. Thanks.

@khle khle closed this Sep 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment