Skip to content

Fix HttpServer breaking Azure App Service named pipe ports#488

Merged
heyitsaamir merged 3 commits into
mainfrom
fix/named-pipe-port
Mar 27, 2026
Merged

Fix HttpServer breaking Azure App Service named pipe ports#488
heyitsaamir merged 3 commits into
mainfrom
fix/named-pipe-port

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Summary

Fixes #487. SDK v2.0.6 broke deployments on Azure App Service because HttpServer.start() called parseInt() on the PORT environment variable, which on Azure App Service (IIS + iisnode) is a Windows named pipe path (e.g. \\.\pipe\507cb72a-...), not a numeric port. This returned NaN, causing the server to never bind and all requests to time out.

The fix removes the parseInt coercion and passes the port value through as-is to the adapter. Node's http.Server.listen() natively supports both numeric ports and named pipe strings. The IHttpServerAdapter.start() and ExpressAdapter.start() signatures are widened from number to number | string to match.

heyitsaamir and others added 3 commits March 24, 2026 23:48
These two markdown files are all a human needs to write — the e2e testing
skill generates and manages the actual Playwright test code from here.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove parseInt coercion in HttpServer.start() that converted named pipe
paths (e.g. \\.\pipe\...) to NaN on Azure App Service. Pass port through
as-is since Node's http.Server.listen() natively handles both numbers
and pipe strings.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@heyitsaamir
heyitsaamir merged commit dc6add3 into main Mar 27, 2026
7 checks passed
@heyitsaamir
heyitsaamir deleted the fix/named-pipe-port branch March 27, 2026 22:29
rajan-chari added a commit that referenced this pull request Apr 15, 2026
Two bugs fixed:

1. ExpressAdapter: accept https.Server in addition to http.Server.
   https.Server extends tls.Server (not http.Server), so the
   instanceof check silently missed it, falling through to create a
   new http.Server instead. Users passing an HTTPS server got HTTP
   behavior with no error.

2. DevtoolsPlugin: handle non-numeric port strings (named pipes).
   On Azure App Service, PORT is a Windows named pipe path like
   \.\pipe\507cb72a-... and parseInt() returns NaN, crashing the
   devtools server. Now falls back to port 3979 with a warning when
   the port is a named pipe. Same root cause as #487 (fixed in #488
   for HttpServer but missed in DevtoolsPlugin).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 2.0.6 will block the remote preview on some ATK's templates

2 participants