mapp-digital / mapp-intelligence-android-sdk-v5

Webtrekk Android SDK V5
https://www.webtrekk.com/
MIT License
13 stars 2 forks source link

[BUG] A migration from 4 to 6 was required but not found issue with version 5.1.5 #19

Closed Vall0n closed 1 year ago

Vall0n commented 1 year ago

Describe the bug After updating the mapp sdk to 5.1.5 we observed the following error from the logcat output:

E/webtrekk: 06.01.2023 14:36:14 -> Error getting the cached completed requests: java.lang.IllegalStateException: A migration from 4 to 6 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods.

This is not happening in version 5.1.3 and also not in 5.1.4.2

To Reproduce Steps to reproduce the behavior:

  1. Update the mapp sdk to 5.1.5 and set logLevel to Basic (e.g. webtrekkConfigurationBuilder.logLevel(Logger.Level.BASIC))
  2. Start the app and observe logcat (you can filter for webtrekk)
  3. Use the app and at some point you'll see the error above

Smartphone (please complete the following information):

Additional context This is not happening in version 5.1.3 and also not in 5.1.4.2

stellatores commented 1 year ago

Thanks for the feedback. We were able to reproduce the issue on some, but not on all devices. We found out that some devices require a callback to the following function we need for our database where we store requests before sending them to our trackserver: fallbackToDestructiveMigration we fixed this by adding callbacks to the method in RoomUtil.kt We are currently testing our fix and will release it in version 5.1.5.1 as soon as possible.

stellatores commented 1 year ago

5.1.5.1 is released now, please check if everything works as expected now

Vall0n commented 1 year ago

Hey @stellatores, looks good to me. The java.lang.IllegalStateException isn't thrown anymore. That went quickly! :) Thank you!

stellatores commented 1 year ago

No worries, thanks for the detailed bug description. I hope this one works now, please let us know if you find any other unexpected behaviour. I'm closing this ticket for now.