You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even when using derive to statically link the sqlite3 database, it causes the app to crash. I noticed that the app doesn't crash when simply adding the crate, but it crashes as soon as any call for rusqlite is made.
Use the latest version of create-tauri-app to initialize a beta version of the app (allowing mobile development)
Open the created directory and install all dependencies
Initialize the android project using npm run tauri android init or equivalent
Add the rusqlite dependency with the derive feature flag enabled
In any #[tauri::command] function, call any rusqlite code that interfaces with the file system (like rusqlite::Connection::open(database_path).unwrap();)
Expected behavior
The rusqlite code was supposed to open an existing database or create one if it didn't previously exist.
--------- beginning of main
02-17 11:59:37.989 3114 3114 I auri_issues_app: Late-enabling -Xcheck:jni
02-17 11:59:38.009 3114 3114 I auri_issues_app: Using CollectorTypeCC GC.
02-17 11:59:38.010 3114 3114 W auri_issues_app: Unexpected CPU variant for x86: x86_64.
02-17 11:59:38.010 3114 3114 W auri_issues_app: Known variants: atom, sandybridge, silvermont, goldmont, goldmont-plus, tremont, kabylake, default
02-17 11:59:38.085 3114 3114 W ziparchive: Unable to open '/data/app/~~oWhhee07OzLL55nrtCgF1A==/com.tauri.tauri_issues_app-6AshWwk-VAC3roCMDl_dDA==/base.dm': No such file or directory
02-17 11:59:38.085 3114 3114 W ziparchive: Unable to open '/data/app/~~oWhhee07OzLL55nrtCgF1A==/com.tauri.tauri_issues_app-6AshWwk-VAC3roCMDl_dDA==/base.dm': No such file or directory
--------- beginning of crash
02-17 11:59:38.324 3114 3114 E AndroidRuntime: FATAL EXCEPTION: main
02-17 11:59:38.324 3114 3114 E AndroidRuntime: Process: com.tauri.tauri_issues_app, PID: 3114
02-17 11:59:38.324 3114 3114 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__extenddftf2" referenced by "/data/app/~~oWhhee07OzLL55nrtCgF1A==/com.tauri.tauri_issues_app-6AshWwk-VAC3roCMDl_dDA==/base.apk!/lib/x86_64/libtauri_issues_app_lib.so"...
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1661)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at com.tauri.tauri_issues_app.WryActivity.<clinit>(WryActivity.kt:116)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1378)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3676)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:205)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.os.Looper.loop(Looper.java:294)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8177)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
02-17 11:59:38.324 3114 3114 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Additional context
It might be because rusqlite is made to handle files in the desktop only, but shouldn't there be a way to compile rusqlite to mobile devices too, or would that require changing how the source code works?
Thanks again for your time and all your hard work!
The text was updated successfully, but these errors were encountered:
Describe the bug
Even when using
derive
to statically link the sqlite3 database, it causes the app to crash. I noticed that the app doesn't crash when simply adding the crate, but it crashes as soon as any call for rusqlite is made.Reproduction
This issue has been replicated and described in detail in https://github.com/otamam818/issue_detector/tree/main/tauri-issues-app
The steps to reproduce it is:
create-tauri-app
to initialize a beta version of the app (allowing mobile development)npm run tauri android init
or equivalentderive
feature flag enabled#[tauri::command]
function, call anyrusqlite
code that interfaces with the file system (likerusqlite::Connection::open(database_path).unwrap();
)Expected behavior
The rusqlite code was supposed to open an existing database or create one if it didn't previously exist.
Full
tauri info
outputStack trace
Additional context
It might be because
rusqlite
is made to handle files in the desktop only, but shouldn't there be a way to compile rusqlite to mobile devices too, or would that require changing how the source code works?Thanks again for your time and all your hard work!
The text was updated successfully, but these errors were encountered: