René's URL Explorer Experiment


Title: `createDevServer` starts on a port that another server holds on `127.0.0.1` · Issue #460 · devframes/devframe · GitHub

Open Graph Title: `createDevServer` starts on a port that another server holds on `127.0.0.1` · Issue #460 · devframes/devframe

X Title: `createDevServer` starts on a port that another server holds on `127.0.0.1` · Issue #460 · devframes/devframe

Description: Summary If another server listens on 127.0.0.1:, createDevServer still starts on the same port and reports no error. With the default host localhost, devframe binds only [::1]:. Requests to 127.0.0.1: then go to the oth...

Open Graph Description: Summary If another server listens on 127.0.0.1:, createDevServer still starts on the same port and reports no error. With the default host localhost, devframe binds only [::1]:. Request...

X Description: Summary If another server listens on 127.0.0.1:<port>, createDevServer still starts on the same port and reports no error. With the default host localhost, devframe binds only [::1]:<port&...

Opengraph URL: https://github.com/devframes/devframe/issues/460

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`createDevServer` starts on a port that another server holds on `127.0.0.1`","articleBody":"### Summary\n\nIf another server listens on `127.0.0.1:\u003cport>`, `createDevServer` still starts on the same port and reports no error. With the default host `localhost`, devframe binds only `[::1]:\u003cport>`. Requests to `127.0.0.1:\u003cport>` then go to the other server.\n\nThe cause is in `get-port-please`, which devframe bundles. `getPort({ port, host })` tries to bind only the given host. `127.0.0.1` and `::1` can each hold the same port, so the port looks free. This is unjs/get-port-please#121, which is still open.\n\n`packages/devframe/src/node/instance-shell.ts` already notes that `getPort` can \"disagree across the v4/v6 duals of `localhost`\". The retry there runs only when the bind fails with `EADDRINUSE`. In this case the bind succeeds, so the retry does not run.\n\n### Versions\n\n- `devframe` 1.2.6 (`main` at `0e4a49c7`), `get-port-please` 3.2.0 (the latest release)\n- Linux: Node 22.23 in Docker `node:22-bookworm`, with IPv6 on the loopback interface\n- macOS 15: Node 22.22\n\n### Reproduction\n\n```js\nimport { createServer } from 'node:net'\nimport { defineDevframe } from 'devframe'\nimport { createDevServer } from 'devframe/adapters/dev'\n\nconst port = 19876\n\n// Another server holds the port on 127.0.0.1 only.\nconst other = createServer()\nawait new Promise(resolve => other.listen(port, '127.0.0.1', resolve))\n\nconst devframe = defineDevframe({ id: 'repro', name: 'Repro', cli: { port }, setup() {} })\nconst server = await createDevServer(devframe, { openBrowser: false })\n\nconsole.log(server.port) // Expected: a port other than 19876\n\nawait server.close()\nother.close()\n```\n\nThe script prints `19876` on Linux and on macOS.\n\nResults with another server on `127.0.0.1:\u003cport>`:\n\n| Platform | `host` | Conflict found | devframe binds |\n| --- | --- | --- | --- |\n| Linux, IPv6 on | `localhost` or not set | No | `[::1]:\u003cport>` |\n| Linux, IPv6 on | `0.0.0.0` | Yes | another port |\n| Linux, IPv6 off | any | Yes | another port |\n| macOS | `localhost` or not set | No | `[::1]:\u003cport>` |\n| macOS | `0.0.0.0` | No | `*:\u003cport>` |\n\nWhen the conflict is not found, `http://127.0.0.1:\u003cport>` reaches the other server. On Linux, Node `fetch('http://localhost:\u003cport>')` also reaches the other server. With `host: '0.0.0.0'` on macOS, `localhost` and `127.0.0.1` both reach the other server.\n\n### Proposed fix\n\nI have a fix with tests, and I can open a PR:\n\n1. In `get-port-please`, `getPort` also tries `127.0.0.1`, `::1`, `0.0.0.0` and `::` when the host is `localhost`, a loopback address, or a wildcard address. The port is in use if one of these binds fails with `EADDRINUSE` or `EACCES`. Other errors, such as `EADDRNOTAVAIL` when IPv6 is off, mean that the address does not exist. They do not count as \"in use\".\n2. devframe bundles `get-port-please`, so it carries the same change as a pnpm patch (`patches/get-port-please@3.2.0.patch`). The fix then reaches every caller of `devframe/utils/get-port`, for example Vite DevTools. You can remove the patch when upstream releases a fix.\n3. A regression test in `packages/devframe/src/adapters/__tests__/dev.test.ts`. It fails on `main` and passes with the patch, on Linux (IPv6 on) and on macOS.\n\nI will also send the same change upstream for unjs/get-port-please#121. If you want a different shape, tell me and I will change the PR. One option is a small wrapper in `devframe/utils/get-port` instead of a patch.\n","author":{"url":"https://github.com/DBAAZzz","@type":"Person","name":"DBAAZzz"},"datePublished":"2026-10-26T01:10:37Z","url":"https://github.com/devframes/devframe/issues/460"}

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:5fa22405-19f3-1271-6988-9096bb04f562
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBF12:2781FE:950932:D17229:6AFB72C0
html-safe-nonceb030fe94ce0f93ee738da0a0b5c2d79c67368fe43299075b5a9a6895e05e3777
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjEyOjI3ODFGRTo5NTA5MzI6RDE3MjI5OjZBRkI3MkMwIiwidmlzaXRvcl9pZCI6IjkxNDUxMzU4Njc4Njg0NDMzMjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac467ea88c665316f8fe3d631792d45697ba99e0541efc3db9ad4613e0f2e18aea
hovercard-subject-tagissue:6031499793
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/devframes/devframe/460/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d7b19ea07decac8487b2daeed976d961b43c258ae85bfa7bdbe4a121326ec6f6/devframes/devframe/issues/460
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d7b19ea07decac8487b2daeed976d961b43c258ae85bfa7bdbe4a121326ec6f6/devframes/devframe/issues/460
og:image:altSummary If another server listens on 127.0.0.1:, createDevServer still starts on the same port and reports no error. With the default host localhost, devframe binds only [::1]:. Request...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDBAAZzz
hostnamegithub.com
expected-hostnamegithub.com
None0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48
turbo-cache-controlno-preview
go-importgithub.com/devframes/devframe git https://github.com/devframes/devframe.git
octolytics-dimension-user_id279879373
octolytics-dimension-user_logindevframes
octolytics-dimension-repository_id1231722386
octolytics-dimension-repository_nwodevframes/devframe
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1231722386
octolytics-dimension-repository_network_root_nwodevframes/devframe
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
release2e8872b770cc4d5d0cc1f2026afab747a268e2ce
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/devframes/devframe/issues/460#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fissues%2F460
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%2Fdevframes%2Fdevframe%2Fissues%2F460
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=devframes%2Fdevframe
Reloadhttps://github.com/devframes/devframe/issues/460
Reloadhttps://github.com/devframes/devframe/issues/460
Reloadhttps://github.com/devframes/devframe/issues/460
devframeshttps://github.com/devframes
devframehttps://github.com/devframes/devframe
Codehttps://github.com/devframes/devframe
Issues12 (12)https://github.com/devframes/devframe/issues
Pull requests13 (13)https://github.com/devframes/devframe/pulls
Actionshttps://github.com/devframes/devframe/actions
Security and qualityhttps://github.com/devframes/devframe/security
Insightshttps://github.com/devframes/devframe/pulse
https://github.com/devframes/devframe
New issuehttps://github.com/login?return_to=https://github.com/devframes/devframe/issues/460
New issuehttps://github.com/login?return_to=https://github.com/devframes/devframe/issues/460
#461https://github.com/devframes/devframe/pull/461
createDevServer starts on a port that another server holds on 127.0.0.1https://github.com/devframes/devframe/issues/460#top
#461https://github.com/devframes/devframe/pull/461
https://github.com/DBAAZzz
DBAAZzzhttps://github.com/DBAAZzz
on Oct 26, 2026https://github.com/devframes/devframe/issues/460#issue-6031499793
unjs/get-port-please#121https://github.com/unjs/get-port-please/issues/121
unjs/get-port-please#121https://github.com/unjs/get-port-please/issues/121
antfuhttps://github.com/antfu
completedhttps://github.com/devframes/devframe/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#461https://github.com/devframes/devframe/pull/461
on Oct 30, 2026https://github.com/devframes/devframe/issues/460#event-34734872997
Sign up for freehttps://github.com/signup?return_to=https://github.com/devframes/devframe/issues/460
Sign in to commenthttps://github.com/login?return_to=https://github.com/devframes/devframe/issues/460
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.