brunostjohn / perplexideez

Search the web and your self-hosted apps using local AI agents.
GNU Affero General Public License v3.0
118 stars 2 forks source link

SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON #5

Closed Famku closed 2 hours ago

Famku commented 2 hours ago

Hi, I always get this error when I try to search something:

Listening on 0.0.0.0:3000 2024/11/15 10:47PM INF | pid=1 hostname=0794ec907b5e port=9001 msg=Starting metrics server 2024/11/15 10:47PM INF | pid=1 hostname=0794ec907b5e msg=Connected to database 2024/11/15 10:48PM INF | pid=1 hostname=0794ec907b5e msg=All required models are available TypeError: Cannot read properties of undefined (reading 'map') at handleSources (file:///app/build/server/chunks/_server.ts-DIcYf0W2.js:1156:13) at handleResponseData (file:///app/build/server/chunks/_server.ts-DIcYf0W2.js:997:5) at EventEmitter. (file:///app/build/server/chunks/_server.ts-DIcYf0W2.js:962:19) at EventEmitter.emit (node:events:519:28) at handleStream (file:///app/build/server/chunks/_server.ts-DIcYf0W2.js:199:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) undefined:1 <!doctype html> ^ SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON at JSON.parse () at parseJSONFromBytes (node:internal/deps/undici/undici:5489:19) at successSteps (node:internal/deps/undici/undici:5470:27) at fullyReadBody (node:internal/deps/undici/undici:4381:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async consumeBody (node:internal/deps/undici/undici:5479:7) at async searchSearxng (file:///app/build/server/chunks/_server.ts-DIcYf0W2.js:35:24) at async fetchDocumentsFromSearxng (file:///app/build/server/chunks/_server.ts-DIcYf0W2.js:317:15) at async file:///app/node_modules/.pnpm/@langchain+core@0.3.17_openai@4.70.3zod@3.23.8/node_modules/@langchain/core/dist/runnables/base.js:1735:33 Node.js v20.18.0

brunostjohn commented 2 hours ago

From the readme:

All requests to SearXNG will fail unless JSON output is enabled. This is important, so please remember to adjust your configuration.

Please make sure JSON output is enabled as this is the error you'd get if it isn't.