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

Fail to initialize on Windows #284

Open
ijklam opened this issue Oct 17, 2022 · 0 comments
Open

Fail to initialize on Windows #284

ijklam opened this issue Oct 17, 2022 · 0 comments

Comments

@ijklam
Copy link

ijklam commented Oct 17, 2022

When initializing the database using this package, it will throw an "File not found" error.

Although this could be fixed by modifying the package to create database file first, but why the db path is located in the .dart_tool folder, not in app's data folder ?

Here is the stack trace.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: FileSystemException: Cannot open file, path = 'D:\l\Desktop\script\flutter\test1\.dart_tool\sqflite_common_ffi\databases\word.db' (OS Error: 系统找不到指定的路径。

, errno = 3)
#0      SqfEntityConnectionFfi.writeDatabase (package:sqfentity/sqfentity_connection_ffi.dart:55)
<asynchronous suspension>
#1      SqfEntityConnectionFfi.openDb.<anonymous closure> (package:sqfentity/sqfentity_connection_ffi.dart:80)     #1      SqfEntityConnectionFfi.openDb.<anonymous closure> (package:sqfentity/sqfentity_connection_ffi.dart:80)     
<asynchronous suspension>
#2      BasicLock.synchronized (package:synchronized/src/basic_lock.dart:33)
<asynchronous suspension>
#3      SqfEntityConnectionFfi.openDb (package:sqfentity/sqfentity_connection_ffi.dart:64)
<asynchronous suspension>
#4      SqfEntityProvider.db (package:sqfentity/sqfentity.dart:74)
<asynchronous suspension>
#5      SqfEntityProvider.execDataTable (package:sqfentity/sqfentity.dart:167)
<asynchronous suspension>
#6      SqfEntityModelProvider.initializeDB (package:sqfentity/sqfentity.dart:578)
<asynchronous suspension>
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

1 participant