MAJ page : Développement sous Windows

Salut.
En voulant mettre en place l’environnement de DEV, j’ai eu l’erreur suivante au moment de faire le npm install (section backend) :

~/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

Il faut faire :
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Avant le npm install

Pour info ^^

A la fin du npm install, j’ai ce message d’erreur :

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 ]

Dans le 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

C’est grave Dr ?

ensuite le 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...

En attendant de résoudre le lancement de la partie server, j’ai codé un service tout simple pour me faire la main: Freesms => Envoyer des sms avec son abo Free mobile via l’API.

Par contre, je n’ai aucun moyen de tester, le front me demande un login / pass que je n’ai pas pu définir

:face_with_diagonal_mouth:

J’ai poussé le code ici : GitHub - Chouille/Gladys: A privacy-first, open-source home assistant

Bonjour @glasserre, top si tu te lance dans du dev, on est jamais assez côté dev :smiley:

Tu es sous quelle version de Node.js ?

node -v 

Tu devrais être en Node 14 pour Gladys.

Si ce n’est pas le cas, installe la bonne version, supprime tes dossiers node_modules (dans front comme dans le back), puis refais un install des dépendances.

Salut Pierre-Gilles.

Entre temps, j’ai repris le process d’installe de l’environnement de dev en passant les commandes une par une (en effet le copier-coller de plusieurs commandes depuis la doc ne passe pas bien - Win10 + WSL2- , une par une c’était mieux).

Je suis bien en node.js v14.19.1

Mais toujours des erreurs, je regarde ça en détails ce soir + ton conseil

Si ce n’est pas le cas, installe la bonne version, supprime tes dossiers node_modules (dans front comme dans le back), puis refais un install des dépendances.

Question :
Sur le front, j’ai bien la mire de login, mais quel est le compte créé ?

Ce qui est ultra bizarre c’est que c’est le chemin d’installation windows

le front t’affiche le login car ton backend ne tourne pas. Une fois que ton backend tournera, tu auras l’écran de création de compte comme sur une installation classique :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 ?

Je viens de tester sur une machine sous ubuntu, le front affiche la page de login.

Effectivement l’erreur bluetooth est normale, il n’y a pas à s’inquiéter c’est un log normal.

L’erreur SQlite est probablement la source du problème oui.

J’ai fais des recherches et je suis tombé sur ce genre de post :

A mon avis c’est lié à WSL…

Et là le backend était bien démarré ?

Solution : voir Problème installation environnement de DEV - Développement - Communauté Gladys Assistant