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

Postinstall 404 #186

Open
jtvberg opened this issue Sep 16, 2024 · 7 comments
Open

Postinstall 404 #186

jtvberg opened this issue Sep 16, 2024 · 7 comments

Comments

@jtvberg
Copy link

jtvberg commented Sep 16, 2024

I am getting this error on package install:

[4/4] Building fresh packages...
error ~/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: ~/node_modules/electron
Output:
HTTPError: Response code 404 (Not Found)
    at Request._onResponseBase (~/node_modules/got/dist/source/core/index.js:913:31)
    at Request._onResponse (~/node_modules/got/dist/source/core/index.js:948:24)
    at ClientRequest.<anonymous> (~/node_modules/got/dist/source/core/index.js:962:23)
    at Object.onceWrapper (node:events:635:26)
    at ClientRequest.emit (node:events:532:35)
    at origin.emit (~/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at HTTPParser.parserOnIncomingClient (node:_http_client:704:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17)
    at TLSSocket.socketOnData (node:_http_client:546:22)
    at TLSSocket.emit (node:events:520:28)

Both npm and yarn fail on the same step (I cleaned the npm cache, deleted the node_modules directory and lock file between every try of this.)
If I go into the node_modules/electron directory and yarn run postinstall or node install.js I get the same.

HTTPError: Response code 404 (Not Found)
    at Request._onResponseBase (~/node_modules/got/dist/source/core/index.js:913:31)
    at Request._onResponse (~/node_modules/got/dist/source/core/index.js:948:24)
    at ClientRequest.<anonymous> (~/node_modules/got/dist/source/core/index.js:962:23)
    at Object.onceWrapper (node:events:635:26)
    at ClientRequest.emit (node:events:532:35)
    at origin.emit (~/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at HTTPParser.parserOnIncomingClient (node:_http_client:704:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17)
    at TLSSocket.socketOnData (node:_http_client:546:22)
    at TLSSocket.emit (node:events:520:28)

At first, digging around the posted issues I thought it was a git ssh issue as this did not work:
git --no-replace-objects ls-remote ssh://[email protected]/castlabs/electron-releases.git
as
ssh -T [email protected]
was being denied
But I generated a key, and now it works and returns the list along with the specific version I am targeting:
0a7b46f1b1300e4282f6dca0ee26f7e856141ccc refs/tags/v32.1.0+wvcus

The same exact package.json install works on MacOS and Windows without issue with the same versions of Node and npm (I don't typically use yarn at all. Just tried it to see if it helped.) It also used to work previously on linux Mint (which I used for testing before I switched to Ubuntu.)
Here are my dependencies:

  "devDependencies": {
    "@electron/notarize": "^2.4.0",
    "electron": "github:castlabs/electron-releases#v32.1.0+wvcus",
    "electron-builder": "^25.0.5",
    "electron-reloader": "^1.2.3"
  },
  "dependencies": {
    "@fortawesome/fontawesome-free": "^6.6.0",
    "electron-updater": "^6.3.4"
  }

Environment:
OS: Ubuntu 24.04
Node: 22.8.0
npm: 10.8.3

I promise I have sufficiently banged my head on a wall and reviewed everything I could find under issues here or with git ssh, but I am at a loss. (To be clear, I don't see how this is a ssh problem, I just saw that in a recent issue and wanted to cover my bases.)

I would very much appreciate any insight!

@andymartinwork
Copy link

This has been happening to me as well, on a fresh install of windows 11. I'm not getting this error on an existing install.
Electron itself has no problem. It's only the castlabs version.

The problem is happening on both NPM and Yarn.

git --no-replace-objects ls-remote ssh://[email protected]/castlabs/electron-releases.git
Has no problem with running.

Unfortunately I haven't been able to fix this either.

Environment:
OS: Windows 11
Node: v20.17.0

@slosacoder
Copy link

@jtvberg have you managed to fix this??

@jtvberg
Copy link
Author

jtvberg commented Oct 4, 2024

Nope. Out of ideas

@khwaaj
Copy link
Collaborator

khwaaj commented Oct 5, 2024

For the record, I've been trying to reproduce this several times without success (including a retry now tonight). This was done on an environment mirroring the initially reported one:

Ubuntu 24.04 / x64
Node: 22.9.0
NPM: 10.8.3

So I'm inclined to believe there is some environmental factor at work here, but it is very hard to tell what. I tried in a couple of smaller projects, adding the dependencies listed, but everything is just working without issue... 🤷‍♂️

Can you tell what is being requested when you get the 404? E.g. if you run DEBUG="*" node install.js, does it show anything relevant (after making sure the cache is cleared)?

@slosacoder
Copy link

slosacoder commented Oct 5, 2024

It definetly is an environmental issue, ive build my program just fine 24/9 on a fresh install of ubuntu 24.10, but then i switched my environment to Fedora 41 and i also tried on Ubuntu 22.04, but unfortunately with no luck and the same error occuring same time

  @electron/get:index Cache miss +7ms
  @electron/get:index Downloading https://github.com/castlabs/electron-releases/releases/download/v30.0.4+wvcus/electron-v30.0.4+wvcus-linux-arm64.zip to /tmp/electron-download-fNNm1z/electron-v30.0.4+wvcus-linux-arm64.zip with options: undefined +46ms
HTTPError: Response code 404 (Not Found)
    at Request._onResponseBase (/home/ubuntu/Cider/node_modules/@electron/get/node_modules/got/dist/source/core/index.js:913:31)
    at Request._onResponse (/home/ubuntu/Cider/node_modules/@electron/get/node_modules/got/dist/source/core/index.js:948:24)
    at ClientRequest.<anonymous> (/home/ubuntu/Cider/node_modules/@electron/get/node_modules/got/dist/source/core/index.js:962:23)
    at Object.onceWrapper (node:events:628:26)
    at ClientRequest.emit (node:events:525:35)
    at ClientRequest.origin.emit (/home/ubuntu/Cider/node_modules/@electron/get/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:534:22)
    at TLSSocket.emit (node:events:513:28)

this is the output, after DEBUG="*" node install.js
Ubuntu 22.04 / arm64
Node 16.20.1
npm 8.19.4

@khwaaj
Copy link
Collaborator

khwaaj commented Oct 5, 2024

@slosacoder, in this case it is actually pretty clear what the issue is: ECS only supports linux-x64. Since there are no official CDMs for any of the ARM architectures of Linux we simply can't support them, so the 404 error is very spot on. When you say it worked on 24/9, I suppose that was on a x64 based VM or machine, or with stock Electron (which supports ARM configurations)?

I'm not sure if this is the explanation for all cases above, as the architecture seems to have been left out of the reports?

@slosacoder
Copy link

slosacoder commented Oct 5, 2024 via email

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

No branches or pull requests

4 participants