-
Notifications
You must be signed in to change notification settings - Fork 47
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
Sqflite malfunction upon restarting the application[Bug?] #598
Comments
Hmm. Does your app depend on the latest sqflite_tizen (0.1.2) which includes this patch: fba3848? |
@swift-kim Yes it does, here's my pubspec:
|
Do you have sample code for reproduction? |
Here's a code example:
When doing a flutter-tizen run for the first time, it runs fine, but when you do for example changes that needs a reset instead of a hot-reload, the error pops up. |
I modified the drift example app slightly to make it dependent on
I have no idea what is causing the error since I'm not familiar with the All you need to do is to add a dependencies:
path_provider_tizen: ^2.1.0 and add the following code to open.overrideFor(OperatingSystem.linux, () {
return DynamicLibrary.open('/usr/share/dotnet.tizen/lib/libsqlite3.so');
}); Make sure not to use // DON'T:
return NativeDatabase.createBackgroundConnection(await databaseFile);
// DO:
return DatabaseConnection(NativeDatabase.opened(sqlite3.open((await databaseFile).path))); Reference: #277 (comment) |
Hi, @swift-kim Packages used: Here's the error:
|
Could you try explicitly calling Note that |
@swift-kim
First application start works fine, but after a restart, still got the same error:
|
Well, I can't reproduce the error, and I can't guess what has gone wrong. You should have the file A simple workaround is to call the function directly in your app code (maybe in import 'package:path_provider_tizen/path_provider_tizen.dart';
PathProviderPlugin.register(); but, if possible, I'd like to know what the actual cause of the bug is so that we can fix it. |
@swift-kim
But as you said, that part of the code is already compiled into the app package, so it wouldn't need to be called again after a restart as it already did the first time. I'll keep trying different approaches, and it see what the actual cause is. |
Please let us know if the problem still persists. |
So i'm using drift_sqflite, which uses sqflite's SqfliteQueryExecutor, and the rest is pretty much similar as to using the drift library.
Starting the application for the first time, works just fine even when doing a hot-restart, but when doing a proper restart i got the below error, and i'm obliged to exit and do another flutter-tizen run.
Error:
The text was updated successfully, but these errors were encountered: