Skip to content

Fix SQLite version transition#236

Merged
JingMatrix merged 1 commit intomasterfrom
sql
Sep 14, 2025
Merged

Fix SQLite version transition#236
JingMatrix merged 1 commit intomasterfrom
sql

Conversation

@JingMatrix
Copy link
Owner

  1. Avoid adding new columns when creating database anew
  2. SQLiteException has updated, whose error message now includes the error code, for example (code 1 SQLITE_ERROR).

@JingMatrix JingMatrix linked an issue Mar 28, 2025 that may be closed by this pull request
1 task
@JingMatrix
Copy link
Owner Author

@USnwst
Copy link

USnwst commented Mar 28, 2025

I reinstalled this LSPosed, but it still doesn't display anything. Here is the log file:

LSPosed_2025-03-28T15_59_11.832724.zip

@JingMatrix
Copy link
Owner Author

Crucial logs are

[ 2025-03-28T15:57:23.653        0:  2854:  2854 D/LSPosedService  ] create new datebase
[ 2025-03-28T15:57:23.654        0:  2854:  2854 E/SQLiteLog       ] (1) no such table: configs in "SELECT `group`, `key`, data FROM configs WHERE module_pkg_name = ? and user_id = ?"

I have no clear idea why this is happening, have you tried a complete uninstallation ?

@yuche
Copy link

yuche commented Mar 28, 2025

@JingMatrix

LSPosed_2025-03-28T22_42_35.196997.zip

I'm having the same problem(#235), here's my log (version 7177, CI build).

I can confirm that lsposed was completely removed before installing 7177, KernelSU manager doesn't have lsposed, /data/adb doesn't have lsposed, /data/adb/modules doesn't have it either.

But my reported error seem to be different from @USnwst :

[ 2025-03-28T22:41:11.060     2000: 15011: 15044 E/LSPosedManager  ] Wi: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure
	at Og.a(Unknown Source:90)
	at Br.e(Unknown Source:47)
	at B1.run(Unknown Source:9)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
	at java.util.concurrent.FutureTask.run(FutureTask.java:290)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure
	at aj.V(Unknown Source:59)
	at aj.r(Unknown Source:28)
	at K3.b(Unknown Source:18)
	at Og.a(Unknown Source:41)
	... 7 more

@yuche
Copy link

yuche commented Mar 28, 2025

Also can I install modules locally? It doesn't feel right to pull modules from a CDN, and if the supply chain is poisoned my device will be compromised.

I found that by installing the apk I was able to enable the module in lsposed manager.

@Dev4Mod
Copy link

Dev4Mod commented Mar 28, 2025

The folder where the settings are located is /data/adb/lspd

@JingMatrix
Copy link
Owner Author

@yuche Could you please explain more about your sentence by installing the apk? Which apk you were talking about?

Moreover, please upload your logs again. There were errors I didn't understand in your previous logs.

@Stillhard
Copy link
Contributor

@yuche Could you please explain more about your sentence by installing the apk? Which apk you were talking about?

maybe he meant by installed manager apk manually

@yuche
Copy link

yuche commented Mar 31, 2025

My problem was solved by disabling DNS over HTTPS and I was able to pull remote repositories.

I've never used lsposed before, I used to think that the lsposed module was only installable from a remote CDN, but it's actually installable from anywhere you get the apk.

@bocchi810 bocchi810 force-pushed the master branch 2 times, most recently from 7303c32 to 41089cc Compare April 14, 2025 10:23
@JingMatrix JingMatrix force-pushed the master branch 2 times, most recently from 17e2cb0 to 3d9d08c Compare April 15, 2025 07:36
@JingMatrix JingMatrix mentioned this pull request Jun 13, 2025
1 task
@bocchi810 bocchi810 force-pushed the master branch 2 times, most recently from e1c17aa to d86bed6 Compare July 9, 2025 05:29
@JingMatrix JingMatrix force-pushed the master branch 2 times, most recently from cfbd5c5 to d625e00 Compare July 12, 2025 06:07
Reworks the `initDB` function to resolve critical failures.

- Prevents a "no such table: configs" crash on fresh installs by
  deferring the compilation of CREATE TABLE statements until their
  dependencies are met.
- Fixes a "duplicate column" error by correcting the initial schema
  and letting migration logic add new columns.
- Replaces the fragile fall-through switch and nested transactions with a
  robust, sequential upgrade process inside a single atomic transaction.
@JingMatrix JingMatrix merged commit 2666bda into master Sep 14, 2025
1 check passed
ThePedroo pushed a commit to ThePedroo/ReLSPosed that referenced this pull request Nov 22, 2025
Reworks the `initDB` function to resolve critical failures.

- Prevents a "no such table: configs" crash on fresh installs by
  deferring the compilation of CREATE TABLE statements until their
  dependencies are met.
- Fixes a "duplicate column" error by correcting the initial schema
  and letting migration logic add new columns.
- Replaces the fragile fall-through switch and nested transactions with a
  robust, sequential upgrade process inside a single atomic transaction.
@JingMatrix JingMatrix deleted the sql branch January 24, 2026 02:30
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

Successfully merging this pull request may close these issues.

Database error causing empty module list

5 participants