Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/app/null''

Hi,

I am since 2 days trying to get zigbee2mqtt running. I used a sonoff zigbee 3.0 usb dongle plus (flashed coordinator 20230507). My config file looks like this:

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.178.128
  user: user
  password: passwort
serial:
  serial: /dev/ttyUSB0
zigbee_herdsman_debug: true

The logfile spits out the following after trying to start zigbee2mqtt:

[11:29:33] INFO: Preparing to start...
[11:29:35] INFO: Socat not enabled
[11:29:36] INFO: Zigbee Herdsman debug logging enabled
[11:29:40] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2023-08-16 11:29:55: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2023-08-16 11:29:55: Logging to console and directory: '/config/zigbee2mqtt/log/2023-08-16.11-29-54' filename: log.txt
Zigbee2MQTT:debug 2023-08-16 11:29:55: Removing old log directory '/config/zigbee2mqtt/log/2023-08-16.11-23-56'
Zigbee2MQTT:info  2023-08-16 11:29:55: Starting Zigbee2MQTT version 1.32.2 (commit #unknown)
Zigbee2MQTT:info  2023-08-16 11:29:55: Starting zigbee-herdsman (0.17.2)
Zigbee2MQTT:debug 2023-08-16 11:29:55: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"auto","path":"null"}}'
2023-08-16T09:29:56.289Z zigbee-herdsman:adapter:zStack:znp:error Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/app/null''
2023-08-16T09:29:56.349Z zigbee-herdsman:adapter Failed to validate path: 'Error: spawn udevadm ENOENT'
2023-08-16T09:29:56.354Z zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11]},"serialPort":{"path":"null","adapter":"auto"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","adapter":{"disableLED":false,"concurrent":null,"delay":null}}'
2023-08-16T09:29:56.358Z zigbee-herdsman:adapter:zStack:znp:log Opening SerialPort with {"path":"null","baudRate":115200,"rtscts":false,"autoOpen":false}
Zigbee2MQTT:error 2023-08-16 11:29:56: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-08-16 11:29:56: Failed to start zigbee
Zigbee2MQTT:error 2023-08-16 11:29:56: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-08-16 11:29:56: Exiting...
Zigbee2MQTT:error 2023-08-16 11:29:56: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open null'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
    at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:75:22)
    at /app/node_modules/@serialport/stream/dist/index.js:111:18

Slowly I am despairing…

I hope someone can help me so I finally get the problem solved!

Thanks for your help!

You should put the actual path to the USB device, You can find this if you go into Settings → System → Hardware → All Hardware
Scroll down the list till you see your Zigbee stick, should look like this:
/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2444379-if00

This is the actual path, the one you have ‘/dev/ttyUSB0’ can change at startup.
Put in the actual path at serial: and it should work.

Changed it to:

  serial: >-
    /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_48265c3f11d9eb11979b0a15b9da5f8b-if00-port0

Then i got this log:

[12:17:10] INFO: Preparing to start...
[12:17:11] INFO: Socat not enabled
[12:17:12] INFO: Zigbee Herdsman debug logging enabled
[12:17:16] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2023-08-16 12:17:31: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2023-08-16 12:17:31: Logging to console and directory: '/config/zigbee2mqtt/log/2023-08-16.12-17-31' filename: log.txt
Zigbee2MQTT:debug 2023-08-16 12:17:31: Removing old log directory '/config/zigbee2mqtt/log/2023-08-16.12-09-37'
Zigbee2MQTT:info  2023-08-16 12:17:31: Starting Zigbee2MQTT version 1.32.2 (commit #unknown)
Zigbee2MQTT:info  2023-08-16 12:17:31: Starting zigbee-herdsman (0.17.2)
Zigbee2MQTT:debug 2023-08-16 12:17:31: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"auto","path":"null"}}'
2023-08-16T10:17:32.656Z zigbee-herdsman:adapter:zStack:znp:error Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/app/null''
2023-08-16T10:17:32.722Z zigbee-herdsman:adapter Failed to validate path: 'Error: spawn udevadm ENOENT'
2023-08-16T10:17:32.729Z zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11]},"serialPort":{"path":"null","adapter":"auto"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","adapter":{"disableLED":false,"concurrent":null,"delay":null}}'
2023-08-16T10:17:32.735Z zigbee-herdsman:adapter:zStack:znp:log Opening SerialPort with {"path":"null","baudRate":115200,"rtscts":false,"autoOpen":false}
Zigbee2MQTT:error 2023-08-16 12:17:32: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-08-16 12:17:32: Failed to start zigbee
Zigbee2MQTT:error 2023-08-16 12:17:32: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-08-16 12:17:32: Exiting...
Zigbee2MQTT:error 2023-08-16 12:17:32: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open null'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
    at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:75:22)
    at /app/node_modules/@serialport/stream/dist/index.js:111:18
serial: >-
    /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_48265c3f11d9eb11979b0a15b9da5f8b-if00-port0

Just saw it, but in my config it says port
So i think it should be:

serial:
  port >-
     /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_48265c3f11d9eb11979b0a15b9da5f8b-if00-port0