Comments (8)
Please see #3043 which looks like the same issue.
from gateway.
same here, but I'm getting the error after running the docker-compose.yml file on my Ubuntu laptop
from gateway.
Checked #3043 and rewrote docker-compose.yml according to suggestion:
version: '3.3'
services:
webthings:
container_name: webthings
image: "webthingsio/gateway"
volumes:
- ./:/home/node/.webthings
network_mode: host
environment:
- "TZ=Europe/Lisbon"
restart: always
ports:
- 4443:4443
- 8082:8080
logging:
options:
max-size: "1m"
max-file: "10"
Still getting error:
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/node/webthings/gateway/build/models/actions.js:40:34)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Process 9 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)
+ WEBTHINGS_HOME=/home/node/.webthings
+ args=
+ start_task=run-only
+ is_container
+ '[' -f /.dockerenv ']'
+ return 0
++ node --version
++ egrep -o '[0-9]+'
++ head -n1
+ _node_version=12
+ [[ ! -f /home/node/.webthings/.node_version ]]
+ cd /home/node/webthings/gateway
+ mkdir -p /home/node/.webthings/config
+ ./tools/update-addons.sh
Opening database: /home/node/.webthings/config/db.sqlite3
/home/node/webthings/gateway/build/models/things.js:377
addon_manager_1.default.on(Constants.THING_ADDED, (thing) => {
^
TypeError: Cannot read property 'on' of undefined
at Object.<anonymous> (/home/node/webthings/gateway/build/models/things.js:377:25)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/node/webthings/gateway/build/models/actions.js:40:34)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Process 10 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)
+ WEBTHINGS_HOME=/home/node/.webthings
+ args=
+ start_task=run-only
+ is_container
+ '[' -f /.dockerenv ']'
+ return 0
++ node --version
++ egrep -o '[0-9]+'
++ head -n1
+ _node_version=12
+ [[ ! -f /home/node/.webthings/.node_version ]]
+ cd /home/node/webthings/gateway
+ mkdir -p /home/node/.webthings/config
+ ./tools/update-addons.sh
Opening database: /home/node/.webthings/config/db.sqlite3
/home/node/webthings/gateway/build/models/things.js:377
addon_manager_1.default.on(Constants.THING_ADDED, (thing) => {
^
TypeError: Cannot read property 'on' of undefined
at Object.<anonymous> (/home/node/webthings/gateway/build/models/things.js:377:25)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/node/webthings/gateway/build/models/actions.js:40:34)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Process 10 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)
+ WEBTHINGS_HOME=/home/node/.webthings
+ args=
+ start_task=run-only
+ is_container
+ '[' -f /.dockerenv ']'
+ return 0
++ egrep -o '[0-9]+'
++ node --version
++ head -n1
+ _node_version=12
+ [[ ! -f /home/node/.webthings/.node_version ]]
+ cd /home/node/webthings/gateway
+ mkdir -p /home/node/.webthings/config
+ ./tools/update-addons.sh
Opening database: /home/node/.webthings/config/db.sqlite3
/home/node/webthings/gateway/build/models/things.js:377
addon_manager_1.default.on(Constants.THING_ADDED, (thing) => {
^
TypeError: Cannot read property 'on' of undefined
at Object.<anonymous> (/home/node/webthings/gateway/build/models/things.js:377:25)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/node/webthings/gateway/build/models/actions.js:40:34)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
from gateway.
I get the same error on RPi3 Raspbian buster.
Tried configuration as mentioned in [https://github.com//issues/3043].
I was using a deb package with V1.0 before so the docker installation for V1.1 is a fresh one without taking over previous installation.
In the config folder db.sqlite3 with size 0 is created when I try to start the container.
from gateway.
Update: Pulled V1.0.0 and started it, then replaced it with V1.1.0 => V1.1.0 is running
Also copied all files from the deb installation to the config folder => V1.1.0 is running
=> Seems that some files have to be present from previous version initially; fresh installation does not work
from gateway.
Just to better understand, your workaround is to install 1.0.0, keep the sqlite database file and then upgrade to 1.1.0 ?
Thanks
from gateway.
Followed suggestion in #3066 of creating a .node_version file with '12' in it in the '/home/node/.webthings' folder. And the docker started but throw me a new error:
Emitted 'error' event on WebSocketServer instance at:
at Server.emit (events.js:314:20)
at emitErrorNT (net.js:1343:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
�������
port: 8080
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] run-only:node build/app.js
npm ERR! Exit status 1
After this i edited the /config/local.json file to explicitly set HTTP port to 8082 and after this it started.
{
"ports": {
"https": 4448,
"http": 8082
}
}
The docker seems broken in version 1.1.0 but at least there is a workaround. :)
In short, workaround is create a .node_version with the text "12" (no quotes) named file in the '/home/node/.webthings' folder before starting the docker.
from gateway.
Just to better understand, your workaround is to install 1.0.0, keep the sqlite database file and then upgrade to 1.1.0 ?
Thanks
Workaround is to install 1.0.0 and run the container once.
Then remove the container, replace it by 1.1.0, keep all files generated by 1.0.0 (i.e. use the same folder mapping).
If you just take the sqlite file from a working installation that is not enough.
from gateway.
Related Issues (20)
- All HTTP error responses containing a body should use the problem details format
- Consider adding `@language` member to `@context` of Thing Descriptions
- Properly implement the `OAuth2SecurityScheme`
- Support `ImageProperty` and `VideoProperty` properties using `forms`
- Missing implementations for adding / removing actions? HOT 1
- Re-factor "context menu" as separate dialogs
- `WebSocket sendMessage failed` when adding a thing to a group HOT 1
- Things get rendered twice HOT 2
- Use new overflow menu design everywhere
- Cannot start container, nodejs error HOT 1
- Confirm deletion of user account
- Confirm removal of add-on HOT 2
- Consider warning users that tunnel can't be configured after first time setup
- Error on startup with docker-compose HOT 2
- Things or "No devices yet" message do not appear on first boot
- Back button on Thing detail view not working
- RPI3+ 1.2.0-alpha.1 - Missing refreshes in 'Things' view ? HOT 1
- WebThings Gateway 1.2 Alpha testing feedback HOT 6
- Zigbee & Z-Wave Things missing properties HOT 4
- MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway.