[GH-ISSUE #1170] [BUG]: Linux Image BUG occurred after using solution #721

Closed
opened 2026-02-22 18:21:01 -05:00 by yindo · 12 comments
Owner

Originally created by @DiaQusNet on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1170

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

while creating a new work space, error occurred like this
Error:Invalid 'prisma.workspaces.create()' invocation: The table 'main.workspaces' does not exist in the current database

Are there known steps to reproduce?

First, I met the same issues in #1077.
Then I follow the solutions there, but a new bug cameout as mentioned while I tried to create a new workspace.

Originally created by @DiaQusNet on GitHub (Apr 22, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1170 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? while creating a new work space, error occurred like this `Error:Invalid 'prisma.workspaces.create()' invocation: The table 'main.workspaces' does not exist in the current database` ### Are there known steps to reproduce? First, I met the same issues in #1077. Then I follow the solutions there, but a new bug cameout as mentioned while I tried to create a new workspace.
yindo added the possible bug label 2026-02-22 18:21:01 -05:00
yindo closed this issue 2026-02-22 18:21:01 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 22, 2024):

Lets move this conversation to that issue because it is absolutely the same issue if running on desktop.

This did not resolve the issue?

./AnythingLLMDesktop.AppImage --appimage-extract && \
cd squashfs-root && \
./AppRun
@timothycarambat commented on GitHub (Apr 22, 2024): Lets move this conversation to that issue because it is absolutely the same issue if running on desktop. This did not resolve the issue? ``` ./AnythingLLMDesktop.AppImage --appimage-extract && \ cd squashfs-root && \ ./AppRun ```
Author
Owner

@DiaQusNet commented on GitHub (Apr 22, 2024):

Lets move this conversation to that issue because it is absolutely the same issue if running on desktop.

This did not resolve the issue?

./AnythingLLMDesktop.AppImage --appimage-extract && \
cd squashfs-root && \
./AppRun

Yes, after i use this solution, than go to create a new workspace, this happenedError:Invalid 'prisma.workspaces.create()' invocation: The table 'main.workspaces' does not exist in the current database

@DiaQusNet commented on GitHub (Apr 22, 2024): > Lets move this conversation to that issue because it is absolutely the same issue if running on desktop. > > This did not resolve the issue? > > ``` > ./AnythingLLMDesktop.AppImage --appimage-extract && \ > cd squashfs-root && \ > ./AppRun > ``` Yes, after i use this solution, than go to create a new workspace, this happened`Error:Invalid 'prisma.workspaces.create()' invocation: The table 'main.workspaces' does not exist in the current database`
Author
Owner

@timothycarambat commented on GitHub (Apr 22, 2024):

In ~/.config/anythingllm-desktop do you have a file named anythingllm.db in the root or in a subfolder named storage?
Additionally, can you locate a .env file in that same folder and grep the STORAGE_DIR variable and see what is says?

It should be an absolute path.

This error is quite odd and seems like the entire DB is not migrated at all - which should run on boot.

@timothycarambat commented on GitHub (Apr 22, 2024): In `~/.config/anythingllm-desktop` do you have a file named `anythingllm.db` in the root or in a subfolder named `storage`? Additionally, can you locate a `.env` file in that same folder and grep the `STORAGE_DIR` variable and see what is says? It should be an absolute path. This error is quite odd and seems like the entire DB is not migrated at all - which should run on boot.
Author
Owner

@DiaQusNet commented on GitHub (Apr 22, 2024):

In ~/.config/anythingllm-desktop do you have a file named anythingllm.db in the root or in a subfolder named storage? Additionally, can you locate a .env file in that same folder and grep the STORAGE_DIR variable and see what is says?

It should be an absolute path.

This error is quite odd and seems like the entire DB is not migrated at all - which should run on boot.

i find ~/.config/anythingllm-desktop/storage/anythingll.db, but it's a empty file.
And the STORAGE_DIR in .env is /home/user/.config/anythingllm-desktop/storage

@DiaQusNet commented on GitHub (Apr 22, 2024): > In `~/.config/anythingllm-desktop` do you have a file named `anythingllm.db` in the root or in a subfolder named `storage`? Additionally, can you locate a `.env` file in that same folder and grep the `STORAGE_DIR` variable and see what is says? > > It should be an absolute path. > > This error is quite odd and seems like the entire DB is not migrated at all - which should run on boot. i find `~/.config/anythingllm-desktop/storage/anythingll.db,` but it's a empty file. And the `STORAGE_DIR` in .env is `/home/user/.config/anythingllm-desktop/storage`
Author
Owner

@timothycarambat commented on GitHub (Apr 22, 2024):

Okay the STORAGE_DIR looks okay, but the anythingllm.db should not be fully empty. This indicates that the migration never ran and that explains the error.

This can force run the migration:
cd squashfs-root/resources/backend
node ./node_modules/prisma migrate dev --name init

I will say, running ./AppRun is supposed to do this exact same thing and for others runs without issue

@timothycarambat commented on GitHub (Apr 22, 2024): Okay the `STORAGE_DIR` looks okay, but the anythingllm.db should not be fully empty. This indicates that the migration never ran and that explains the error. This can force run the migration: `cd squashfs-root/resources/backend` `node ./node_modules/prisma migrate dev --name init` I will say, running `./AppRun` is supposed to do this exact same thing and for others runs without issue
Author
Owner

@DiaQusNet commented on GitHub (Apr 22, 2024):

Okay the STORAGE_DIR looks okay, but the anythingllm.db should not be fully empty. This indicates that the migration never ran and that explains the error.

This can force run the migration: cd squashfs-root/resources/backend node ./node_modules/prisma migrate dev --name init

I will say, running ./AppRun is supposed to do this exact same thing and for others runs without issue

I follow your steps, and terminal shows
Error code: P1012 error: Environment variable not found: DATABASE_URL.
in this two lines:
provider = 'sqlite'
url = env('DATABASE_URL')
It seems a environment variable problem...

@DiaQusNet commented on GitHub (Apr 22, 2024): > Okay the `STORAGE_DIR` looks okay, but the anythingllm.db should not be fully empty. This indicates that the migration never ran and that explains the error. > > This can force run the migration: `cd squashfs-root/resources/backend` `node ./node_modules/prisma migrate dev --name init` > > I will say, running `./AppRun` is supposed to do this exact same thing and for others runs without issue I follow your steps, and terminal shows `Error code: P1012 error: Environment variable not found: DATABASE_URL.` in this two lines: `provider = 'sqlite'` `url = env('DATABASE_URL')` It seems a environment variable problem...
Author
Owner

@timothycarambat commented on GitHub (Apr 22, 2024):

Then in .env add an env named DATABASE_URL and have it set to the absolute path to the anythingllm.db file that is currently empty and re-run the two prisma commands. Again, app bootup handles this so its seems erroneous to do this again.

When you run ./AppRun and it starts showing stuff in the terminal window - nothing shows in terms of error logs aside from the error you showed already about prisma?

@timothycarambat commented on GitHub (Apr 22, 2024): Then in `.env` add an env named `DATABASE_URL` and have it set to the absolute path to the anythingllm.db file that is currently empty and re-run the two prisma commands. Again, app bootup handles this so its seems erroneous to do this again. When you run `./AppRun` and it starts showing stuff in the terminal window - _nothing_ shows in terms of error logs aside from the error you showed already about prisma?
Author
Owner

@DiaQusNet commented on GitHub (Apr 23, 2024):

Then in .env add an env named DATABASE_URL and have it set to the absolute path to the anythingllm.db file that is currently empty and re-run the two prisma commands. Again, app bootup handles this so its seems erroneous to do this again.

When you run ./AppRun and it starts showing stuff in the terminal window - nothing shows in terms of error logs aside from the error you showed already about prisma?

Ok, I have fix that problem, but in a weird way.
You mentioned add DATABASE_URL to the .env, but when i try to do so, terminal shows it still can't find the DATABASE_URL.
So I choose to manually change the url in squashfs-root/resources/backend/prisma/schema.prisma, i replaced env('DATABASE_URL') to the absolut path of anythingllm.db
Now, i can create a workspace without bug. But I don't get it yet.
This is the terminal information now(AnythingLLM works fine)
Screenshot

@DiaQusNet commented on GitHub (Apr 23, 2024): > Then in `.env` add an env named `DATABASE_URL` and have it set to the absolute path to the anythingllm.db file that is currently empty and re-run the two prisma commands. Again, app bootup handles this so its seems erroneous to do this again. > > When you run `./AppRun` and it starts showing stuff in the terminal window - _nothing_ shows in terms of error logs aside from the error you showed already about prisma? Ok, I have fix that problem, but in a weird way. You mentioned add `DATABASE_URL` to the `.env`, but when i try to do so, terminal shows it still can't find the `DATABASE_URL`. So I choose to manually change the url in `squashfs-root/resources/backend/prisma/schema.prisma`, i replaced `env('DATABASE_URL')` to the absolut path of `anythingllm.db` Now, i can create a workspace without bug. But I don't get it yet. This is the terminal information now(AnythingLLM works fine) ![Screenshot ](https://github.com/Mintplex-Labs/anything-llm/assets/98730077/42b53803-2e31-46d4-b2e8-aedb0197e9dd)
Author
Owner

@timothycarambat commented on GitHub (Apr 23, 2024):

Do you have openssl installed? Most distros have it pre-installed since nearly everything uses it.

@timothycarambat commented on GitHub (Apr 23, 2024): Do you have `openssl` installed? Most distros have it pre-installed since nearly everything uses it.
Author
Owner

@DiaQusNet commented on GitHub (Apr 23, 2024):

Installed for sure.

@DiaQusNet commented on GitHub (Apr 23, 2024): Installed for sure.
Author
Owner

@chymian commented on GitHub (May 18, 2024):

@timothycarambat
same error here on debian12 KDE and similar pbl. on docker on a remote LLM-server.
any bug-fixes yet?

openssl 3.0.11-1~deb12u2 is the latest version in debian stable

additionally I get this console output:

$ AnythingLLMDesktop.appimage
[Preferences] preference config stored at /home/guenter/.config/anythingllm-desktop/config.json
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:/home/guenter/.config/anythingllm-desktop/storage/anythingllm.db"

Error: Schema engine exited. Error: Could not find schema-engine binary. Searched in:
- /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x
- /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/prisma/schema-engine-debian-openssl-1.1.x
- /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/schema-engine-debian-openssl-1.1.x
- /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/prisma/runtime/schema-engine-debian-openssl-1.1.x
Prisma schema loaded from prisma/schema.prisma
Error: 
EROFS: read-only file system, unlink '/tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/.prisma/client/index.js'

and this error-msg in the app:

Error: Invalid `prisma.workspaces.create()` invocation: Prisma Client could not locate the Query Engine for runtime "debian-openssl-1.1.x". This happened because Prisma Client was generated for "debian-openssl-3.0.x", but the actual deployment required "debian-openssl-1.1.x". Add "debian-openssl-1.1.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it: generator client { provider = "prisma-client-js" binaryTargets = ["native", "debian-openssl-1.1.x"] } The following locations have been searched: /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/.prisma/client /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/@prisma/client /home/tim/Documents/anything-llm-desktop/anything-llm/server/node_modules/@prisma/client /tmp/prisma-engines /tmp/.mount_AnythiQ2N2Uw/resources/backend/prisma
@chymian commented on GitHub (May 18, 2024): @timothycarambat same error here on debian12 KDE and similar pbl. on docker on a remote LLM-server. any bug-fixes yet? `openssl 3.0.11-1~deb12u2 ` is the latest version in debian stable additionally I get this console output: ```bash $ AnythingLLMDesktop.appimage [Preferences] preference config stored at /home/guenter/.config/anythingllm-desktop/config.json Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:/home/guenter/.config/anythingllm-desktop/storage/anythingllm.db" Error: Schema engine exited. Error: Could not find schema-engine binary. Searched in: - /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x - /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/prisma/schema-engine-debian-openssl-1.1.x - /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/schema-engine-debian-openssl-1.1.x - /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/prisma/runtime/schema-engine-debian-openssl-1.1.x Prisma schema loaded from prisma/schema.prisma Error: EROFS: read-only file system, unlink '/tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/.prisma/client/index.js' ``` and this error-msg in the app: ```log Error: Invalid `prisma.workspaces.create()` invocation: Prisma Client could not locate the Query Engine for runtime "debian-openssl-1.1.x". This happened because Prisma Client was generated for "debian-openssl-3.0.x", but the actual deployment required "debian-openssl-1.1.x". Add "debian-openssl-1.1.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it: generator client { provider = "prisma-client-js" binaryTargets = ["native", "debian-openssl-1.1.x"] } The following locations have been searched: /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/.prisma/client /tmp/.mount_AnythiQ2N2Uw/resources/backend/node_modules/@prisma/client /home/tim/Documents/anything-llm-desktop/anything-llm/server/node_modules/@prisma/client /tmp/prisma-engines /tmp/.mount_AnythiQ2N2Uw/resources/backend/prisma ```
Author
Owner

@myonlinematters commented on GitHub (Dec 8, 2024):

I am running AnythingLLM on a Microsoft Surface 7 ARM64 machine and am getting the same message: "Error: Invalid prisma.workspaces.create() invocation: The table main.workspaces does not exist in the current database." I have read this and Issue #1077 and they all relate to Linux. How do I fix this on Windows 11 on ARM64?

@myonlinematters commented on GitHub (Dec 8, 2024): I am running AnythingLLM on a Microsoft Surface 7 ARM64 machine and am getting the same message: "Error: Invalid `prisma.workspaces.create()` invocation: The table `main.workspaces` does not exist in the current database." I have read this and Issue #1077 and they all relate to Linux. How do I fix this on Windows 11 on ARM64?
yindo changed title from [BUG]: Linux Image BUG occurred after using solution to [GH-ISSUE #1170] [BUG]: Linux Image BUG occurred after using solution 2026-06-05 14:36:51 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#721