janhq / jan

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
https://jan.ai/
GNU Affero General Public License v3.0
23.82k stars 1.39k forks source link

bug: [0.5.9] - [1.0.3] Failed to fetch - cortex.cpp does not support special character in path #4048

Open BrunnoFe opened 1 week ago

BrunnoFe commented 1 week ago

Jan version

0.5.8

Describe the Bug

I keep getting this message when i try to download any model. Also, i am not able to use Jan default model for some reason.

image

Steps to Reproduce

No response

Screenshots / Logs

No response

What is your OS?

imtuyethan commented 1 week ago

@BrunnoFe Can you help send us app logs & cortex logs, here's how you can get them:

Screenshot 2024-11-20 at 1 04 33 PM

Open System monitor > Click on App Logs

BrunnoFe commented 6 days ago

Thanks for the answer! The logs are in the attached file.

app.log

I updated the application to the latest version (0.59) and now the error is different. The image below shows the error.

image

Also, the log file is the most recent after the update.

louis-jan commented 6 days ago

@BrunnoFe I think that’s because of the unsupported character in the username. Can you try with another user on your computer?

imtuyethan commented 4 days ago

@BrunnoFe I think that’s because of the unsupported character in the username. Can you try with another user on your computer?

Hmm can you elaborate more on this? :thinking: What username is it?

louis-jan commented 4 days ago

@BrunnoFe I think that’s because of the unsupported character in the username. Can you try with another user on your computer?

Hmm can you elaborate more on this? 🤔 What username is it?

See the program path, it indicates that the path is not valid.

Spawn cortex at path: C:\Users\Alguém\AppData\Roaming\Jan\data\extensions\@janhq\inference-cortex-extension\dist\bin\cortex-server.exe

2024-11-19T14:30:51.376Z [APP]::Error: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Error opening file: No such file or directory\r\n') 2024-11-19T14:30:51.376Z [APP]::Process error: Error opening file: No such file or directory

Default data folder path: C:\Users\Algu�m\AppData\Roaming\Jan\data - utils/file_manager_utils.h:155

Both the cortex and llama.cpp files failed to function with those special characters.

louis-jan commented 3 days ago

Reproducible

  1. Create a folder with the same username
  2. Open Jan
  3. All folders are created accordingly from Jan
  4. Could not spawn cortex-server.cpp

2024-11-25T17:06:42.691Z [APP]::Process exited with code 3221226505 2024-11-25T17:06:42.691Z [APP]::Restarting process in 5000ms (Attempt 5/5) 2024-11-25T17:06:47.694Z [APP]::Starting process: C:\Users\lephi\Desktop\Alguém\extensions\@janhq\inference-cortex-extension\dist\bin\cortex-server.exe --start-server --port 39291 --config_file_path C:\Users\lephi\Desktop\Alguém.janrc --data_folder_path C:\Users\lephi\Desktop\Alguém 2024-11-25T17:06:47.709Z [APP]::Process error: Error opening file: No such file or directory

louis-jan commented 3 days ago

Update:

logFolderPath: C:\Users\lephi\Desktop\Alguém
logLlamaCppPath: ./logs/cortex.log
logTensorrtLLMPath: ./logs/cortex.log
logOnnxPath: ./logs/cortex.log
dataFolderPath: C:\Users\lephi\Desktop\Alguém
maxLogLines: 100000
apiServerHost: 127.0.0.1
apiServerPort: 39291
checkedForUpdateAt: 0
checkedForLlamacppUpdateAt: 0
latestRelease: default_version
latestLlamacppRelease: ""
huggingFaceToken: ""
gitHubUserAgent: ""
gitHubToken: ""
llamacppVariant: windows-amd64-avx2-cuda-12-0
llamacppVersion: v0.1.39
enableCors: true
allowedOrigins:
  - http://localhost:39281
  - http://127.0.0.1:39281
  - http://0.0.0.0:39281
proxyUrl: ""
verifyProxySsl: true
verifyProxyHostSsl: true
proxyUsername: ""
proxyPassword: ""
noProxy: example.com,::1,localhost,127.0.0.1
verifyPeerSsl: false
verifyHostSsl: true
louis-jan commented 3 days ago

Linked issue https://github.com/janhq/cortex.cpp/issues/1724