Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Gauzy Server on Windows fails with "Error processing argument at index 0, conversion failure" #7777

Open
KarinaNi opened this issue Apr 29, 2024 · 10 comments
Assignees
Labels
Milestone

Comments

@KarinaNi
Copy link

KarinaNi commented Apr 29, 2024

Environment

  • Operating System: Windows 10
  • OS Build: 19045.4291
  • Ever Gauzy Version: v0.474.15
  • Application: Gauzy Server

I'm attempting to run the Gauzy server on localhost:4200. I have installed PostgreSQL and tried to create a database with a password. After clicking on "Check and Save," I tried accessing both localhost:4200 and localhost:3000, but both resulted in a "refused to connect" error. Additionally, the Gauzy server gets stuck at the starting stage, and a dialog box with a "P" button briefly appears and disappears. I also have postgresql.exe install and tried to run it. It doesn't come quite an app like it does on Mac.
I checked the log file and found the following error. I have changed my username to the word UserName

[2024-04-29 09:42:37.064] [error] MAINUNEXCEPTION Error processing argument at index 0, conversion failure from [2024-04-29 09:42:37.064] [info] Send report event Error processing argument at index 0, conversion failure from [2024-04-29 09:42:37.070] [info] Show error event Error processing argument at index 0, conversion failure from [2024-04-29 09:42:51.488] [info] Node Modules Path C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules [2024-04-29 09:42:52.232] [info] DesktopActiveWindow -> constructor -> timestamp 2024-04-29T06:42:52.231Z [2024-04-29 09:42:52.423] [info] [provider]: postgres connected... [2024-04-29 09:42:52.453] [info] GAUZY_USER_PATH: C:\Users\Username\AppData\Roaming\Gauzy Server [2024-04-29 09:42:52.454] [info] GAUZY_SEED_PATH: C:\Program Files\Ever\Gauzy Server\resources\app.asar\api\assets\seed [2024-04-29 09:42:52.454] [info] Sqlite DB path: C:\Users\Username\AppData\Roaming\Gauzy Server/gauzy.sqlite3 [2024-04-29 09:42:52.462] [info] App is packaged true [2024-04-29 09:42:52.463] [info] Gauzy UI path C:\Program Files\Ever\Gauzy Server\resources\data\ui\index.html [2024-04-29 09:42:52.463] [info] UI path C:\Program Files\Ever\Gauzy Server\resources\app.asar\index.html [2024-04-29 09:42:52.464] [info] Dir path C:\Program Files\Ever\Gauzy Server\resources\data\ui [2024-04-29 09:42:52.743] [info] App is ready [2024-04-29 09:42:54.920] [info] launched electron with: file:///C:\Program Files\Ever\Gauzy Server\resources\app.asar\index.html#/splash-screen [2024-04-29 09:43:00.698] [info] launched electron with: file:///C:\Program Files\Ever\Gauzy Server\resources\app.asar\index.html#/server-dashboard [2024-04-29 09:43:00.866] [info] Run Gauzy Server Event Handler [2024-04-29 09:43:00.867] [info] Run the Server... [2024-04-29 09:43:00.868] [info] Reading file C:\Program Files\Ever\Gauzy Server\resources\data\ui\index.html [2024-04-29 09:43:00.870] [info] Writing file C:\Program Files\Ever\Gauzy Server\resources\data\ui\index.html [2024-04-29 09:43:00.872] [info] DesktopServer -> start [2024-04-29 09:43:00.876] [info] Start Server Task [2024-04-29 09:43:00.877] [info] Run Server Task [2024-04-29 09:43:00.878] [info] creating process with processPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\api\main.js args: {"IS_ELECTRON":"true","DB_PATH":"C:\\Users\\Username\\AppData\\Roaming\\Gauzy Server/gauzy.sqlite3","DB_TYPE":"postgres","DB_HOST":"localhost","DB_PORT":"5432","DB_NAME":"postgres","DB_USER":"postgres","DB_PASS":"123","API_PORT":3000,"db":"better-sqlite","serviceName":"api","API_HOST":"0.0.0.0","API_BASE_URL":"http://127.0.0.1:3000"} [2024-04-29 09:43:00.944] [info] Service created [2024-04-29 09:43:00.994] [info] expand_window [2024-04-29 09:43:00.995] [info] width 1429 [2024-04-29 09:43:00.996] [info] height 768 [2024-04-29 09:43:01.006] [error] Unhandled Exception TypeError: Error processing argument at index 0, conversion failure from at BrowserWindow.setBounds (node:electron/js2c/browser_init:2:8958) at IpcMainImpl.<anonymous> (C:\Program Files\Ever\Gauzy Server\resources\app.asar\index.js:513:30) at IpcMainImpl.emit (node:events:517:28) at IpcMainImpl.emit (node:domain:489:12) at WebContents.<anonymous> (node:electron/js2c/browser_init:2:86338) at WebContents.emit (node:events:517:28) at WebContents.emit (node:domain:489:12) [2024-04-29 09:43:01.007] [error] MAINUNEXCEPTION Error processing argument at index 0, conversion failure from [2024-04-29 09:43:01.008] [info] Send report event Error processing argument at index 0, conversion failure from [2024-04-29 09:43:01.014] [info] Show error event Error processing argument at index 0, conversion failure from

Screenshot 2024-04-29 101647

@evereq evereq self-assigned this Apr 29, 2024
@evereq evereq changed the title Error processing argument at index 0, conversion failure [Bug] Gauzy Server on Windows fails with "Error processing argument at index 0, conversion failure" Apr 29, 2024
@evereq evereq added the bug label Apr 29, 2024
@evereq evereq added this to the v0.5 milestone Apr 29, 2024
@evereq
Copy link
Member

evereq commented Apr 29, 2024

@KarinaNi it looks like your available work area resolution is relatively low (see log messages):

  • width - 1429
  • height - 768

So it seems something failing in our code when it tries to resize the Window of the Server app....
I'll push some updates and will ask you to check again, hope it will fix issue... Will update you!

@evereq
Copy link
Member

evereq commented Apr 29, 2024

a0bf9d2

@KarinaNi
Copy link
Author

Thank you!

@evereq
Copy link
Member

evereq commented Apr 29, 2024

@KarinaNi can you try to install pre-release version from https://github.com/ever-co/ever-gauzy-server/releases/tag/v0.475.8 and let us know if it helps or not. If not, send again log file output please :)

@KarinaNi
Copy link
Author

KarinaNi commented Apr 30, 2024

Ok, thank you for the support and I have some updates. I managed to get hold of the picture that kept disappearing I attached. It lead me to the server main log in the app as I expected. However, 0.0.0.0:4200 refused to connect. I do have a firewall working if that is relevant. I added the updated log files here. Please tell me what i am doing wrong or my next steps. Thank you! If there is a better way of showing log files, do let me know.

image

image

Default Config -> __dirname: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\config\dist
Plugin Config -> process.cwd: C:\Program Files\Ever\Gauzy Server
Default Config -> assetPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\apps\api\src\assets
Default Config -> assetPublicPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\apps\api\public

[2024-04-30 14:32:36.436] [error] Error starting task: Error: Timeout: Operation took longer than a minute.
    at Timeout._onTimeout (C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\desktop-libs\dist\lib\decorators\methods\timeout.decorator.js:18:28)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
[2024-04-30 14:32:36.437] [info]  Kill Server Task
[2024-04-30 14:32:36.440] [info]  Sending running_state: false
[2024-04-30 14:32:36.441] [info]  Sending log_state: [APIPID-12732]: stopped
[2024-04-30 14:32:36.442] [info]  Sending running_state: false
[2024-04-30 14:32:36.442] [error] Error running API server: Error: Timeout: Operation took longer than a minute.
    at Timeout._onTimeout (C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\desktop-libs\dist\lib\decorators\methods\timeout.decorator.js:18:28)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
[2024-04-30 14:32:36.443] [info]  Sending log_state: ERROR: Error running API server: Error: Timeout: Operation took longer than a minute.
[2024-04-30 14:32:36.444] [info]  Start Server Task
[2024-04-30 14:32:36.445] [info]  Run Server Task
[2024-04-30 14:32:36.445] [info]  creating process with processPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\preload\ui-server.js args: {"isPackaged":"true","serviceName":"ui","IS_ELECTRON":"true","DB_PATH":"C:\\Users\\username\\AppData\\Roaming\\Gauzy Server/gauzy.sqlite3","API_PORT":"undefined","db":"better-sqlite","UI_PORT":4200}
[2024-04-30 14:32:36.555] [info]  Service created
[2024-04-30 14:32:36.731] [info]  running_state
[2024-04-30 14:32:36.734] [info]  running_state
[2024-04-30 14:32:38.607] [info]  Sending log_state: Listening on port 4200

[2024-04-30 14:32:38.608] [info]  Sending running_state: true
[2024-04-30 14:32:38.609] [info]  Sending log_state: ☣︎ UI server listen to http://0.0.0.0:4200
[2024-04-30 14:32:38.649] [info]  running_state

@evereq
Copy link
Member

evereq commented Apr 30, 2024

Hm, can you try latest final release https://github.com/ever-co/ever-gauzy-server/releases/tag/v0.475.9. It seems you hit now another issue that we fixed in the past already.
Also, if you have issues to make it work, try to replace "0.0.0.0" with "127.0.0.1" for example during setup. It's not really related to issue you are getting I think, but sometimes 0.0.0.0 binding may not work on Windows, while 127.0.0.1 works. Also for production, you probably will have to use your server external IP there instead anyway!

@KarinaNi
Copy link
Author

so I did try replacing "0.0.0.0" with "127.0.0.1" it gave some reloading of gauzy server logo and then
image
But i guess you mean while setting up i switch the IP right? I will install latest release and see if i can change IP

@KarinaNi
Copy link
Author

KarinaNi commented May 1, 2024

Tried changing IP in setup and it was server down maintenance error again

@evereq
Copy link
Member

evereq commented May 1, 2024

OK @KarinaNi , so server down maintenance message means that frontend cant connect to API. Show logs that you see now. I suggest to do this: stop server, remove log files, start server wait till all load and you see that message, copy log files and send here. Also show screenshot of the Gauzy Server running with output too so I can see output. Basically, you seems very close to have it running now...

@KarinaNi
Copy link
Author

KarinaNi commented May 2, 2024

Okay so I tried running the server again, I didn't delete the log files, started the server again and the log is as follows. The app log was only giving a few lines so i just got this all from main.log

[2024-05-02 09:48:59.109] [info]  Service created
[2024-05-02 09:48:59.137] [info]  expand_window
[2024-05-02 09:48:59.138] [info]  workAreaSize { height: 768, width: 1429 }
[2024-05-02 09:48:59.139] [info]  Bounds {"width":640,"height":480,"x":395,"y":144}
[2024-05-02 09:49:00.278] [info]  Sending log_state: API Starting...

[2024-05-02 09:49:00.288] [info]  Sending log_state: Heap size limit: 4095.75 MB

[2024-05-02 09:49:01.691] [info]  Sending log_state: OTEL Tracing not enabled

[2024-05-02 09:49:02.835] [info]  Sending log_state: NodeJs Version v18.18.2
Is DEMO: undefined

[2024-05-02 09:49:02.836] [info]  Sending log_state: NODE_ENV: undefined
DB ORM: typeorm
Selected DB Type (DB_TYPE env var): postgres
DB Synchronize: undefined
DB ORM Pool Size: 40
DB Knex Pool Size: 10
DB Connection Timeout: 5000
DB Idle Timeout: 10000
DB Slow Query Logging Timeout: 10000
DB SSL Mode: undefined
DB SSL MODE ENABLE: false

[2024-05-02 09:49:02.837] [info]  Sending log_state: Default Config -> __dirname: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\config\dist
Plugin Config -> process.cwd: C:\Program Files\Ever\Gauzy Server
Default Config -> assetPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\apps\api\src\assets
Default Config -> assetPublicPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\apps\api\public

[2024-05-02 09:49:10.273] [info]  Sending log_state: Unleash Client Not Registered. UNLEASH_API_URL configuration is not provided.

[2024-05-02 09:49:10.311] [info]  Sending log_state: Bootstrap loaded

[2024-05-02 09:49:10.424] [info]  Sending log_state: Sentry not initialized: DSN not provided

[2024-05-02 09:49:10.593] [info]  Sending log_state: API Version 0.1.0
Plugin Config -> __dirname: C:\Program Files\Ever\Gauzy Server\resources\app.asar\api
Plugin Config -> process.cwd: C:\Program Files\Ever\Gauzy Server
Plugin Config -> assetPath: C:\Program Files\Ever\Gauzy Server\apps\api\src\assets
Plugin Config -> assetPublicPath: C:\Program Files\Ever\Gauzy Server\apps\api\public
DB Synchronize: undefined

[2024-05-02 09:49:10.594] [info]  Sending log_state: Plugin Config loaded

[2024-05-02 09:49:10.595] [info]  Sending log_state: Reporting __dirname: C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\core\dist\bootstrap

[2024-05-02 09:49:10.596] [info]  Sending log_state: DB Config: {"retryAttempts":100,"retryDelay":3000,"migrationsTransactionMode":"each","migrationsRun":true,"type":"postgres","host":"localhost","port":5432,"database":"postgres","username":"postgres","password":"123","logging":["error"],"logger":"advanced-console","maxQueryExecutionTime":10000,"synchronize":false,"uuidExtension":"pgcrypto","migrations":["C:\\Program Files\\Ever\\Gauzy Server\\resources\\app.asar\\node_modules\\@gauzy\\core\\dist\\database\\migrations\\*{.ts,.js}"],"entities":["src/modules/not-exists/*.entity{.ts,.js}"],"poolSize":40,"extra":{"max":40,"minConnection":0,"maxConnection":40,"poolSize":40,"connectionTimeoutMillis":5000,"idleTimeoutMillis":10000},"cli":{"migrationsDir":"C:\\Program Files\\Ever\\Gauzy Server\\resources\\app.asar\\node_modules\\@gauzy\\core\\src\\database\\migrations"}}

[2024-05-02 09:49:10.978] [info]  stderr: Redis Health Client is not enabled.

[2024-05-02 09:49:10.979] [info]  Sending log_state: Redis Health Client is not enabled.

[2024-05-02 09:49:11.051] [info]  stderr: Octokit App initialization failed: Missing appId or privateKey.

[2024-05-02 09:49:11.051] [info]  Sending log_state: Octokit App initialization failed: Missing appId or privateKey.

[2024-05-02 09:49:11.055] [info]  Sending log_state: Serve Static Module Creating

[2024-05-02 09:49:11.106] [info]  stderr: Jitsu Analytics initialization failed: Missing host or writeKey.

[2024-05-02 09:49:11.106] [info]  Sending log_state: Jitsu Analytics initialization failed: Missing host or writeKey.

[2024-05-02 09:49:11.216] [info]  stderr: Probot App initialization failed: Missing appId or privateKey.

[2024-05-02 09:49:11.217] [info]  Sending log_state: Probot App initialization failed: Missing appId or privateKey.

[2024-05-02 09:49:11.234] [info]  Sending log_state: GauzyAI REST Endpoint: null
GauzyAI GraphQL Endpoint: null

[2024-05-02 09:49:11.562] [info]  stderr: Jitsu Analytics initialization failed: Missing host or writeKey.

[2024-05-02 09:49:11.563] [info]  Sending log_state: Jitsu Analytics initialization failed: Missing host or writeKey.

[2024-05-02 09:49:11.905] [info]  Sending log_state: SwitchToMigration1638541848595 start running!

[2024-05-02 09:49:59.087] [error] Error starting task: Error: Timeout: Operation took longer than a minute.
    at Timeout._onTimeout (C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\desktop-libs\dist\lib\decorators\methods\timeout.decorator.js:18:28)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
[2024-05-02 09:49:59.089] [info]  Kill Server Task
[2024-05-02 09:49:59.098] [info]  Sending running_state: false
[2024-05-02 09:49:59.101] [info]  Sending log_state: [APIPID-6312]: stopped
[2024-05-02 09:49:59.103] [info]  Sending running_state: false
[2024-05-02 09:49:59.105] [error] Error running API server: Error: Timeout: Operation took longer than a minute.
    at Timeout._onTimeout (C:\Program Files\Ever\Gauzy Server\resources\app.asar\node_modules\@gauzy\desktop-libs\dist\lib\decorators\methods\timeout.decorator.js:18:28)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)
[2024-05-02 09:49:59.106] [info]  Sending log_state: ERROR: Error running API server: Error: Timeout: Operation took longer than a minute.
[2024-05-02 09:49:59.108] [info]  Start Server Task
[2024-05-02 09:49:59.109] [info]  Run Server Task
[2024-05-02 09:49:59.110] [info]  creating process with processPath: C:\Program Files\Ever\Gauzy Server\resources\app.asar\preload\ui-server.js args: {"isPackaged":"true","serviceName":"ui","IS_ELECTRON":"true","DB_PATH":"C:\\Users\\username\\AppData\\Roaming\\Gauzy Server/gauzy.sqlite3","DB_TYPE":"postgres","DB_HOST":"localhost","DB_PORT":"5432","DB_NAME":"postgres","DB_USER":"postgres","DB_PASS":"123","API_PORT":"3000","db":"better-sqlite","UI_PORT":4200}
[2024-05-02 09:49:59.140] [info]  Service created
[2024-05-02 09:49:59.183] [info]  running_state
[2024-05-02 09:49:59.186] [info]  running_state
[2024-05-02 09:50:00.413] [info]  Sending log_state: Listening on port 4200

[2024-05-02 09:50:00.414] [info]  Sending running_state: true
[2024-05-02 09:50:00.415] [info]  Sending log_state: ☣︎ UI server listen to http://127.0.0.1:4200
[2024-05-02 09:50:00.433] [info]  running_state
[2024-05-02 09:50:05.594] [info]  Sending log_state: UI server started

[2024-05-02 09:50:05.595] [info]  Sending log_state: {}

[2024-05-02 09:50:05.751] [info]  Sending log_state: UI server started
{}

[2024-05-02 09:50:05.753] [info]  Sending log_state: UI server started

[2024-05-02 09:50:05.754] [info]  Sending log_state: {}

[2024-05-02 09:50:06.064] [info]  Sending log_state: UI server started

[2024-05-02 09:50:06.065] [info]  Sending log_state: {}

[2024-05-02 09:50:06.075] [info]  Sending log_state: UI server started
{}

[2024-05-02 09:50:06.643] [info]  Sending log_state: UI server started
{}

[2024-05-02 09:50:07.366] [info]  Sending log_state: UI server started
{}

[2024-05-02 09:50:07.905] [info]  Sending log_state: UI server started

[2024-05-02 09:50:07.906] [info]  Sending log_state: {}

[2024-05-02 09:50:07.910] [info]  Sending log_state: UI server started

[2024-05-02 09:50:07.911] [info]  Sending log_state: {}

[2024-05-02 09:50:09.422] [info]  Sending log_state: UI server started
{}

[2024-05-02 09:50:09.450] [info]  Sending log_state: UI server started

[2024-05-02 09:50:09.452] [info]  Sending log_state: {}

[2024-05-02 09:50:09.510] [info]  Sending log_state: UI server started
{}

[2024-05-02 09:50:22.894] [info]  Sending log_state: UI server started
{}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants