MAJ page: Development under Windows

Hello.
While setting up the DEV environment, I encountered the following error when running npm install (backend section):

~/gladys/server$ npm install
/mnt/c/Program Files/nodejs/npm: line 3: $‹ \r ›: command not found
/mnt/c/Program Files/nodejs/npm: line 5: $‹ \r ›: command not found
/mnt/c/Program Files/nodejs/npm: line 6: syntax error near unexpected token $'in\r'
/mnt/c/Program Files/nodejs/npm: line 6: case uname` in

You need to run:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Before the npm install

For your information ^^

At the end of the npm install, I get this error message:

29569 error code ELIFECYCLE
29570 error errno 1
29571 error gladys-server@ postinstall: `node ./cli/install_service_dependencies.js`
29571 error Exit status 1
29572 error Failed at the gladys-server@ postinstall script.
29572 error This is probably not a problem with npm. There is likely additional logging output above.
29573 verbose exit [ 1, true ]

In the log:

9553 info lifecycle gladys-server@~install: gladys-server@
29554 silly postinstall gladys-server@
29555 info lifecycle gladys-server@~postinstall: gladys-server@
29556 verbose lifecycle gladys-server@~postinstall: unsafe-perm in lifecycle true
29557 verbose lifecycle gladys-server@~postinstall: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/
>29558 verbose lifecycle gladys-server@~postinstall: CWD: /home/chouille/gladys/server
29559 silly lifecycle gladys-server@~postinstall: Args: [ '-c', 'node ./cli/install_service_dependencies.js' ]
29560 silly lifecycle gladys-server@~postinstall: Returned: code: 1  signal: null
29561 info lifecycle gladys-server@~postinstall: Failed to exec postinstall script
29562 verbose stack Error: gladys-server@ postinstall: `node ./cli/install_service_dependencies.js`
29562 verbose stack Exit status 1

Is it serious, Doc?

Then run npm start:

~/gladys/server$ npm start

> gladys-server@ start /home/chouille/gladys/server
> cross-env NODE_ENV=development nodemon index.js

[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
/home/chouille/gladys/server/node_modules/@gladysassistant/gladys-gateway-js/lib/helpers.js:1
const utf8decoder = new TextDecoder();
                    ^
ReferenceError: TextDecoder is not defined
    at Object.<anonymous> (/home/chouille/gladys/server/node_modules/@gladysassistant/gladys-gateway-js/lib/helpers.js:1:21)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/chouille/gladys/server/node_modules/@gladysassistant/gladys-gateway-js/lib/crypto.js:3:94)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
[nodemon] app crashed - waiting for file changes before starting...

While waiting to solve the server launch, I coded a simple service to get my hands on it: Freesms → Send SMS with your Free mobile subscription via the API.

However, I have no way to test it, the front end asks for a login/password that I couldn’t set up

:face_with_diagonal_mouth:

I pushed the code here: https://github.com/Chouille/Gladys

Hello @glasserre, great if you’re getting into dev, you can never have too many devs :smiley:

Which version of Node.js are you using?

node -v

You should be on Node 14 for Gladys.

If that’s not the case, install the correct version, delete your node_modules folders (both in the front and back), and then reinstall the dependencies.

Hello Pierre-Gilles.

In the meantime, I have resumed the development environment installation process by running the commands one by one (indeed, copying and pasting multiple commands from the documentation does not work well - Win10 + WSL2 - it was better one by one).

I am indeed on node.js v14.19.1.

But still errors, I will look at it in detail tonight + your advice.

If that is not the case, install the correct version, delete your node_modules folders (both in the front end and the back end), then reinstall the dependencies.

Question:
On the front end, I do have the login screen, but what is the account created?

What’s ultra weird is that it’s the Windows installation path

The front end displays the login because your backend is not running. Once your backend is running, you will have the account creation screen as in a classic installation :slight_smile:

Alors, j’ai tout repris de zéro :

  • Reset de la distrib WSL => install de la distrib Ubuntu 24.04.4LTS
  • Passage des commandes une par une.

Pas de problème au lancement du front.
Par contre, au lancement du server, j’ai ceci et le site n’est pas accessible :

chouille@PC-Chouille:~/gladys/server$ npm start

> gladys-server@ start /home/chouille/gladys/server
> cross-env NODE_ENV=development nodemon index.js

[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
2022-04-01T20:14:35+0200 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Fri Mar 25 2022 19:14:35 GMT+0100 (Central European Standard Time)
2022-04-01T20:14:35+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:14:35+0200 <debug> brain.train.js:59 (Brain.train) Training brain...
2022-04-01T20:14:35+0200 <debug> brain.train.js:61 (Brain.train) Brain trained!
Initialising OpenZWave 1.6.1051 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /usr/local/etc/openzwave
        User settings path : /home/chouille/gladys/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
        Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2022-04-01T20:14:36+0200 <info> index.js:19 (Object.start) Starting example service
2022-04-01T20:14:36+0200 <info> index.js:16 (Object.start) Starting MQTT service
2022-04-01T20:14:36+0200 <info> updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes...
2022-04-01T20:14:36+0200 <info> service.start.js:40 (Service.start) Service mqtt is not configured, so it was not started.
2022-04-01T20:14:36+0200 <info> index.js:16 (Object.start) Starting zwave service
2022-04-01T20:14:36+0200 <info> service.start.js:40 (Service.start) Service zwave is not configured, so it was not started.
2022-04-01T20:14:36+0200 <info> index.js:14 (Object.start) Starting Xiaomi service
2022-04-01T20:14:36+0200 <info> index.js:14 (Object.start) starting GoogleActions service
2022-04-01T20:14:36+0200 <log> index.js:16 (Object.start) Starting Zigbee2mqtt service
2022-04-01T20:14:36+0200 <warn> service.start.js:44 (Service.start) Unable to start service zigbee2mqtt PlatformNotCompatible [Error]: SYSTEM_NOT_RUNNING_DOCKER
    at Zigbee2mqttManager.init (/home/chouille/gladys/server/services/zigbee2mqtt/lib/init.js:15:11)
    at async Object.start (/home/chouille/gladys/server/services/zigbee2mqtt/index.js:17:5)
    at async Service.start (/home/chouille/gladys/server/lib/service/service.start.js:33:7)
2022-04-01T20:14:36+0200 <info> index.js:18 (Object.start) Starting TP-Link service
2022-04-01T20:14:36+0200 <info> index.js:17 (Object.start) Starting eWeLink service
2022-04-01T20:14:36+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:14:36+0200 <info> service.start.js:40 (Service.start) Service ewelink is not configured, so it was not started.
2022-04-01T20:14:36+0200 <info> index.js:15 (Object.start) Starting Bluetooth service
2022-04-01T20:14:36+0200 <debug> bluetooth.start.js:14 (BluetoothManager.start) Bluetooth: Listening Bluetooth events
2022-04-01T20:14:37+0200 <error> index.js:15 (process.<anonymous>) unhandledRejection catched: Promise {
  <rejected> Error: EAFNOSUPPORT, Address family not supported by protocol
      at new Hci (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:74:18)
      at new NobleBindings (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:25:15)
      at Object.<anonymous> (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:546:18)
      at Module._compile (internal/modules/cjs/loader.js:1085:14)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
      at Module.load (internal/modules/cjs/loader.js:950:32)
      at Function.Module._load (internal/modules/cjs/loader.js:790:12)
      at Module.require (internal/modules/cjs/loader.js:974:19)
      at require (internal/modules/cjs/helpers.js:101:18)
      at module.exports (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/resolve-bindings.js:13:12)
      at Object.<anonymous> (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/index.js:2:49)
      at Module._compile (internal/modules/cjs/loader.js:1085:14)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
      at Module.load (internal/modules/cjs/loader.js:950:32)
      at Function.Module._load (internal/modules/cjs/loader.js:790:12)
      at Module.require (internal/modules/cjs/loader.js:974:19)
      at require (internal/modules/cjs/helpers.js:101:18)
      at BluetoothManager.start (/home/chouille/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js:16:20)
      at Object.start (/home/chouille/gladys/server/services/bluetooth/index.js:16:22)
      at Service.start (/home/chouille/gladys/server/lib/service/service.start.js:33:21) {
    errno: 97,
    code: 'EAFNOSUPPORT',
    syscall: 'socket'
  }
}
2022-04-01T20:14:37+0200 <error> index.js:16 (process.<anonymous>) Error: EAFNOSUPPORT, Address family not supported by protocol
    at new Hci (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:74:18)
    at new NobleBindings (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:25:15)
    at Object.<anonymous> (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:546:18)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at module.exports (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/lib/resolve-bindings.js:13:12)
    at Object.<anonymous> (/home/chouille/gladys/server/services/bluetooth/node_modules/@abandonware/noble/index.js:2:49)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at BluetoothManager.start (/home/chouille/gladys/server/services/bluetooth/lib/commands/bluetooth.start.js:16:20)
    at Object.start (/home/chouille/gladys/server/services/bluetooth/index.js:16:22)
    at Service.start (/home/chouille/gladys/server/lib/service/service.start.js:33:21) {
  errno: 97,
  code: 'EAFNOSUPPORT',
  syscall: 'socket'
}
2022-04-01T20:14:37+0200 <info> index.js:15 (Object.start) Starting Tasmota service
2022-04-01T20:14:37+0200 <info> index.js:64 (Object.start) Starting CalDAV service
2022-04-01T20:14:37+0200 <info> index.js:20 (Object.start) Starting Open Weather service
2022-04-01T20:14:37+0200 <info> service.start.js:40 (Service.start) Service openweather is not configured, so it was not started.
2022-04-01T20:14:37+0200 <info> index.js:13 (Object.start) Starting usb service
2022-04-01T20:14:37+0200 <info> index.js:19 (Object.start) Starting Telegram service
2022-04-01T20:14:37+0200 <info> service.start.js:40 (Service.start) Service telegram is not configured, so it was not started.
2022-04-01T20:14:37+0200 <info> index.js:16 (Object.start) Starting RTSP service
2022-04-01T20:14:37+0200 <info> index.js:18 (Object.start) Starting Philips Hue service
2022-04-01T20:14:37+0200 <debug> scene.init.js:12 (SceneManager.init) Scene.init
2022-04-01T20:14:37+0200 <debug> device.init.js:34 (DeviceManager.init) Device : init : Found 0 devices
2022-04-01T20:14:37+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:14:37+0200 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval hourly
2022-04-01T20:14:37+0200 <debug> device.calculateAggregate.js:50 (DeviceManager.calculateAggregate) Aggregates device feature state policy = 180 days
2022-04-01T20:14:38+0200 <debug> scheduler.init.js:9 (Scheduler.init) Scheduler.init
2022-04-01T20:14:38+0200 <info> index.js:63 (Server.<anonymous>) Server listening on port 1443
2022-04-01T20:14:50+0200 <warn> device.calculateAggregate.js:95 (Socket.<anonymous>) device.calculateAggregate stderr: DatabaseError [SequelizeDatabaseError]: SQLITE_PROTOCOL: locking protocol
    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
  parent: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  original: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  sql: 'PRAGMA journal_mode=WAL;',
  parameters: undefined
}

2022-04-01T20:14:50+0200 <warn> device.calculateAggregate.js:101 (ChildProcess.<anonymous>) device.calculateAggregate: Exiting child process with code 1
2022-04-01T20:14:50+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:14:50+0200 <error> device.onHourlyDeviceAggregateEvent.js:22 (DeviceManager.onHourlyDeviceAggregateEvent) Error: DatabaseError [SequelizeDatabaseError]: SQLITE_PROTOCOL: locking protocol
    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
  parent: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  original: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  sql: 'PRAGMA journal_mode=WAL;',
  parameters: undefined
}

    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
    at ChildProcess.<anonymous> (/home/chouille/gladys/server/lib/device/device.calculateAggregate.js:102:23)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1058:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:400:28)
    at Pipe.<anonymous> (net.js:686:12)
From previous event:
    at DeviceManager.calculateAggregate (/home/chouille/gladys/server/lib/device/device.calculateAggregate.js:76:19)
    at async /home/chouille/gladys/server/lib/device/device.onHourlyDeviceAggregateEvent.js:11:5
    at async /home/chouille/gladys/server/lib/job/job.wrapper.js:17:7
    at async DeviceManager.onHourlyDeviceAggregateEvent (/home/chouille/gladys/server/lib/device/device.onHourlyDeviceAggregateEvent.js:20:5)
    at async EventEmitter.<anonymous> (/home/chouille/gladys/server/utils/functionsWrapper.js:13:7)
2022-04-01T20:14:50+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:14:50+0200 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval daily
2022-04-01T20:14:50+0200 <debug> device.calculateAggregate.js:50 (DeviceManager.calculateAggregate) Aggregates device feature state policy = 365 days
2022-04-01T20:15:00+0200 <info> scene.checkCalendarTriggers.js:24 (SceneManager.checkCalendarTriggers) Checking calendar triggers at Fri, 01 Apr 2022 18:15:00 GMT
2022-04-01T20:15:03+0200 <warn> device.calculateAggregate.js:95 (Socket.<anonymous>) device.calculateAggregate stderr: DatabaseError [SequelizeDatabaseError]: SQLITE_PROTOCOL: locking protocol
    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
  parent: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  original: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  sql: 'PRAGMA journal_mode=WAL;',
  parameters: undefined
}

2022-04-01T20:15:03+0200 <warn> device.calculateAggregate.js:101 (ChildProcess.<anonymous>) device.calculateAggregate: Exiting child process with code 1
2022-04-01T20:15:03+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:15:03+0200 <error> device.onHourlyDeviceAggregateEvent.js:27 (DeviceManager.onHourlyDeviceAggregateEvent) Error: DatabaseError [SequelizeDatabaseError]: SQLITE_PROTOCOL: locking protocol
    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
  parent: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  original: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  sql: 'PRAGMA journal_mode=WAL;',
  parameters: undefined
}

    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
    at ChildProcess.<anonymous> (/home/chouille/gladys/server/lib/device/device.calculateAggregate.js:102:23)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1058:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:400:28)
    at Pipe.<anonymous> (net.js:686:12)
From previous event:
    at DeviceManager.calculateAggregate (/home/chouille/gladys/server/lib/device/device.calculateAggregate.js:76:19)
    at async /home/chouille/gladys/server/lib/device/device.onHourlyDeviceAggregateEvent.js:14:5
    at async /home/chouille/gladys/server/lib/job/job.wrapper.js:17:7
    at async DeviceManager.onHourlyDeviceAggregateEvent (/home/chouille/gladys/server/lib/device/device.onHourlyDeviceAggregateEvent.js:25:5)
    at async EventEmitter.<anonymous> (/home/chouille/gladys/server/utils/functionsWrapper.js:13:7)
2022-04-01T20:15:03+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:15:03+0200 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval monthly
2022-04-01T20:15:03+0200 <debug> device.calculateAggregate.js:50 (DeviceManager.calculateAggregate) Aggregates device feature state policy = 1825 days
2022-04-01T20:15:16+0200 <warn> device.calculateAggregate.js:95 (Socket.<anonymous>) device.calculateAggregate stderr: DatabaseError [SequelizeDatabaseError]: SQLITE_PROTOCOL: locking protocol
    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
  parent: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  original: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  sql: 'PRAGMA journal_mode=WAL;',
  parameters: undefined
}

2022-04-01T20:15:16+0200 <warn> device.calculateAggregate.js:101 (ChildProcess.<anonymous>) device.calculateAggregate: Exiting child process with code 1
2022-04-01T20:15:16+0200 <debug> gateway.forwardWebsockets.js:14 (Gateway.forwardWebsockets) Gateway: not connected. Prevent forwarding event.
2022-04-01T20:15:16+0200 <error> device.onHourlyDeviceAggregateEvent.js:32 (DeviceManager.onHourlyDeviceAggregateEvent) Error: DatabaseError [SequelizeDatabaseError]: SQLITE_PROTOCOL: locking protocol
    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
  parent: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  original: [Error: SQLITE_PROTOCOL: locking protocol] {
    errno: 15,
    code: 'SQLITE_PROTOCOL',
    sql: 'PRAGMA journal_mode=WAL;'
  },
  sql: 'PRAGMA journal_mode=WAL;',
  parameters: undefined
}

    at Query.formatError (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:415:16)
    at Query._handleQueryResponse (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at afterExecute (/home/chouille/gladys/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27)
    at Statement.errBack (/home/chouille/gladys/server/node_modules/sqlite3/lib/sqlite3.js:14:21) {
    at ChildProcess.<anonymous> (/home/chouille/gladys/server/lib/device/device.calculateAggregate.js:102:23)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1058:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:400:28)
    at Pipe.<anonymous> (net.js:686:12)
From previous event:
    at DeviceManager.calculateAggregate (/home/chouille/gladys/server/lib/device/device.calculateAggregate.js:76:19)
    at async /home/chouille/gladys/server/lib/device/device.onHourlyDeviceAggregateEvent.js:17:5
    at async /home/chouille/gladys/server/lib/job/job.wrapper.js:17:7
    at async DeviceManager.onHourlyDeviceAggregateEvent (/home/chouille/gladys/server/lib/device/device.onHourlyDeviceAggregateEvent.js:30:5)
    at async EventEmitter.<anonymous> (/home/chouille/gladys/server/utils/functionsWrapper.js:13:7)
2022-04-01T20:16:00+0200 <info> scene.checkCalendarTriggers.js:24 (SceneManager.checkCalendarTriggers) Checking calendar triggers at Fri, 01 Apr 2022 18:16:00 GMT

L’erreur sur le bluetooth me semble normal, pas d’accès aux périphériques de l’hôte Win10.

  • Comment désactiver le service ?

Par contre, l’erreur SQLite est peut être la source du problème ?

I just tested it on an Ubuntu machine, the front displays the login page.

Indeed, the bluetooth error is normal, there’s no need to worry, it’s a normal log.

The SQLite error is probably the source of the problem, yes.

I did some research and found posts like this:

In my opinion, it’s related to WSL…

And was the backend properly started?

Solution: see DEV environment installation problem - Development - Gladys Assistant Community