Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyper: 2.1.2 -> 3.1.0-canary.4 #91153

Open
wants to merge 1 commit into
base: master
from
Open

Conversation

@pradyuman
Copy link
Member

pradyuman commented Jun 20, 2020

Motivation for this change

Upgrade to the latest Hyper.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@timstott
Copy link
Contributor

timstott commented Jun 24, 2020

I'm unable to start hyper with nixpkgs-review:

$ nixpkgs-review pr 91153
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/91153/head:refs/nixpkgs-review/1
$ git worktree add /home/timstott/.cache/nixpkgs-review/pr-91153-3/nixpkgs d8d19f249793966d1cce391d54203cc717764e63
Preparing worktree (detached HEAD d8d19f24979)
Updating files: 100% (21962/21962), done.
HEAD is now at d8d19f24979 Merge pull request #91159 from Anton-Latukha/upd-mp4v2-4.1.3
$ git merge --no-commit e9a6ea1530216f43e4ec7dd2a2384e8c3529998f
Automatic merge went well; stopped before committing as requested
$ nix build --no-link --keep-going --option build-use-sandbox relaxed -f /home/timstott/.cache/nixpkgs-review/pr-91153-3/build.nix
https://github.com/NixOS/nixpkgs/pull/91153
1 package built:
hyper

$ nix-shell /home/timstott/.cache/nixpkgs-review/pr-91153-3/shell.nix

[nix-shell:~/.cache/nixpkgs-review/pr-91153-3]$ hyper
A JavaScript error occurred in the main process
Uncaught Exception:
Error: `node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `readme.md` to more info.
    at createNodePtyError (/nix/store/0ph3d5hrzbxd5vfl9prsld6pnv0ya5za-hyper-3.0.2/opt/Hyper/resources/app.asar/session.js:11:3)
    at Object.<anonymous> (/nix/store/0ph3d5hrzbxd5vfl9prsld6pnv0ya5za-hyper-3.0.2/opt/Hyper/resources/app.asar/session.js:19:9)
    at Object.<anonymous> (/nix/store/0ph3d5hrzbxd5vfl9prsld6pnv0ya5za-hyper-3.0.2/opt/Hyper/resources/app.asar/session.js:191:3)
    at Module._compile (internal/modules/cjs/loader.js:711:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Function._load (/nix/store/0ph3d5hrzbxd5vfl9prsld6pnv0ya5za-hyper-3.0.2/opt/Hyper/resources/app.asar/plugins.js:77:29)
    at Module.require (internal/modules/cjs/loader.js:658:17)

System details

$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.3.6, channels(timstott): "home-manager-20.03, nixpkgs-unstable-20.09pre230446.a84cbb60f02", channels(root): "nixos-20.09pre231646.4cdd64d9078, nixos-hardware", nixpkgs: /nix/var/nix/profile
s/per-user/root/channels/nixos
@pradyuman
Copy link
Member Author

pradyuman commented Jun 24, 2020

@timstott I'm trying to debug this but it's working on both my NixOS and macOS environments. Are you able to run the current version of Hyper?

@pradyuman pradyuman force-pushed the pradyuman:hyper-3.0.2 branch from e9a6ea1 to 29c837a Jun 24, 2020
@pradyuman pradyuman force-pushed the pradyuman:hyper-3.0.2 branch from 29c837a to 50a5e80 Jun 24, 2020
@pradyuman pradyuman changed the title hyper: 2.1.2 -> 3.0.2 hyper: 2.1.2 -> 3.1.0-canary.4 Jun 24, 2020
@timstott
Copy link
Contributor

timstott commented Jun 24, 2020

@pradyuman I'm able to run the current version of Hyper on NixOS, but not macOS (it failed on a compilation step - note that darwin is not in the list of supported platforms for this package).

I am happy to provide additional debug data on request as I am not familiar with this package.

@pradyuman
Copy link
Member Author

pradyuman commented Jun 24, 2020

@timstott Just realized that I actually have Hyper installed on macOS so that what I was calling on accident there (super dumb by me, I know). I didn't look into the derivation itself too much and glossed over the fact that it's not being built from source.

I just cleaned up the file a bit and decided to upgrade to 3.1.0-canary.4 which is stable according to vercel/hyper#4194. This brings with it a lot of upgrades including electron 6. Mind trying again to see if this fixes things?

src = fetchurl {
url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
sha256 = "1n4qlbk7q9zkhhg72mdks95g15xgyrc6ixf882ghvrqghd4zxplm";
url = "https://github.com/vercel/hyper/releases/download/v${version}/hyper_${version}_amd64.deb";

This comment has been minimized.

Copy link
@timstott

timstott Jun 24, 2020

Contributor

📝 Note to self: Vercel (formerly ZEIT)

@timstott
Copy link
Contributor

timstott commented Jun 24, 2020

@pradyuman I'm still unable to start hyper, I have more output this time, but the error appears to be the same.

Expand output

[nix-shell:~/.cache/nixpkgs-review/pr-91153-6]$ hyper
Error: Cannot find module 'native-reg'
Require stack:
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/utils/cli-install.js
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/index.js
-
    at Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/browser_init.js:7646:16)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function._load (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/plugins.js:82:37)
    at Module.require (internal/modules/cjs/loader.js:775:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/utils/cli-install.js:13:20)
    at Module._compile (internal/modules/cjs/loader.js:880:30) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/utils/cli-install.js',
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/index.js',
    undefined
  ]
}
(electron) 'getName function' is deprecated and will be removed. Please use 'name property' instead.
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/node_modules/node-pty/lib/index.js
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/session.js
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/ui/window.js
- /nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/index.js
-
    at Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/browser_init.js:7646:16)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function._load (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/plugins.js:82:37)
    at Module.require (internal/modules/cjs/loader.js:775:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js:30:15)
    at Module._compile (internal/modules/cjs/loader.js:880:30) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js',
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/node_modules/node-pty/lib/index.js',
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/session.js',
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/ui/window.js',
    '/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/index.js',
    undefined
  ]
}
A JavaScript error occurred in the main process
Uncaught Exception:
Error: `node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `readme.md` to more info.
    at createNodePtyError (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/session.js:19:34)
    at Object.<anonymous> (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/session.js:25:11)
    at Module._compile (internal/modules/cjs/loader.js:880:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
    at Module.load (internal/modules/cjs/loader.js:735:32)
    at Module._load (internal/modules/cjs/loader.js:648:12)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Function._load (/nix/store/ch1b5ygxrrc749j07a9rrf5rwvngbhp4-hyper-3.1.0-canary.4/opt/Hyper/resources/app.asar/plugins.js:82:37)
    at Module.require (internal/modules/cjs/loader.js:775:19)
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
^C

@pradyuman
Copy link
Member Author

pradyuman commented Jun 24, 2020

@timstott Ah, that's unfortunate. It looks like the node-pty error is a known issue: vercel/hyper#3321. The native-reg error is apparently harmless: vercel/hyper#4320

I'm unable to reproduce this issue on my machine but I'll do some research to see if there's any additional information I can find. In the meantime, I'll link this PR in the GitHub issue and see if the hyper team has an idea of how to debug this.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.