node-pty-prebuilt-multiarch icon indicating copy to clipboard operation
node-pty-prebuilt-multiarch copied to clipboard

Cant install Beta 21 on Mac OS (beta 20 and below does install)

Open macjeff opened this issue 1 year ago • 10 comments

Describe The Bug

I get errors when installing beta 21 both through UI and Manual. Go back to beta 20 or 19 and it works fine.

Logs

Attached. Tried once and failed and got message to chown in the first log.

Did that but same result. I don't think that has anything to do with issue

Please see attachments homebridge-config-ui-x-error(before chown ).log homebridge-config-ui-x-error(after chown).log

Config

I don't think the config file is relevant.

seems to be either a permissions or missing library issue.

I did reinstall homebridge and homebridge UI release and same issue when I try to go to beta 20.

but please note running Mac OS Catalina 10.15.7 on older mac mini but as I said it runs beta 20 fine.

Homebridge UI Version

4.62.1 beta 21

Homebridge Version

2.0.0 beta 23

Node.js Version

22.11.0

Operating System

macOS

Environment Info

Using hb-service

Raspberry Pi Model

None

macjeff avatar Nov 16 '24 17:11 macjeff

Tks @macjeff for reporting this with logs - In this version of the UI, we included an updated node-pty, and it appears to fail on your setup.

Now to look deeper

NorthernMan54 avatar Nov 16 '24 17:11 NorthernMan54

@homebridge/[email protected] postinstall
> node scripts/post-install.js
\
> Cleaning release folder...
> Moving conpty.dll...
  SKIPPED (not Windows)
> Generating compile_commands.json...
npm error code EEXIST
npm error syscall mkdir
npm error path /Users/sadmin/.npm/_cacache/content-v2/sha512/0e/0e
npm error errno EEXIST
npm error Invalid response body while trying to fetch https://registry.npmjs.org/glob: EACCES: permission denied, mkdir '/Users/sadmin/.npm/_cacache/content-v2/sha512/0e/0e'
npm error File exists: /Users/sadmin/.npm/_cacache/content-v2/sha512/0e/0e
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: /Users/sadmin/.npm/_logs/2024-11-16T17_05_31_539Z-debug-0.log
node:child_process:963
    throw err;
    ^

Error: Command failed: npx node-gyp configure -- -f compile_commands_json
npm error code EEXIST
npm error syscall mkdir
npm error path /Users/sadmin/.npm/_cacache/content-v2/sha512/0e/0e
npm error errno EEXIST
npm error Invalid response body while trying to fetch https://registry.npmjs.org/glob: EACCES: permission denied, mkdir '/Users/sadmin/.npm/_cacache/content-v2/sha512/0e/0e'
npm error File exists: /Users/sadmin/.npm/_cacache/content-v2/sha512/0e/0e
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: /Users/sadmin/.npm/_logs/2024-11-16T17_05_31_539Z-debug-0.log

NorthernMan54 avatar Nov 16 '24 17:11 NorthernMan54

USER: sadmin
DIR: /usr/local
CMD: npm install -g homebridge-config-ui-x@beta

> @homebridge/[email protected] install
> node scripts/check-prebuild.js || prebuild-install --verbose || node scripts/install.js

/
Prebuild binary missing for platform.
prebuild-install info begin Prebuild-install version 7.1.2
prebuild-install info looking for local prebuild @ prebuilds/node-pty-prebuilt-multiarch-v0.12.0-beta.1-node-v127-darwin-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/sadmin/.npm/_prebuilds/be5687-node-pty-prebuilt-multiarch-v0.12.0-beta.1-node-v127-darwin-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ /Users/sadmin/.npm/_prebuilds/be5687-node-pty-prebuilt-multiarch-v0.12.0-beta.1-node-v127-darwin-x64.tar.gz
prebuild-install info unpack resolved to /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build/Release/pty.node
prebuild-install info unpack required /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build/Release/pty.node successfully
prebuild-install info install Successfully installed prebuilt binary!
\

> @homebridge/[email protected] postinstall
> node scripts/post-install.js
\
> Cleaning release folder...
> Moving conpty.dll...
  SKIPPED (not Windows)
> Generating compile_commands.json...
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.



Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1501, in XcodeVersion
    version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1562, in GetStdoutQuiet
    raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
gyp.common.GypError: Error -6 running xcodebuild

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py",
 line 688, in script_main
    return main(sys.argv[1:])
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 680, in main
    return gyp_main(args)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 665, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py", line 109, in GenerateOutput
    AddCommandsForTarget(cwd, target, params, per_config_commands)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py", line 49, in AddCommandsForTarget
    cflags = xcode_settings.GetCflags(configuration_name)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 663, in GetCflags
    archs = self.GetActiveArchs(self.configname)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/
pylib/gyp/xcode_emulation.py", line 512, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 119, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1512, in XcodeVersion
    version = CLTVersion()  # macOS Catalina returns 11.0.0.0.1.1567737322
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1550, in CLTVersion
    return re.search(regex, output).groupdict()["version"]
AttributeError: 'NoneType' object has no attribute 'groupdict'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:317:18)
gyp ERR! stack at ChildProcess.emit (node:events:518:28)
gyp ERR! stack at ChildProcess._
handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--" "-f" "compile_commands_json"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
gyp ERR! node -v v22.11.0
gyp ERR! node-gyp -v v10.2.0
gyp ERR! not ok
node:child_process:963
    throw err;
    ^

Error: Command failed: npx node-gyp configure -- -f compile_commands_json
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.



Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1501, in XcodeVersion
    version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1562, in GetStdoutQuiet
    raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
gyp.common.GypError: Error -6 running xcodebuild

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in <module>

    sys.exit(gyp.script_main())
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 688, in script_main
    return main(sys.argv[1:])
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 680, in main
    return gyp_main(args)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 665, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py", line 109, in GenerateOutput
    AddCommandsForTarget(cwd, target, params, per_config_commands)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py", line 49, in AddCommandsForTarget
    cflags = xcode_settings.GetCflags(configuration_name)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 663, in Get
Cflags
    archs = self.GetActiveArchs(self.configname)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 512, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 119, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1512, in XcodeVersion
    version = CLTVersion()  # macOS Catalina returns 11.0.0.0.1.1567737322
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1550, in CLTVersion
    return re.search(regex, output).groupdict()["version"]
AttributeError: 'NoneType' object has no attribute 'groupdict'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/n
ode-gyp/lib/configure.js:317:18)
gyp ERR! stack at ChildProcess.emit (node:events:518:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--" "-f" "compile_commands_json"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
gyp ERR! node -v v22.11.0
gyp ERR! node-gyp -v v10.2.0
gyp ERR! not ok 

    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at checkExecSyncError (node:child_process:888:11)
    at execSync (node:child_process:960:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/scripts/post-install.js:81:1)
    at Module._compile (node:interna
l/modules/cjs/loader:1546:14)
    at Object..js (node:internal/modules/cjs/loader:1689:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14) {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(1) [Uint8Array] [ 10 ],
    Buffer(3456) [Uint8Array] [
       78, 111,  32, 114, 101,  99, 101, 105, 112, 116,  32, 102,
      111, 114,  32,  39,  99, 111, 109,  46,  97, 112, 112, 108,
      101,  46, 112, 107, 103,  46,  67,  76,  84, 111[3
9m, 111, 108,
      115,  95,  69, 120, 101,  99, 117, 116,  97,  98, 108, 101,
      115,  39,  32, 102, 111, 117, 110, 100,  32,  97, 116,  32,
       39,  47,  39,  46,  10,  78, 111,  32, 114, 101,  99, 101,
      105, 112, 116,  32, 102, 111, 114,  32,  39,  99, 111, 109,
       46,  97, 112, 112, 108, 101,  46, 112, 107, 103,  46,  68,
      101, 118, 101, [3
3m108,
      ... 3356 more items
    ]
  ],
  pid: 3244,
  stdout: Buffer(1) [Uint8Array] [ 10 ],
  stderr: Buffer(3456) [Uint8Array] [
     78, 111,  32, 114, 101,  99, 101, 105, 112, 116,  32, 102,
    111, 114,  32,  39,  99, 111, 109,  46,  97, 112, 112, 108,
    101,  46, 112, 107, 103,  46,  67,  76,  84, 111, 111, 108,
    115,  95,  69, 120, 101,  99, 117, 116,  97,  98, 108, 101,
    115,  39,  32, 102, 111, 117, 110, 10
0,  32,  97, 116,  32,
     39,  47,  39,  46,  10,  78, 111,  32, 114, 101,  99, 101,
    105, 112, 116,  32, 102, 111, 114,  32,  39,  99, 111, 109,
     46,  97, 112, 112, 108, 101,  46, 112, 107, 103,  46,  68,
    101, 118, 101, 108,
    ... 3356 more items
  ]
}

Node.js v22.11.0
\
|
/
-
\
|
/
-
\
|
/
-
\
|
npm error code 1
|npm error path /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
|
npm error command failed
|
npm error command sh -c node scripts/post-install.js
|
npm error A complete log of this run can be found in: /Users/sadmin/.npm/_logs/2024-11-16T17_11_11_082Z-debug-0.log
|

Cleaning up npm cache, please wait...
npm cache cleared, please try updating homebridge-config-ui-x again.


Error: Operation failed with code 1.

You can download this log file for future reference.

See https://github.com/homebridge/homebridge-config-ui-x/wiki/Troubleshooting for help.

NorthernMan54 avatar Nov 16 '24 21:11 NorthernMan54

Updated just not to 4.63.0 release and it worked.

Went to 5.0 alpha and had same issue

Going away on nov 22nd for a week so probably will leave on release unless you post here that you want me to test another alpha/beta. I don't mind testing until the 21rst. I just don't want to install if the next alpha/beta build does not contain and potential fix.

THANKS!!

new logs attached 5.0 alpha 1 logs.txt

macjeff avatar Nov 17 '24 15:11 macjeff

Accidentally closed (SORRY). See past post.

macjeff avatar Nov 17 '24 15:11 macjeff

This should now be resolved with the latest beta release - v5.0.0-beta.2

NorthernMan54 avatar Nov 18 '24 17:11 NorthernMan54

it installed fine!!! Now is it safe to leave running when I leave on vacation or should I roll back?

macjeff avatar Nov 18 '24 18:11 macjeff

It should be fine, as the only change is to node-pty, which is used to drive the pop windows during installs.

NorthernMan54 avatar Nov 18 '24 21:11 NorthernMan54

Thanks!!! I was going to say have a happy thanksgiving but see your are in Canada and you already had yours I think.

If you could PM me. A smarthome vendor would like to pay someone to build in Homebridge to their device. It uses Python running on FreeBSD 14.

macjeff avatar Nov 18 '24 21:11 macjeff

@macjeff - Discord ?

NorthernMan54 avatar Nov 18 '24 21:11 NorthernMan54