0

I have a problem with akavache, when I try to put something on the blob, I have an error : "Unable to reset abort because no abort was requested" I see on the debugger that is Blob.LocalMachine value is : ThreadStateException "Unable to reset abort because no abort was requested"

My code is really simple :

private async Task StoreInCache(string key, object value)
    {
        await BlobCache.LocalMachine.InsertObject(key, value);
    }

I work on xamarin.iOS but all the code who managed my data is in Shared project. Is it the reason why he can't find the LocalMachine? Or create one on a shared project?

If I put all the code to manage the cache on my xamarin.iOS code it's not really effective because I also have a xamarin.droid version of my application...

Someone know how can I solved this?

Thank you!

nicar
  • 157
  • 1
  • 14
  • hmm did you make sure to set the applicationname? BlobCache.ApplicationName = "AkavacheExperiment" Also do you have a longer stack trace by chance? Maybe try enabling first chance exceptions? Shared project should work fine just have to make sure Akavache is installed into all the platform specific projects as well. But all your code can just exist in the PCL or the shared project. – Shane Neuville Feb 09 '17 at 19:23
  • @ShaneNeuville Yes I set the application name at the start of the application. System.Exception: You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init(). at SQLitePCL.SQLite3Provider_bait.SQLitePCL.ISQLite3Provider.sqlite3_open_v2 (System.String filename, System.IntPtr& db, System.Int32 flags, System.String vfs) at SQLitePCL.raw.sqlite3_open_v2 (System.String filename, SQLitePCL.sqlite3& db, System.Int32 flags, System.String vfs) I can't put more because of characters limit... – nicar Feb 10 '17 at 08:55
  • Have you installed the Akavache nuget packages directly into your platform projects? So like into the iOS project? It sounds like for some reason your Insert is being called before SQLite has been initialized https://github.com/akavache/Akavache/blob/master/src/Akavache.Sqlite3/SQLite.cs#L224 – Shane Neuville Feb 10 '17 at 15:32
  • @ShaneNeuville Yes I add the nugget packages akavache.core in my shared and in my iOS Project. I don't know if I need another package on my iOS project. – nicar Feb 10 '17 at 15:56
  • just core? you should have this one https://www.nuget.org/packages/akavache/ installed into all projects which should cause "Akavache, Akavache.Core, and akavache.sqlite3" to all be installed – Shane Neuville Feb 10 '17 at 16:11

0 Answers0