Android: importing SQLite/ZIP directly from Proton Drive fails, while local import works
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by tracing the Android import flow for SQLite and ZIP files, especially how it handles the selected document URI while the graph-name dialog is open. Compare the Proton Drive URI behavior with the same files selected from local storage. Done means both imports work from the provider, or an unsupported URI produces a clear actionable error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search first
- I searched and no similar issues were found
Related issues:
- https://github.com/logseq/logseq/issues/12163
- https://github.com/logseq/logseq/issues/12151
- https://github.com/logseq/logseq/issues/3789
What Happened?
Importing a Logseq DB graph directly from the Proton Drive Android
document provider fails.
I reproduced two failure modes:
- When importing
db.sqlitedirectly from Proton Drive, Logseq displays
the graph-name dialog. After entering a name and pressingSubmit,
nothing happens. The dialog remains open, and the graph is not added.
Android also generates a crash report for the system
Files/DocumentsUI component. - When importing the official “SQLite DB + assets” ZIP directly from
Proton Drive, Logseq reports:ZIP import failed: The requested file could not be read, typically
due to permission problems that have occurred after a reference to
a file was acquired.
The same ZIP works correctly after it is downloaded to the phone's
local storage underPixel 8/Download.
The locally imported graph opens correctly, its content is readable,
and internal links work. Therefore, the ZIP and SQLite database do not
appear to be corrupted.
This appears to be related to handling an Android Storage Access
Framework document URI from a cloud document provider. Logseq may be
keeping the selected JavaScriptFilereference while asking for the
graph name and reading it only later, after the temporary reference has
become inaccessible.
Reproduce the Bug
SQLite import
- Install and configure Proton Drive on Android.
- Upload or synchronize a Logseq DB graph containing
db.sqlite. - Open Logseq.
- Open the three-dot menu.
- Select
Import. - Select
SQLite. - In the Android file picker, open Proton Drive.
- Select
db.sqlite. - Enter a name for the new graph.
- Press
Submit.
Result: the button has no visible effect, and the graph is not imported.
ZIP import
- On Logseq Desktop, select
Export graph. - Export
SQLite DB + assetsas a ZIP file. - Make the ZIP available through Proton Drive.
- On Logseq Android, select
Import. - Select
SQLite + assets (.zip). - Select the ZIP directly from Proton Drive.
- Enter a graph name and submit.
Result:
ZIP import failed: The requested file could not be read, typically due
to permission problems that have occurred after a reference to a file
was acquired.
Expected Behavior
Logseq should be able to read a file selected through an Android Storage Access Framework document provider such as Proton Drive.
If the selected URI provides only temporary access, Logseq should read or copy the file immediately after selection, before displaying the graph-name dialog.
If the provider cannot be supported, Logseq should display a clear and actionable error instead of leaving the Submit button unresponsive.
Screenshots
I can provide a screen recording if required.
Desktop or Mobile Platform Information
Device: Google Pixel 8 (shiba)
OS: GrapheneOS / Android 17
GrapheneOS release: 2026102101
Android build: CP3A.261005.005
Logseq Android: 2.0.2, official APK installed through Obtainium
Logseq Desktop: 2.0.2
Files/DocumentsUI package: version 37, target SDK 37
Proton Drive: 2.32.0
Additional Context
The Android crash report identifies the crashing process as the system Files/DocumentsUI component rather than Logseq:
type: crash
osVersion: google/shiba/shiba:17/CP3A.261005.005/2026102101:user/release-keys
package: com.android.documentsui:37, targetSdk 37
process: com.android.documentsui
java.lang.RuntimeException:
An error occurred while executing doInBackground()
Caused by: java.lang.StringIndexOutOfBoundsException:
begin 0, end -1, length 0
at java.lang.String.substring(String.java:3040)
at com.android.documentsui.Metrics.sanitizeMime(Metrics.java:472)
at com.android.documentsui.picker.UpdatePickResultTask.doInBackground(
UpdatePickResultTask.java:53
)
This may indicate that Proton Drive returns an empty or invalid MIME type for db.sqlite. However, Logseq also receives a NotReadableError for the ZIP, and the same file works when selected from local storage.
The complete Android crash report is attached here: Error in Files 63e3f1a7e1d9.txt
This Issue is generated by GPT-5.6 sol and proofread by me.
Thank you and have a good day.
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
- Lingua principale
- Clojure
- Stelle
- 45.7k
- Fork
- 2.9k
- Merge medio
- 1g 19h
- PR unite (30g)
- 131
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di logseq/logseq
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
# [Bug]: Inverted assertion arguments in `recent.cljs` and `build.cljs` evaluate the argument instead of the predicateForse già presa @SiddheshP2709 l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Install script not workingForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
logseq/logseq#13638 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
logseq/logseq#13424 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Linux installer hangsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
logseq/logseq#12198 · 3 commenti · 4 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di logseq/logseq
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
clojure-emacs/cider#4235 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Server logs every websocket send at DEBUG since #8844, adding lag under loadForse già presa @matthewlehew l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno