Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Text:
Hello Firecrawl Team,
I'm encountering a critical error in the Firecrawl search function that suddenly appeared today. The application was working perfectly until about 5 hours ago, and now every search request

const response = await fetch(`https://my-selfhosted-server-url/v1/search`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
});

fails with the following error:
Details:

Error in search function {"error":{"name":"TypeError","message":"Converting circular structure to JSON
--> starting at object with constructor 'Agent'
| property 'sockets' -> object with constructor 'Object'
| property 'www.google.com:443::::::::true:::::::::::::' -> object with constructor 'Array'
| ...
| property '_httpMessage' -> object with constructor 'ClientRequest'
--- property 'agent' closes the circle"

Error type:

TypeError when trying to serialize circular structure to JSON
Location: The error occurs in the logger component at /app/dist/src/lib/logger.js:31:12
Root cause: The logger is attempting to stringify an HTTP Agent object with circular references
Timing: This error suddenly started occurring today without any changes on my end
Reproduction: Every search request now produces this error
Impact: The search functionality is completely broken
Specific endpoint affected: This error only occurs when using the https://api.firecrawl.dev/v1/search endpoint. Other endpoints seem to be working correctly.

Steps I've already taken:
Redeployed the entire application
Verified that my frontend code is sending valid requests
Confirmed that the error is occurring on the server side, not in my client code

Full error stack trace:
api-1 | 2025-03-11 13:31:18 error [:]: Error in search function {"error":{"name":"TypeError","message":"Converting circular structure to JSON\n --> starting at object with constructor 'Agent'\n | property 'sockets' -> object with constructor 'Object'\n | property 'www.google.com:443::::::::true:::::::::::::' -> object with constructor 'Array'\n | ...\n | property '_httpMessage' -> object with constructor 'ClientRequest'\n --- property 'agent' closes the circle","stack":"TypeError: Converting circular structure to JSON\n --> starting at object with constructor 'Agent'\n | property 'sockets' -> object with constructor 'Object'\n | property 'www.google.com:443::::::::true:::::::::::::' -> object with constructor 'Array'\n | ...\n | property '_httpMessage' -> object with constructor 'ClientRequest'\n --- property 'agent' closes the circle\n at JSON.stringify ()\n at Printf.template (/app/dist/src/lib/logger.js:31:12)\n at Printf.transform (/app/node_modules/.pnpm/logform@2.6.0/node_modules/logform/printf.js:11:26)\n at Format.transform (/app/node_modules/.pnpm/logform@2.6.0/node_modules/logform/combine.js:20:24)\n at Console._write (/app/node_modules/.pnpm/winston-transport@4.8.0/node_modules/winston-transport/modern.js:91:33)\n at writeOrBuffer (/app/node_modules/.pnpm/readable-stream@4.5.2/node_modules/readable-stream/lib/internal/streams/writable.js:334:12)\n at _write (/app/node_modules/.pnpm/readable-stream@4.5.2/node_modules/readable-stream/lib/internal/streams/writable.js:283:10)\n at Writable.write (/app/node_modules/.pnpm/readable-stream@4.5.2/node_modules/readable-stream/lib/internal/streams/writable.js:286:10)\n at DerivedLogger.ondata (/app/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js:629:20)\n at DerivedLogger.emit (node:events:518:28)\n at addChunk (/app/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js:279:12)\n at readableAddChunk (/app/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js:262:11)\n at Readable.push (/app/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js:228:10)\n at Transform.push (/app/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js:132:32)\n at DerivedLogger._transform (/app/node_modules/.pnpm/winston@3.14.2/node_modules/winston/lib/winston/logger.js:313:12)\n at Transform._read (/app/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js:166:10)"}}
^CGracefully stopping... (press Ctrl+C again to force)

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.