René's URL Explorer Experiment


Title: fs.openAsBlob reports a missing file as ERR_INVALID_ARG_VALUE, discarding the ENOENT · Issue #65514 · nodejs/node · GitHub

Open Graph Title: fs.openAsBlob reports a missing file as ERR_INVALID_ARG_VALUE, discarding the ENOENT · Issue #65514 · nodejs/node

X Title: fs.openAsBlob reports a missing file as ERR_INVALID_ARG_VALUE, discarding the ENOENT · Issue #65514 · nodejs/node

Description: Version v26.7.0 (reproduced; code path unchanged on main) Platform macOS (Darwin 25.5.0, arm64) — not platform-specific Subsystem fs What steps will reproduce the bug? const { openAsBlob } = require("node:fs"); try { openAsBlob("./does-n...

Open Graph Description: Version v26.7.0 (reproduced; code path unchanged on main) Platform macOS (Darwin 25.5.0, arm64) — not platform-specific Subsystem fs What steps will reproduce the bug? const { openAsBlob } = requir...

X Description: Version v26.7.0 (reproduced; code path unchanged on main) Platform macOS (Darwin 25.5.0, arm64) — not platform-specific Subsystem fs What steps will reproduce the bug? const { openAsBlob } = requir...

Opengraph URL: https://github.com/nodejs/node/issues/65514

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fs.openAsBlob reports a missing file as ERR_INVALID_ARG_VALUE, discarding the ENOENT","articleBody":"### Version\n\nv26.7.0 (reproduced; code path unchanged on `main`)\n\n### Platform\n\nmacOS (Darwin 25.5.0, arm64) — not platform-specific\n\n### Subsystem\n\n`fs`\n\n### What steps will reproduce the bug?\n\n```js\nconst { openAsBlob } = require(\"node:fs\");\ntry {\n  openAsBlob(\"./does-not-exist.txt\");\n} catch (error) {\n  console.log(error.name, error.code, error.message);\n  // TypeError ERR_INVALID_ARG_VALUE Unable to open file as blob\n}\n```\n\nAlways reproduces. Same result for a permission failure — every open/stat failure produces the identical error.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nA rejection (or at least an error) equivalent to what every other `fs` open/stat API produces for a missing file: a system error with `code: \"ENOENT\"`, plus `syscall` and `path`. `ERR_INVALID_ARG_VALUE` (a `TypeError`) says the *argument* is malformed, but the path here is a perfectly valid argument — the file just doesn't exist. The docs for `openAsBlob` don't document any different error contract.\n\n### What do you see instead?\n\n`TypeError [ERR_INVALID_ARG_VALUE]: Unable to open file as blob` — thrown synchronously (the synchronous-throw half is already tracked in #62418), with no `errno`, `syscall`, or `path`. ENOENT, EACCES, and any other underlying failure are indistinguishable.\n\n### Additional information\n\nMechanism:\n\n1. `lib/fs.js` `openAsBlob()` calls `createBlobFromFilePath(path)` synchronously and wraps the result in `PromiseResolve`.\n2. `src/node_blob.cc` `BlobFromFilePath()` calls `DataQueue::CreateFdEntry(env, args[0])` and, when it gets `nullptr`, throws `THROW_ERR_INVALID_ARG_VALUE(env, \"Unable to open file as blob\")`.\n3. `src/dataqueue/queue.cc` `FdEntry::Create()` returns `nullptr` for **any** negative `uv_fs_stat`/open result, discarding the libuv status code — this is where the ENOENT is lost.\n\nNote that the pending fix for #62418 (PR #62655) only converts the synchronous throw into a promise rejection; its new test asserts `code: 'ERR_INVALID_ARG_VALUE'` for `openAsBlob('does-not-exist')`, which would enshrine the misleading code. It would be good to fix the error identity at the same time: have the native side (or `FdEntry::Create`) propagate the uv status and throw a proper `UVException` (`ENOENT`/`EACCES`/… with `syscall`/`path`), as `fs.open` does.\n\nReal-world impact: the generic `ERR_INVALID_ARG_VALUE` sent us debugging \"path validation\" changes for a test-suite failure whose actual cause was simply a cwd-relative path to a file that didn't exist — an `ENOENT` with the path attached would have made it a ten-second diagnosis.\n\nRelated observation while testing (can file separately if preferred): `openAsBlob(\"./some-directory\")` succeeds and returns a `Blob` sized to the directory's stat size; reading it later fails with `NotReadableError: The blob could not be read`. An EISDIR at open time would be more helpful there too.\n","author":{"url":"https://github.com/gildas-lormeau","@type":"Person","name":"gildas-lormeau"},"datePublished":"2026-08-24T12:39:41Z","url":"https://github.com/nodejs/node/issues/65514"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1d7d610f-cd7a-9227-d082-a192f82706e1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD624:278FD:655651:83E639:6AED2D8B
html-safe-nonce9d757c7428ff639c0df885b972f4931ef5508c086b18b975a29c7f414c97cd8e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjI0OjI3OEZEOjY1NTY1MTo4M0U2Mzk6NkFFRDJEOEIiLCJ2aXNpdG9yX2lkIjoiMzE2Njg5Mzg0NTQ0MTc1MjQ1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac45461c01cb4b5548ad76f19eeddb512eb1c1182bf060da813a45b945f286107a
hovercard-subject-tagissue:5234804837
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65514/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a08fd55d5d87a0358f32bb02dbcfad46f6178ef3013363a135de6a3f98ee34dc/nodejs/node/issues/65514
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a08fd55d5d87a0358f32bb02dbcfad46f6178ef3013363a135de6a3f98ee34dc/nodejs/node/issues/65514
og:image:altVersion v26.7.0 (reproduced; code path unchanged on main) Platform macOS (Darwin 25.5.0, arm64) — not platform-specific Subsystem fs What steps will reproduce the bug? const { openAsBlob } = requir...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegildas-lormeau
hostnamegithub.com
expected-hostnamegithub.com
Nonee51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ebb7b901cc154ecc179a44f266fcf69f343b30
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/65514#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F65514
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F65514
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/65514
Reloadhttps://github.com/nodejs/node/issues/65514
Reloadhttps://github.com/nodejs/node/issues/65514
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/65514
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/65514
#65517https://github.com/nodejs/node/pull/65517
fs.openAsBlob reports a missing file as ERR_INVALID_ARG_VALUE, discarding the ENOENThttps://github.com/nodejs/node/issues/65514#top
#65517https://github.com/nodejs/node/pull/65517
https://github.com/gildas-lormeau
gildas-lormeauhttps://github.com/gildas-lormeau
on Aug 24, 2026https://github.com/nodejs/node/issues/65514#issue-5234804837
#62418https://github.com/nodejs/node/issues/62418
#62418https://github.com/nodejs/node/issues/62418
#62655https://github.com/nodejs/node/pull/62655
https://github.com/bitpshr
bitpshrhttps://github.com/bitpshr
on Aug 24, 2026https://github.com/nodejs/node/issues/65514#issuecomment-5396985688
#65517https://github.com/nodejs/node/pull/65517
#65517https://github.com/nodejs/node/pull/65517
#62655https://github.com/nodejs/node/pull/62655
nodejs-github-bothttps://github.com/nodejs-github-bot
on Aug 28, 2026https://github.com/nodejs/node/issues/65514#event-30167430115
src: report libuv error when openAsBlob cannot stathttps://github.com/nodejs/node/commit/05447419fbc708fbedaa7bc9740dcd242fab0d08
0544741https://github.com/nodejs/node/commit/05447419fbc708fbedaa7bc9740dcd242fab0d08
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#65517https://github.com/nodejs/node/pull/65517
on Aug 28, 2026https://github.com/nodejs/node/issues/65514#event-30167430162
aduh95https://github.com/aduh95
on Aug 29, 2026https://github.com/nodejs/node/issues/65514#event-30208027415
src: report libuv error when openAsBlob cannot stathttps://github.com/nodejs/node/commit/68699cd5cbc14d3864202ad6d4962e1c10ecd5b1
68699cdhttps://github.com/nodejs/node/commit/68699cd5cbc14d3864202ad6d4962e1c10ecd5b1
src: report libuv error when openAsBlob cannot stathttps://github.com/nodejs/node/commit/d2bc30f86515bae155064c6aeac8d29bbff1f8e4
d2bc30fhttps://github.com/nodejs/node/commit/d2bc30f86515bae155064c6aeac8d29bbff1f8e4
aduh95https://github.com/aduh95
on Sep 15, 2026https://github.com/nodejs/node/issues/65514#event-31161510172
src: report libuv error when openAsBlob cannot stathttps://github.com/nodejs/node/commit/9c46e563034fe1d8806dd275f4a34340b74af5a5
9c46e56https://github.com/nodejs/node/commit/9c46e563034fe1d8806dd275f4a34340b74af5a5
src: report libuv error when openAsBlob cannot stathttps://github.com/nodejs/node/commit/e3f52b80a57066e6c090894cb9851f162bc517a6
e3f52b8https://github.com/nodejs/node/commit/e3f52b80a57066e6c090894cb9851f162bc517a6
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/65514
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/65514
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.