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
In Owin, getting "Unable to create a storage engine, fatal error" message #396
Comments
There should be more detailed information than that in the log file. What this usually means is that the native sqlite library was unable to be found. This is a problem on Windows in particular. Can you provide some more information about your environment? Are you trying to run couchbase lite as a web service? |
Extra details:
If there are other details that you need, let me know. I'm not sure where I should be looking for the log file, here's the full stack trace:
|
As an extra annoying step, can you confirm that the sqlite3.dll native dll files are in the x86 and x64 folders, the folders being in the same directory as the SQLitePCL raw DLL file? I've been having a problem on Unity where it moves the native folders to another directory during the build process and then SQLitePCL cannot resolve them anymore. I assume since you are using Nancy that you are targeting the 4.5 version? |
Looking at my Web project:
Also, yes I am targeting 4.5. |
This may help you reproduce (left out bootstrapper, startup, and some extension methods)
|
Thanks for that, I'll have a look at it and should have something to say about it in the next few days. |
I've successfully reproduced the issue, and will now look into the cause. |
The issue is that IIS (I believe?) changes the base directory of the app domain. This will cause the search for sqlite3.dll to fail. The search code is not part of Couchbase Lite's codebase, but I have found a workaround. You need to move the x86/x64 folders out of the "bin" folder into their parent folder (i.e. the folder containing your .csproj file). This will work for running from visual studio. I'm not familiar with Web development, but you will need to follow a similar process for deployment as well. You can probably add it to your project as a post-build step. Does this help get things running? |
Yes, that worked! Extremely interesting workaround. What I'm assuming is the issue is that the search code assumes the executables are in its starting location when in reality they are always in the bin for IIS. If I self-hosted, this issue may disappear entirely. Thanks! |
I get the following error when I attempt to create my database within the context of OWIN.
Unable to create a storage engine, fatal error
Any simple example will fail but in my case I am using Nancy Modules. The same code works perfectly fine within a console app. I am not specifying platform.
The text was updated successfully, but these errors were encountered: