openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

Log viewer (Frontail) not installed in Openhab 3.3.0 #1743

Closed MrRSK closed 1 year ago

MrRSK commented 1 year ago

Issue information:

Hi,

after a new installation from the Raspberry Pi Imager (openhab 3.3.0 v1.7.4b - I guess) the Log viewer is not running. I change the debug mode to maximum and got the following error in the first-boot.log (see line 154 – 190)

Debug information:

first-boot.log

++ npm list -g
++ head -n 1
+ frontailBase=/usr/lib/node_modules/frontail
+ id -u frontail
+ cond_redirect useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail \033[39;49;00m'

$ useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail 
+ useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail
+ return 0
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-26_14:38:19_CET [openHABian] Installing openHAB Log Viewer (frontail)... '
2022-11-26_14:38:19_CET [openHABian] Installing openHAB Log Viewer (frontail)... + [[ -d /usr/lib/node_modules/frontail ]]
+ cond_redirect frontail_download /opt
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ frontail_download /opt \033[39;49;00m'

$ frontail_download /opt 
+ frontail_download /opt
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-26_14:38:19_CET [openHABian] Downloading frontail... '
2022-11-26_14:38:19_CET [openHABian] Downloading frontail... + [[ -d /opt/frontail ]]
+ cond_echo '\nUpdate... '
+ [[ -z '' ]]
+ echo -e '\033[33;01m\nUpdate... \033[39;49;00m'

Update... 
+ cond_redirect update_git_repo /opt/frontail master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ update_git_repo /opt/frontail master \033[39;49;00m'

$ update_git_repo /opt/frontail master 
+ update_git_repo /opt/frontail master
+ local branch
+ local path
+ branch=master
+ path=/opt/frontail
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
++ basename /opt/frontail
+ echo -n '2022-11-26_14:38:19_CET [openHABian] Updating frontail, master branch from git... '
2022-11-26_14:38:19_CET [openHABian] Updating frontail, master branch from git... + cond_redirect git -C /opt/frontail fetch origin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail fetch origin \033[39;49;00m'

$ git -C /opt/frontail fetch origin 
+ git -C /opt/frontail fetch origin
+ return 0
+ cond_redirect git -C /opt/frontail fetch --tags --force --prune
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail fetch --tags --force --prune \033[39;49;00m'

$ git -C /opt/frontail fetch --tags --force --prune 
+ git -C /opt/frontail fetch --tags --force --prune
+ return 0
+ cond_redirect git -C /opt/frontail reset --hard origin/master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail reset --hard origin/master \033[39;49;00m'

$ git -C /opt/frontail reset --hard origin/master 
+ git -C /opt/frontail reset --hard origin/master
HEAD is now at 621cda8 Update README.md
+ return 0
+ cond_redirect git -C /opt/frontail clean --force -x -d
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail clean --force -x -d \033[39;49;00m'

$ git -C /opt/frontail clean --force -x -d 
+ git -C /opt/frontail clean --force -x -d
+ return 0
+ cond_redirect git -C /opt/frontail checkout master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail checkout master \033[39;49;00m'

$ git -C /opt/frontail checkout master 
+ git -C /opt/frontail checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
+ return 0
+ echo OK
OK
+ return 0
+ echo OK
OK
+ return 0
+ cd /opt/frontail
+ cond_redirect npm install --force -g
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm install --force -g \033[39;49;00m'

$ npm install --force -g 
+ npm install --force -g
npm WARN using --force Recommended protections disabled.

added 1 package, and audited 3 packages in 835ms

found 0 vulnerabilities
+ return 0
+ cond_redirect npm audit fix --force
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm audit fix --force \033[39;49;00m'

$ npm audit fix --force 
+ npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN audit Updating jsdom to 20.0.3, which is a SemVer major change.
npm WARN audit Updating mocha to 10.1.0, which is a SemVer major change.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated formidable@1.2.1: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated buster-core@0.6.4: No longer maintained

added 505 packages, and audited 506 packages in 39s

43 packages are looking for funding
  run `npm fund` for details

# npm audit report

engine.io  4.0.0 - 6.2.0
Severity: high
Uncaught exception in engine.io  - https://github.com/advisories/GHSA-r7qp-cfhv-p84w
fix available via `npm audit fix --force`
Will install socket.io@4.5.4, which is a breaking change
node_modules/engine.io
  socket.io  3.0.0-rc1 - 4.4.1
  Depends on vulnerable versions of engine.io
  node_modules/socket.io

2 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force
npm notice 
npm notice New major version of npm available! 8.19.2 -> 9.1.2
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.1.2>
npm notice Run `npm install -g npm@9.1.2` to update!
npm notice 
+ return 1
+ echo 'FAILED (install)'
FAILED (install)
+ return 1
+ custom_frontail_log add ''
+ local frontailService=/etc/systemd/system/frontail.service
+ local addLog
+ local removeLog
+ local array
+ [[ -f /etc/systemd/system/frontail.service ]]
+ whiptail --title 'Frontail not installed' --msgbox 'Frontail is not installed!\n\nCanceling operation!' 9 80
Failed to open terminal.)0






















┌──────────────────────────┤ Frontail not installed ├──────────────────────────┐│                                                                              ││ Frontail is not installed!                                                   ││                                                                              ││ Canceling operation!                                                         ││                                                                              ││                                    <Ok>                                      ││                                                                              │└──────────────────────────────────────────────────────────────────────────────┘[?25h[?0c

+ return 0
+ jsscripting_npm_install openhab_rules_tools

System information:

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

uname -m

aarch64
derzico commented 1 year ago

Same issue for me

2022-11-25_15:11:19_CET [openHABian] Installing openHAB Log Viewer (frontail)… Removing any old installations…

$ npm uninstall -g frontail

removed 1 package, and audited 1 package in 465ms

found 0 vulnerabilities

$ frontail_download /opt
2022-11-25_15:11:19_CET [openHABian] Downloading frontail…
Update…

$ update_git_repo /opt/frontail master
2022-11-25_15:11:19_CET [openHABian] Updating frontail, master branch from git…
$ git -C /opt/frontail fetch origin

$ git -C /opt/frontail fetch --tags --force --prune

$ git -C /opt/frontail reset --hard origin/master
HEAD is now at 621cda8 Update README.md

$ git -C /opt/frontail clean --force -x -d
Removing node_modules/

$ git -C /opt/frontail checkout master
Already on ‘master’
Your branch is up to date with ‘origin/master’.
OK
OK

$ npm install --force -g
npm WARN using --force Recommended protections disabled.

added 1 package, and audited 3 packages in 415ms

found 0 vulnerabilities

$ npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile
npm WARN audit Updating jsdom to 20.0.3, which is a SemVer major change.
npm WARN audit Updating mocha to 10.1.0, which is a SemVer major change.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. ([ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub](https://github.com/visionmedia/debug/issues/797))
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. ([ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub](https://github.com/visionmedia/debug/issues/797))
npm WARN deprecated formidable@1.2.1: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: [formidable/VERSION_NOTES.md at master · node-formidable/formidable · GitHub](https://bit.ly/2ZEqIau)
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See [There’s Math.random(), and then there’s Math.random() · V8](https://v8.dev/blog/math-random) for details.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
npm WARN deprecated buster-core@0.6.4: No longer maintained

added 505 packages, and audited 506 packages in 6s

43 packages are looking for funding
run npm fund for details

npm audit report
[engine.io](http://engine.io/) 4.0.0 - 6.2.0
Severity: high
Uncaught exception in [engine.io](http://engine.io/) - [Uncaught exception in engine.io · CVE-2022-41940 · GitHub Advisory Database · GitHub](https://github.com/advisories/GHSA-r7qp-cfhv-p84w)
fix available via npm audit fix --force
Will install [socket.io](http://socket.io/)@4.5.4, which is a breaking change
node_modules/engine.io
[socket.io](http://socket.io/) 3.0.0-rc1 - 4.4.1
Depends on vulnerable versions of [engine.io](http://engine.io/)
node_modules/socket.io

2 high severity vulnerabilities

To address all issues (including breaking changes), run:
npm audit fix --force
FAILED (install)

https://community.openhab.org/t/openhabian-frontail-install/141382

mstormi commented 1 year ago

I have no idea of npm, it's an ever-ongoing hassle to keep in sync.

@Larsen-Locke @florian-h05 any idea ?

florian-h05 commented 1 year ago

Maybe I have an idea what's going on, I'll check this evening.