Skip to content
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

SQLiteException: file is not a database #32

Open
tunnel opened this issue Nov 6, 2020 · 1 comment
Open

SQLiteException: file is not a database #32

tunnel opened this issue Nov 6, 2020 · 1 comment

Comments

@tunnel
Copy link

tunnel commented Nov 6, 2020

I used an older version of your plugin. Tried to upgrade to a newer version and an error occurs when trying to open the database. And when running 1.1.x and when running v1.0.x:

SQLiteException: file is not a database SqlCipher4Unity3D.SQLite3.Prepare2 (System.IntPtr db, System.String query) (at Assets/SqlCipher4Unity3D/Sqlite3.cs:278) SqlCipher4Unity3D.SQLiteCommand.Prepare () (at Assets/SqlCipher4Unity3D/Sqlite3Connection.cs:1853) SqlCipher4Unity3D.SQLiteCommand+<ExecuteDeferredQuery>d__131[T].MoveNext () (at Assets/SqlCipher4Unity3D/Sqlite3Connection.cs:1758)
System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) SqlCipher4Unity3D.SQLiteCommand.ExecuteQuery[T] () (at Assets/SqlCipher4Unity3D/Sqlite3Connection.cs:1730) SqlCipher4Unity3D.TableQuery1[T].GetEnumerator () (at Assets/SqlCipher4Unity3D/Sqlite3Connection.cs:2125)
System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) SqlCipher4Unity3D.TableQuery1[T].FirstOrDefault () (at Assets/SqlCipher4Unity3D/Sqlite3Connection.cs:2564)

I think this is because my database is an older version (although its version is 3 and in theory v1.0.x should work, but it does not work)
I found a topic about this error, is it possible to update my database automatically in the same way?

@MinhLuongNeo
Copy link

It looks like I got this error, your database file has a password or not, and what type of password did you use. This lib only supports SQLCipher3 default.

Ảnh chụp Màn hình 2020-11-09 lúc 14 34 09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants