3

I am trying to use Akavache with Xamarin. I've installed Akavache package from NuGet to Android and Windows Phone projects.

Initialization:

BlobCache.ApplicationName = "MyApp4";
BlobCache.EnsureInitialized();
BlobCache.LocalMachine.InsertObject("key", "Value");

Third line throws an error (on both Android and Windows Phone targets):

Akavache.Sqlite3.Internal.SQLiteException: no such table: SchemaInfo

What am I doing wrong?

Thanks in advance :)

Wodzisław
  • 43
  • 1
  • 4
  • Seeing same, but at the point of registering in TinyIoC: 'TinyIoCContainer.Current.Register(BlobCache.UserAccount, "UserLocalStorage");' – DennisWelu Oct 13 '14 at 02:44
  • I'm getting the same issue on a Windows console app so I don't think it has to do with a specific device, emulator, or xamarin. – Bryan Anderson Dec 10 '14 at 21:54

3 Answers3

1

The exception is a first change exception, but is handled. So just F5 and continue. Paul Betts explains the reasoning here https://github.com/akavache/Akavache/issues/195#issuecomment-66576874

"Yep, so to explain what this is doing, it's looking for a table that we internally use to do migrations (so that we can change the on-disk format of Akavache without breaking existing data); in new databases, this table is never found, so we have a first-chance exception."

phil
  • 618
  • 2
  • 5
  • 17
0

I encountered this with Xamarin.iOS. It got "fixed" but may not be the same cause. And while I don't have a complete explanation of "why", for me the problem appeared to be something awry in the simulator files. By ditching all saved simulator state files the problem went away. The weird thing is that a simulator "Reset Content and Settings..." was not good enough, nor was just switching to a new simulator. (Nor restarts of simulator/XamStudio, nor full cleans/rebuilds etc.) It started working when I cleared all the files for all simulators found in the simulator hidden folders... Or maybe it was the chicken I sacrificed at the same time. Coulda been the chicken.

The location for the iOS simulator files on the Mac changed in iOS8. The following post has both the pre-ios8 and ios8 locations identified: Document Directory Path of iOS 8 Beta Simulator. (Unfortunately ios8 makes it quite a bit trickier to find.)

Possibly the same kind of weirdness can happen in the Android emulators...

Community
  • 1
  • 1
DennisWelu
  • 788
  • 13
  • 26
0

I experienced the same issue using Xamarin. My fix was to turn off the System.Exception breakpoint.

Matthew
  • 11