ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
11.35k stars 1.02k forks source link

TypeError [ERR_INVALID_URL]: Invalid URL #44

Closed futurewin closed 2 months ago

futurewin commented 2 months ago

Describe the bug start can connet to ollama can connet to llama3:latest send the first msg say "hi" to modal, the modal can work fine. but send the second msg "hi,again" to modal, backend crashed.

error info: node:internal/process/promises:288 triggerUncaughtException(err, true / fromPromise /); ^

TypeError [ERR_INVALID_URL]: Invalid URL at new NodeError (node:internal/errors:405:5) at new URL (node:internal/url:676:13) at searchSearxng (Perplexica/dist/lib/searxng.js:11:17) at RunnableLambda.func (Perplexica/dist/agents/webSearchAgent.js:82:59) at Perplexica/node_modules/@langchain/core/dist/runnables/base.cjs:1385:44 at MockAsyncLocalStorage.run (Perplexica/node_modules/@langchain/core/dist/singletons/index.cjs:10:9) at output (Perplexica/node_modules/@langchain/core/dist/runnables/base.cjs:1383:78) at new Promise () at RunnableLambda._transform (Perplexica/node_modules/@langchain/core/dist/runnables/base.cjs:1382:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { input: 'undefined/search?format=json', code: 'ERR_INVALID_URL'

and i found after crashing, the gpu is still working for a while

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots Screenshot from 2024-05-01 20-57-31 Screenshot from 2024-05-01 20-49-54

Additional context Add any other context about the problem here.

futurewin commented 2 months ago

and I found when I used writing mode , it will not crashed.

but if i use all mode ,it crashed

or i use writing mode, then click the search images buttons , the backend said "error: Error in image search: Invalid URL ", but not crashed. the browser said "Application error: a client-side exception has occurred (see the browser console for more information)."

and i am using vpn to open internet , is it the reason?

ItzCrazyKns commented 2 months ago

You didn't defined the SearxNG API URL in the config file

futurewin commented 2 months ago

i used Non-Docker Installation to install Perplexica , i don't know how to fix this problem. and i used docker to install it again, then have another problem

yarn run v1.22.19 $ node dist/app.js info: WebSocket server started on port 3001 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) info: Server is running on port 3001

ItzCrazyKns commented 2 months ago

That is not a problem ;-; its an issue from Yarn, I cannot help you with that. Additionally you won't need help for it, Perplexica would run completely fine and unaffected.