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: node-fetch used by squid-sdk/util/util-internal-http-client is not compatible with node 20 #183

Open
sameh-farouk opened this issue Jun 6, 2024 · 0 comments
Assignees
Labels
priority_minor type_bug Something isn't working
Milestone

Comments

@sameh-farouk
Copy link
Member

sameh-farouk commented Jun 6, 2024

This error was noticed, but it seems not critical (Affecting the log module only), and the processor is functioning without noticeable issues.

{"ns":"sys","time":1717715452573,"level":4,"msg":"Failed to serialize log record from sqd:processor:archive-request","err":{"stack":"TypeError [ERR_INVALID_THIS]: Value of \"this\" must be of type URLSearchParams\n    at get size (node:internal/url:459:13)\n    at Reflect.get (<anonymous>)\n    at Object.get (file:///squid/node_modules/@subsquid/util-internal-http-client/node_modules/node-fetch/src/headers.js:143:22)\n    at toJsonObject (/squid/node_modules/@subsquid/util-internal-json/lib/json.js:63:33)\n    at toJSON (/squid/node_modules/@subsquid/util-internal-json/lib/json.js:46:24)\n    at toJsonObject (/squid/node_modules/@subsquid/util-internal-json/lib/json.js:63:23)\n    at toJSON (/squid/node_modules/@subsquid/util-internal-json/lib/json.js:46:24)\n    at stringify (/squid/node_modules/@subsquid/logger/lib/sinks/json.js:12:52)\n    at Logger.jsonLinesStderrSink [as sink] (/squid/node_modules/@subsquid/logger/lib/sinks/json.js:7:26)\n    at Logger.write (/squid/node_modules/@subsquid/logger/lib/logger.js:56:14)"}}

The original issue seems to be thrown by node-fetch. squid-sdk firesquid release uses a version that is not compatible with node 20. firesquid uses node 16.

We recently tried to use node 20 which triggered this issue, so reverting to node 18 should make this error in logs gone.

@sameh-farouk sameh-farouk self-assigned this Jun 24, 2024
@sameh-farouk sameh-farouk added priority_minor type_bug Something isn't working labels Jun 24, 2024
@sameh-farouk sameh-farouk added this to the 2.13.0 milestone Jun 24, 2024
@ashraffouda ashraffouda modified the milestones: 2.13.0, 3.0.0 Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority_minor type_bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants