giuseppecastaldo / ha-addons

Home Assistant Whatsapp Add-on
Apache License 2.0
49 stars 18 forks source link

Start up Error #2

Closed ekkesa closed 1 year ago

ekkesa commented 1 year ago

@giuseppecastaldo - Had to re-install the add-on. Now it keeps failing with an auth error in the logs and not showing QR code.

Is the auth persistent somewhere in a config file?

I removed the whatsapp: entry from configuration.yaml, removed the addon, and restarted. The followed the installation instructions again. Received the same error after install.

This is the log entries:

[2022-11-21T21:44:46.051] [INFO] default - Whatsapp Addon started.
/whatsapp.js:51
        const { state, saveState } = useSingleFileAuthState(this.#path)
                                     ^
TypeError: useSingleFileAuthState is not a function
    at WhatsappClient.connect (/whatsapp.js:51:38)
    at new WhatsappClient (/whatsapp.js:45:14)
    at init (/index.js:97:18)
    at /index.js:111:5
    at Array.forEach (<anonymous>)
    at /index.js:110:19
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Node.js v18.9.1
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
giuseppecastaldo commented 1 year ago

@giuseppecastaldo - Had to re-install the add-on. Now it keeps failing with an auth error in the logs and not showing QR code.

Is the auth persistent somewhere in a config file?

I removed the whatsapp: entry from configuration.yaml, removed the addon, and restarted. The followed the installation instructions again. Received the same error after install.

This is the log entries:

[2022-11-21T21:44:46.051] [INFO] default - Whatsapp Addon started.
/whatsapp.js:51
        const { state, saveState } = useSingleFileAuthState(this.#path)
                                     ^
TypeError: useSingleFileAuthState is not a function
    at WhatsappClient.connect (/whatsapp.js:51:38)
    at new WhatsappClient (/whatsapp.js:45:14)
    at init (/index.js:97:18)
    at /index.js:111:5
    at Array.forEach (<anonymous>)
    at /index.js:110:19
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Node.js v18.9.1
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I'm sorry for this, i just solved the problem, rebuild the addon and try again.

ekkesa commented 1 year ago

Thank you! Worked immediately after the rebuild.

Much Appreciated!