Skip to content

Conversation

@lobsterkatie
Copy link
Member

Port 3000 is the default port for (at minimum) Rails, Express, and Next.js. It's also the port we've been using in our scripts which do manual testing in the node SDK. This means if you're running a local server from any of the above, and try to run tests in the node SDK, it hangs (and with no error message, either, which is kind of annoying - see nodejs/node#35937).

This PR changes the port used by each of the manual test scripts to ones which hopefully are much less likely to already be in use locally.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.59 KB (-0.01% 🔽)
@sentry/browser - Webpack 21.45 KB (0%)
@sentry/react - Webpack 21.49 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.78 KB (-0.01% 🔽)

@kamilogorek
Copy link
Contributor

We could dynamically pick a port if that'd be more important part of the stack, but in case of manual tests I think it's perfectly fine to just choose a random one as you did here.

@rhcarvalho
Copy link
Contributor

rhcarvalho commented Apr 8, 2021

Operating systems support that by setting the port number to 0; see https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback

If port is omitted or is 0, the operating system will assign an arbitrary unused port, which can be retrieved by using server.address().port after the 'listening' event has been emitted.

@kamilogorek
Copy link
Contributor

Nice, TIL.

@lobsterkatie lobsterkatie force-pushed the kmclb-fix-port-conflicts-node-tests branch from ee96d8c to 30ebab4 Compare April 8, 2021 21:12
@lobsterkatie lobsterkatie merged commit fbdc875 into master Apr 8, 2021
@lobsterkatie lobsterkatie deleted the kmclb-fix-port-conflicts-node-tests branch April 8, 2021 21:19
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.

4 participants