Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
v18.xIssues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Description
Version
v18.17.0
Platform
Linux regseblaptop 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
importassertfrom"node:assert/strict";constlink="https://baz.org/";consturl=newURL(link);console.log("===== FIRST =====")assert.deepEqual(url,newURL(link));console.log("===== CONSOLE =====")console.log(url);console.log("===== SECOND =====")assert.deepEqual(url,newURL(link));How often does it reproduce? Is there a required condition?
The error occurs since Node.js v18.17.0.
What is the expected behavior? Why is that the expected behavior?
===== FIRST ===== ===== CONSOLE ===== URL{href: 'https://baz.org/', origin: 'https://baz.org', protocol: 'https:', username: '', password: '', host: 'baz.org', hostname: 'baz.org', port: '', pathname: '/', search: '', searchParams: URLSearchParams{}, hash: '' } ===== SECOND ===== What do you see instead?
===== FIRST ===== ===== CONSOLE ===== URL{href: 'https://baz.org/', origin: 'https://baz.org', protocol: 'https:', username: '', password: '', host: 'baz.org', hostname: 'baz.org', port: '', pathname: '/', search: '', searchParams: URLSearchParams{}, hash: '' } ===== SECOND ===== node:internal/process/esm_loader:97 internalBinding('errors').triggerUncaughtException( ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected ... Lines skipped + <ref *1> URL{- URL{[Symbol(context)]: URLContext{hash_start: 4294967295, ... search_start: 4294967295, username_end: 8 + }, + [Symbol(query)]: URLSearchParams{+ [Symbol(context)]: [Circular *1], + [Symbol(query)]: [] } } at file:///home/regseb/testcase/index.js:13:8 at ModuleJob.run (node:internal/modules/esm/module_job:194:25){generatedMessage: true, code: 'ERR_ASSERTION', actual: <ref *1> URL{[Symbol(context)]: URLContext{href: 'https://baz.org/', protocol_end: 6, username_end: 8, host_start: 8, host_end: 15, pathname_start: 15, search_start: 4294967295, hash_start: 4294967295, port: 4294967295, scheme_type: 2 }, [Symbol(query)]: URLSearchParams{[Symbol(query)]: [], [Symbol(context)]: [Circular *1] } }, expected: URL{[Symbol(context)]: URLContext{href: 'https://baz.org/', protocol_end: 6, username_end: 8, host_start: 8, host_end: 15, pathname_start: 15, search_start: 4294967295, hash_start: 4294967295, port: 4294967295, scheme_type: 2 } }, operator: 'deepStrictEqual' } Node.js v18.17.0 Additional information
- Node.js v18.17.0 comes with the latest version of the URL parser, Ada.
- The difference is found only after
console.log().
Metadata
Metadata
Assignees
Labels
v18.xIssues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.