homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
https://homebridge.io
MIT License
2.62k stars 377 forks source link

Beta Update command on Win10 OS suggests updating to @latest, not to newest beta version #1611

Closed jsiegenthaler closed 1 year ago

jsiegenthaler commented 1 year ago

Analysis

When updating a beta version on Windows10 environment, Homebridge suggests the following: To upgrade the package run open a Node.js command prompt as an Administrator and run the following commands:

hb-service stop
npm install -g homebridge@latest
hb-service start

The command as shown will install the latest Homebridge release version, not the beta version.

Expected Behavior

The suggested command should update to the newest available beta version, example:

hb-service stop
npm install -g homebridge@1.7.0-beta.6
hb-service start

Steps To Reproduce

  1. Install homebridge@1.7.0-beta.3
  2. Open homebridge in a browser
  3. Observe the update instructions: they show that beta-6 is available but the command suggests to update to @latest, instead of to beta.6

Logs

hb-service stop
npm install -g homebridge@latest
hb-service start

Configuration

Using v1.7.0-beta.3
Config not applicable

Environment

Process Supervisor

hb-service

Additional Context

No response

donavanbecker commented 1 year ago

Where are you seeing this?

jsiegenthaler commented 1 year ago

In a Chrome browser on my Win10 desktop, Homebridge is running on Win10, and Homebridge UI is installed. When an update is available for Homebridge, and the link to the update is clicked, a popup appears stating that Homebridge must be updated manually, and suggests the commands to run in the Node.js command prompt to do the update.

donavanbecker commented 1 year ago

I am meaning like a screenshot.

jsiegenthaler commented 1 year ago

Here's a screenshot showing the issue: homebridgeUpdateScreenshot

bwp91 commented 1 year ago

Hi @jsiegenthaler I have transferred this to the homebridge UI repo since this issue is with the UI and not homebridge itself.

In fact with the work I have been doing the last couple of days on the UI, this should already be fixed.

It's available to test by installing the beta version of the UI - however please remember this is a beta!

jsiegenthaler commented 1 year ago

Thanks, I'll have a look

jsiegenthaler commented 1 year ago

OK I tried npm install -g homebridge-config-ui-x@4.52.0-beta.33 But no joy.... GET failed:

C:\Users\me\Documents\GitHub\homebridge-eosstb>npm install -g homebridge-config-ui-x@4.52.0-beta.33
npm ERR! code E500
npm ERR! 500 Internal Server Error - GET https://registry.npmjs.org/@fastify%2fhelmet - KV GET failed: 401 Unauthorized
bwp91 commented 1 year ago

^ I am getting the same. I am assuming this is an intermittent issue with npm or with the @fastify/helmet package that the UI uses.

Hopefully will be fixed soon...

bwp91 commented 1 year ago

seems working now

jsiegenthaler commented 1 year ago

Yeah a reinstall of npm install -g homebridge-config-ui-x@4.51.2 worked, but trying to install homebridge-config-ui-x@4.52.0-beta.33 results in the following error:

C:\Users\me\Documents\GitHub\homebridge-eosstb>npm install -g homebridge-config-ui-x@4.52.0-beta.33
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\homebridge-config-ui-x\\node_modules\\@oznu',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\me\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\@oznu\hap-client\node_modules\axios'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\homebridge-config-ui-x\\node_modules\\@oznu\\hap-client\\node_modules\\axios'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\homebridge-config-ui-x',
npm WARN me[Error: EPERM: operation not permitted, rmdir 'C:\Users\me\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\homebridge-config-ui-x\\node_modules'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\me\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\@homebridge\node-pty-prebuilt-multiarch
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/check-prebuild.js || prebuild-install || node scripts/install.js
npm ERR! Prebuild binary missing for platform.
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.9.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@20.9.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.2 found at "C:\Users\me\AppData\Local\Programs\Python\Python311\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v20.9.0/node-v20.9.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.9.0/node-v20.9.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v20.9.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v20.9.0/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.9.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.9.0/win-x64/node.lib
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.11.33328.57) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v142
npm ERR! gyp ERR! find VS - missing any Windows SDK
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack     at C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:380:14)
npm ERR! gyp ERR! stack     at C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2015 (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:364:14)
npm ERR! gyp ERR! stack     at C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:67:12
npm ERR! gyp ERR! stack     at VisualStudioFinder.parseData (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:237:5)
npm ERR! gyp ERR! stack     at C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:143:14
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:414:7)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\me\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\@homebridge\node-pty-prebuilt-multiarch
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
NorthernMan54 commented 1 year ago

Tks for reporting this, looks like we are missing the prebuild binaries for your platform. Pls try again in about an hour.

npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/check-prebuild.js || prebuild-install || node scripts/install.js
npm ERR! Prebuild binary missing for platform.
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.9.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
jsiegenthaler commented 1 year ago

homebridge-config-ui-x@4.52.0-beta.35 installed on Win10 without error

Checking back in Homebridge, and the suggested command prompt to update to the newest beta version is now correct:, it now shows:

hb-service stop
npm install -g homebridge@1.7.0-beta.6
hb-service start
jsiegenthaler commented 1 year ago

Closing this issue as it is fixed