Waiting on tcp ports doesn't work in Node 18
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
We ran into an issue with Node 18, were wait-on would wait indefinitely for a service to start, even though it was already started.
Environment:
- Bitbucket Pipeline
- Node 18 image
- Azure Function App
Test Script:
```
concurrently -k -s first \"wait-on tcp:7071 --timeout=60000 && jest --forceExit\" \"azurite\" \"func start\"
```
Bitbucket Pipeline:
```
image: node:18
pipelines:
default:
- step:
name: Test
caches:
- node
script:
- npm install
- npm i --location=global azure-functions-core-tools@4
- npm i --location=global azurite@latest
- export FUNCTIONS_WORKER_RUNTIME="node"
- export APPINSIGHTS_INSTRUMENTATIONKEY=""
- export AzureWebJobsStorage="UseDevelopmentStorage=true"
- npm run test
```
We ended up downgrading the Bitbucket Pipeline to Node 16, to make it work for now.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue using the provided Node 18 Bitbucket Pipeline and test command, with wait-on checking tcp:7071 while azurite and func start run. Compare the behavior with Node 16 and investigate why wait-on waits indefinitely despite the port being available. Done means the Node 18 command detects the started service and proceeds to Jest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, javascript, node.js
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100