[GH-ISSUE #2743] [BUG]: A JavaScript error occured in the main process #1764

Closed
opened 2026-02-22 18:26:25 -05:00 by yindo · 5 comments
Owner

Originally created by @soniceld on GitHub (Dec 1, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2743

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

On startup of the application I get an error message on Win 11 (see screenshot).
When I close it, the application seems to start normally. However PDFs can't be accessed by agent (if thats in anyway related?)
Screenshot 2024-12-01 162055

Error
A JavaScript error occurred in the main process

Uncaught Exception:
TypeError: Error processing argument at index 0, conversion failure from
at WebContents.
(C:\Users\XXXXXXXXX\AppData\Local\Programs\AnythingLLM\resources\app.asar\dist-elec...:5274)
at Object.onceWrapper (node:events:628:26)
at WebContents.emit (node:events:525:35)

Are there known steps to reproduce?

No response

Originally created by @soniceld on GitHub (Dec 1, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2743 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? On startup of the application I get an error message on Win 11 (see screenshot). When I close it, the application seems to start normally. However PDFs can't be accessed by agent (if thats in anyway related?) ![Screenshot 2024-12-01 162055](https://github.com/user-attachments/assets/d31f8a02-8031-4d4b-a090-b6474f69b605) Error A JavaScript error occurred in the main process Uncaught Exception: TypeError: Error processing argument at index 0, conversion failure from at WebContents.<anonymous> (C:\Users\XXXXXXXXX\AppData\Local\Programs\AnythingLLM\resources\app.asar\dist-elec...:5274) at Object.onceWrapper (node:events:628:26) at WebContents.emit (node:events:525:35) ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:26:25 -05:00
yindo closed this issue 2026-02-22 18:26:25 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 4, 2024):

#2710

@timothycarambat commented on GitHub (Dec 4, 2024): #2710
Author
Owner

@soniceld commented on GitHub (Dec 5, 2024):

thank you - I didn't see that

@soniceld commented on GitHub (Dec 5, 2024): thank you - I didn't see that
Author
Owner

@timothycarambat commented on GitHub (Dec 5, 2024):

No problem! We have yet to repro this locally on any windows machine so getting the full error message - which would indicate where the issue lies - has not been recorded yet so it is still open

@timothycarambat commented on GitHub (Dec 5, 2024): No problem! We have yet to repro this locally on any windows machine so getting the full error message - which would indicate where the issue lies - has not been recorded yet so it is still open
Author
Owner

@norrybul commented on GitHub (Dec 7, 2024):

Same here whenever "ALLM" restarts in admin mode. I was monitoring #2710, #2743 as well. It's been occurring even if I update to v1.70.
image
Starting in powershell, here are the logs:

PS C:\Users\compu\AppData\Local\Programs\AnythingLLM> start AnythingLLM.exe
PS C:\Users\compu\AppData\Local\Programs\AnythingLLM>
[Preferences] preference config stored at C:\Users\compu\AppData\Roaming\anythingllm-desktop\config.json
Prisma schema loaded from prisma\schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:C:/Users/compu/AppData/Roaming/anythingllm-desktop/storage/anythingllm.db"

Already in sync, no schema change or pending migration was found.

Γ£ö Generated Prisma Client (v5.3.1) to .\node_modules@prisma\client in 315ms

Prisma schema loaded from prisma\schema.prisma

Γ£ö Generated Prisma Client (v5.3.1) to .\node_modules@prisma\client in 317ms

Start using Prisma Client in Node.js (See: https://pris.ly/d/client)

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)

import { PrismaClient } from '@prisma/client/edge'
const prisma = new PrismaClient()

See other ways of importing Prisma Client: http://pris.ly/d/importing-client

[OllamaProcessManager] Ollama will bind on port 11434 when booted.
[Preferences] Will load window with last know bounds.
[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[collector] info: Collector hot directory and tmp storage wiped!
[collector] info: [production] AnythingLLM Standalone Document processor listening on port 8888.
[backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM.
[backend] info: prisma:info Starting a sqlite pool with 9 connections.
[backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"fa89c7bc-b22f-4fd0-884a-24566716d340","properties":{"runtime":"desktop"}}
[backend] info: Skipping preloading of AnythingLLMOllama - LLM_PROVIDER is gemini.
[backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services.
[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[backend] info: [production] AnythingLLM Standalone Backend listening on port 3001. Network discovery is enabled.
[backend] info: [BackgroundWorkerService] Feature is not enabled and will not be started.

(Same case as wadid in issue #2710)

Actually, there was no "...resources\app.asar\dist-electron..." folder - only "resources\app.asar.unpacked" folder.
image

I installed using Desktop app (in admin mode as well) on Windows 10 64-bit on my fresh OS. My previous Windows 10 was OK but it was using versions below v1.0 back then.
ALLM runs fine even with the error, but web search isn't working (only web browsing).

I'll try docker mode later as this was the safest method to resolve this issue in the past.

@norrybul commented on GitHub (Dec 7, 2024): Same here whenever "ALLM" restarts in admin mode. I was monitoring [#2710](https://github.com/Mintplex-Labs/anything-llm/issues/2710), [#2743](https://github.com/Mintplex-Labs/anything-llm/issues/2743) as well. It's been occurring even if I update to v1.70. ![image](https://github.com/user-attachments/assets/bfbff043-55ca-4bc6-a9db-f509ba0536c5) Starting in powershell, here are the logs: > PS C:\Users\compu\AppData\Local\Programs\AnythingLLM> start AnythingLLM.exe PS C:\Users\compu\AppData\Local\Programs\AnythingLLM> [Preferences] preference config stored at C:\Users\compu\AppData\Roaming\anythingllm-desktop\config.json Prisma schema loaded from prisma\schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:C:/Users/compu/AppData/Roaming/anythingllm-desktop/storage/anythingllm.db" Already in sync, no schema change or pending migration was found. Γ£ö Generated Prisma Client (v5.3.1) to .\node_modules\@prisma\client in 315ms Prisma schema loaded from prisma\schema.prisma Γ£ö Generated Prisma Client (v5.3.1) to .\node_modules\@prisma\client in 317ms Start using Prisma Client in Node.js (See: https://pris.ly/d/client) ``` import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() ``` or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate) ``` import { PrismaClient } from '@prisma/client/edge' const prisma = new PrismaClient() ``` See other ways of importing Prisma Client: http://pris.ly/d/importing-client [OllamaProcessManager] Ollama will bind on port 11434 when booted. [Preferences] Will load window with last know bounds. [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. [collector] info: Collector hot directory and tmp storage wiped! [collector] info: [production] AnythingLLM Standalone Document processor listening on port 8888. [backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM. [backend] info: prisma:info Starting a sqlite pool with 9 connections. [backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"fa89c7bc-b22f-4fd0-884a-24566716d340","properties":{"runtime":"desktop"}} [backend] info: Skipping preloading of AnythingLLMOllama - LLM_PROVIDER is gemini. [backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services. [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. [backend] info: [production] AnythingLLM Standalone Backend listening on port 3001. Network discovery is enabled. [backend] info: [BackgroundWorkerService] Feature is not enabled and will not be started. (Same case as [wadid](https://github.com/wadid) in issue #2710) Actually, there was no "...resources\app.asar\dist-electron\..." folder - only "resources\app.asar.unpacked" folder. ![image](https://github.com/user-attachments/assets/6b4af515-78b9-4c44-b2ee-593b5e323ac8) I installed using Desktop app (in admin mode as well) on Windows 10 64-bit on my fresh OS. My previous Windows 10 was OK but it was using versions below v1.0 back then. ALLM runs fine even with the error, but web search isn't working (only web browsing). I'll try docker mode later as this was the safest method to resolve this issue in the past.
Author
Owner

@timothycarambat commented on GitHub (Dec 11, 2024):

Actually, there was no "...resources\app.asar\dist-electron..." folder - only "resources\app.asar.unpacked" folder.

App asars work like that, they are like zipped directories and so that file path is actually accurate and real, its just bundled inside of the ASAR.

web search isn't working (only web browsing).

The agent skill? Or do you mean web scraping? Either way this is good info, thanks

@timothycarambat commented on GitHub (Dec 11, 2024): > Actually, there was no "...resources\app.asar\dist-electron..." folder - only "resources\app.asar.unpacked" folder. App asars work like that, they are like zipped directories and so that file path is actually accurate and real, its just bundled inside of the ASAR. > web search isn't working (only web browsing). The agent skill? Or do you mean web scraping? Either way this is good info, thanks
yindo changed title from [BUG]: A JavaScript error occured in the main process to [GH-ISSUE #2743] [BUG]: A JavaScript error occured in the main process 2026-06-05 14:42:32 -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#1764