FlowFuse / FlowFuse/flowfuse

Improve FF error reporting with missing stack / spinning up a project

Open
#3,670 1 comment 0 reactions 0 assignees View on GitHub
needs-triage size:S type:bug
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

### Current Behavior

Current log state:

```shell
[2024-04-02T12:27:35.030Z] INFO: Starting project be7a6f6c-a189-4561-b61f-dbe12336c2e6 on port 12081
[2024-04-02T12:27:35.147Z] INFO: Set FORGE_NR_PATH to /home/cstns/Workspace/flowfuse/var/stacks/1.2.3
RequestError: connect ECONNREFUSED 127.0.0.1:13081
at ClientRequest. (/home/cstns/Workspace/flowfuse/node_modules/got/dist/source/core/index.js:970:111)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:525:35)
at ClientRequest.emit (node:domain:489:12)
at origin.emit (/home/cstns/Workspace/flowfuse/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at Socket.socketErrorListener (node:_http_client:502:9)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
code: 'ECONNREFUSED',
timings: {
start: 1712060866148,
socket: 1712060866148,
lookup: 1712060866148,
connect: undefined,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: 1712060866150,
abort: undefined,
phases: {
wait: 0,
dns: 0,
tcp: undefined,
tls: undefined,
request: undefined,
firstByte: undefined,
download: undefined,
total: 2
}
}
}
```

N.B.
notice the different port mappings 12080 & 13080

### Expected Behavior

We should be able to detect that a stack has not been installed

### Steps To Reproduce

In FF UI, create a stack for a NR version that you don't have installed

### Environment

- FlowFuse version: latest@dev
- Node.js version: 18.15.0
- npm version: N/A
- Platform/OS:
- Browser:

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.