[Bug]: cannot start up server while in development environment
Closed this issue · 7 comments
node version: 16.0.0
OS: windows
steps to reproduce:
- npm install
- npm run dev
the live demo correctly starts on port 8080, but the server shuts down due to an error:
npm run dev
> @odoo/o-spreadsheet@16.2.0-alpha.3 dev
> npm-run-all build --parallel server serve-static watch:*
> @odoo/o-spreadsheet@16.2.0-alpha.3 build
> npm-run-all build:js bundle:js "bundle:xml -- --outDir build"
> @odoo/o-spreadsheet@16.2.0-alpha.3 build:js
> tsc --module es6 --incremental
> @odoo/o-spreadsheet@16.2.0-alpha.3 bundle:js
> rollup -c -m --configDev
build/js/index.js → build/o_spreadsheet.js...
created build/o_spreadsheet.js in 4.4s
> @odoo/o-spreadsheet@16.2.0-alpha.3 bundle:xml
> node tools/bundle_xml/main.js "--outDir" "build"
Building xml template bundle in "build/" ...done
> @odoo/o-spreadsheet@16.2.0-alpha.3 server
> node tools/server/main.js
> @odoo/o-spreadsheet@16.2.0-alpha.3 watch:ts
> npm run build:js -- --watch
> @odoo/o-spreadsheet@16.2.0-alpha.3 watch:bundle
> npm run bundle:js -- --watch
> @odoo/o-spreadsheet@16.2.0-alpha.3 serve-static
> live-server --open=demo --watch=build/o_spreadsheet.js,build/o_spreadsheet.xml,demo
> @odoo/o-spreadsheet@16.2.0-alpha.3 watch:xml
> node tools/bundle_xml/watch_xml_templates.js
rollup v2.64.0
bundles build/js/index.js → build\o_spreadsheet.js...
[9:04:33 AM]: Connection: 0 messages have been sent
[9:04:33 AM]: Connection: 0 messages have been sent
[9:04:33 AM]: writing 0 messages to ./logs/session.json
ERROR: "server" exited with 1.
We apparently lack some logs to explain that issue. Most likely, you have run npm run dev
twice and the first process has not been killed properly. Could you check that you don't have any node process going on on port 9090
which is the port of the websocket server that handles the collaborative edition.
How to:
Open Powershell and enter
Get-NetTCPConnection -LocalPort 9090,8080 | select OwningProcess
which should yield something like
you can then look for the process with those PIDS and kill them.
Let us know if you still have issues afterwards.
i confirm that there is no process listening on that port:
Get-NetTCPConnection -LocalPort 9090,8080 | select OwningProcess
Get-NetTCPConnection : No MSFT_NetTCPConnection objects found with property 'LocalPort' equal to '9090'. Verify the value of the property and retry.
but unfortunately the server won't start:
first attempt:
[11:11:18 AM]: Connection: 0 messages have been sent
[11:11:18 AM]: writing 0 messages to ./logs/session.json
> @odoo/o-spreadsheet@16.2.0-alpha.3 build:js
> tsc --module es6 --incremental "--watch"
GET /favicon.ico 404 6.506 ms - 150
ERROR: "server" exited with 1.
second run:
[11:11:59 AM]: Connection: 0 messages have been sent
[11:11:59 AM]: writing 0 messages to ./logs/session.json
Serving "......\o-spreadsheet" at http://127.0.0.1:8080
Ready for changes
ERROR: "server" exited with 1.
Ok, I do'nt have the time to improve the server script right now but we can quickly explore 2 possibilities:
- have you been prompted to authorize the use of those ports and agreed to it hen you first started the command ? If not, the ports might be blocked by your own firewall
- Could you run the following
npm run build
thennpm run serve-static
and try to accesshttp://127.0.0.1:8080/demo
? if it succeeds, then the issue is definitely in the websocket server.
have you been prompted to authorize the use of those ports and agreed to it hen you first started the command ? If not, the ports might be blocked by your own firewall
no i havent, but usually i have no issue when starting node applications, and i am using the same approach in this instance. I could try to setup a quick logging myself to undertand whats going on. Maybe not today, perhaps later.
Could you run the following npm run build then npm run serve-static and try to access http://127.0.0.1:8080/demo ? if it succeeds, then the issue is definitely in the websocket server.
will do
are you still experiencing that problem or can we close the issue?
i have cloned a newer version of the repo and i am not facing this issue anymore ... i would suggest to also report the recommended nodejs version to use for running the project in the README.
i guess this issue can be closed
Thanks for your report, we will update the readme and the documentation, with more furnished examples of extensions!