atom/apm

Atom package installs failing with server code 500.

pizza496 opened this issue · 10 comments

Description

When trying to use apm to install a package through the gui and through the command line

Steps to Reproduce

GUI:

  1. Open atom
  2. navigate to the install page in the settings
  3. click install on a package

Command Line:

  1. Open command line
  2. Enter in a command like apm install language-latex

Expected behavior:

Package gets installed without returning a server error.

Actual behavior:

Package is not installed, an error is returned.

npm ERR! code E500
npm ERR! 500 Internal Server Error - GET https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.atom/.apm/_logs/2022-04-24T23_13_29_939Z-debug.log

Mentioned log file:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Applications/Atom.app/Contents/Resources/app/apm/bin/node',
1 verbose cli   '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js',
1 verbose cli   '--globalconfig',
1 verbose cli   '/Users/Bennny/.atom/.apm/.apmrc',
1 verbose cli   '--userconfig',
1 verbose cli   '/Users/Bennny/.atom/.apmrc',
1 verbose cli   'install',
1 verbose cli   'https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball',
1 verbose cli   '--target=9.4.4',
1 verbose cli   '--disturl=https://atom.io/download/electron',
1 verbose cli   '--arch=x64',
1 verbose cli   '--global-style'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v12.14.1
4 verbose npm-session 19b56d1e42916c4f
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 500 https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball 71038ms attempt #3
8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball 500 Internal Server Error - GET https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 71062ms
11 verbose stack Error: 500 Internal Server Error - GET https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball
11 verbose stack     at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
11 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:94:5)
12 verbose statusCode 500
13 verbose pkgid https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball
14 verbose cwd /private/var/folders/w0/x9_sxbpj15x__8jczqp3bqvw0000gp/T/apm-install-dir-2022324-54814-1eeu8wn.ttuy
15 verbose Darwin 21.5.0
16 verbose argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/Bennny/.atom/.apm/.apmrc" "--userconfig" "/Users/Bennny/.atom/.apmrc" "install" "https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball" "--target=9.4.4" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style"
17 verbose node v12.14.1
18 verbose npm  v6.14.13
19 error code E500
20 error 500 Internal Server Error - GET https://www.atom.io/api/packages/language-latex/versions/1.2.0/tarball
21 verbose exit [ 1, true ]

Reproduces how often:

This is happening 100% of the times I've tried it.

Versions

Atom : 1.60.0
Electron: 9.4.4
Chrome : 83.0.4103.122
Node : 12.14.1

macOS: 12.4 Beta

Additional Information

Before you point to #946, yes this issue is very similar to that issue, my problem is that the issue for whatever reason isn't fixed for me yet.

I am also having the same issue.
Windows 10 fresh install of atom 1.60

issue occurs from w/in atom or through CLI apm
searching works, installing causes the error in CLI

tried several times with several packages both in GUI and in CLI

Edit: I noticed that this was been happening for me yesterday, but didn't take the time to look into it until about an hour before this post was made.

Same issue here. I did some research, and found that if you try from terminal, like: apm install jooola/markdown-to-pdf for example, then it will work. I have no idea what the problem may be tho.

(solution found by @mjmar01, at #946 issue )

--- I have the same error ---

Description
I cannot get any of the optional packages to install, either by using the Atom Package Installer, or the command line. It doesn't matter which one I try... it's always the same error.

Open atom
Click on "Install a Package" on the welcome page
Open Installer
Search for any package (in this case: atom-beautify
Click install
get error below

Open command line
Enter in a command like apm install atom-beautify

Expected behavior:

Package gets installed without returning a server error.

Actual behavior:

Package is not installed, an error is returned.

npm ERR! code E500
npm ERR! 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/computertraining/.atom/.apm/_logs/2022-04-25T03_58_50_315Z-debug.log

Contents of Log File:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Applications/Atom.app/Contents/Resources/app/apm/bin/node',
1 verbose cli '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js',
1 verbose cli '--globalconfig',
1 verbose cli '/Users/computertraining/.atom/.apm/.apmrc',
1 verbose cli '--userconfig',
1 verbose cli '/Users/computertraining/.atom/.apmrc',
1 verbose cli 'install',
1 verbose cli 'https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball',
1 verbose cli '--target=9.4.4',
1 verbose cli '--disturl=https://atom.io/download/electron',
1 verbose cli '--arch=x64',
1 verbose cli '--global-style'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v12.14.1
4 verbose npm-session b8c3a305994d148d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 500 https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball 70952ms attempt #3
8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 70977ms
11 verbose stack Error: 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
11 verbose stack at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
11 verbose stack at processTicksAndRejections (internal/process/task_queues.js:94:5)
12 verbose statusCode 500
13 verbose pkgid https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
14 verbose cwd /private/var/folders/s9/2tkfxjsj0s323w1pkm67g14w0000gq/T/apm-install-dir-2022324-11294-1whmy75.6hg2
15 verbose Darwin 20.6.0
16 verbose argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/computertraining/.atom/.apm/.apmrc" "--userconfig" "/Users/computertraining/.atom/.apmrc" "install" "https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball" "--target=9.4.4" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style"
17 verbose node v12.14.1
18 verbose npm v6.14.13
19 error code E500
20 error 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
21 verbose exit [ 1, true ]
computertraining@Wanes-iMac-2 ~ % cat atom.error
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Applications/Atom.app/Contents/Resources/app/apm/bin/node',
1 verbose cli '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js',
1 verbose cli '--globalconfig',
1 verbose cli '/Users/computertraining/.atom/.apm/.apmrc',
1 verbose cli '--userconfig',
1 verbose cli '/Users/computertraining/.atom/.apmrc',
1 verbose cli 'install',
1 verbose cli 'https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball',
1 verbose cli '--target=9.4.4',
1 verbose cli '--disturl=https://atom.io/download/electron',
1 verbose cli '--arch=x64',
1 verbose cli '--global-style'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v12.14.1
4 verbose npm-session b8c3a305994d148d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 500 https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball 70952ms attempt #3
8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 70977ms
11 verbose stack Error: 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
11 verbose stack at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
11 verbose stack at processTicksAndRejections (internal/process/task_queues.js:94:5)
12 verbose statusCode 500
13 verbose pkgid https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
14 verbose cwd /private/var/folders/s9/2tkfxjsj0s323w1pkm67g14w0000gq/T/apm-install-dir-2022324-11294-1whmy75.6hg2
15 verbose Darwin 20.6.0
16 verbose argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/computertraining/.atom/.apm/.apmrc" "--userconfig" "/Users/computertraining/.atom/.apmrc" "install" "https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball" "--target=9.4.4" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style"
17 verbose node v12.14.1
18 verbose npm v6.14.13
19 error code E500
20 error 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
21 verbose exit [ 1, true ]
computertraining@Wanes-iMac-2 ~ % clear

computertraining@Wanes-iMac-2 ~ % cat atom.error
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Applications/Atom.app/Contents/Resources/app/apm/bin/node',
1 verbose cli '/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js',
1 verbose cli '--globalconfig',
1 verbose cli '/Users/computertraining/.atom/.apm/.apmrc',
1 verbose cli '--userconfig',
1 verbose cli '/Users/computertraining/.atom/.apmrc',
1 verbose cli 'install',
1 verbose cli 'https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball',
1 verbose cli '--target=9.4.4',
1 verbose cli '--disturl=https://atom.io/download/electron',
1 verbose cli '--arch=x64',
1 verbose cli '--global-style'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v12.14.1
4 verbose npm-session b8c3a305994d148d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 500 https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball 70952ms attempt #3
8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 70977ms
11 verbose stack Error: 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
11 verbose stack at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
11 verbose stack at processTicksAndRejections (internal/process/task_queues.js:94:5)
12 verbose statusCode 500
13 verbose pkgid https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
14 verbose cwd /private/var/folders/s9/2tkfxjsj0s323w1pkm67g14w0000gq/T/apm-install-dir-2022324-11294-1whmy75.6hg2
15 verbose Darwin 20.6.0
16 verbose argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/computertraining/.atom/.apm/.apmrc" "--userconfig" "/Users/computertraining/.atom/.apmrc" "install" "https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball" "--target=9.4.4" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style"
17 verbose node v12.14.1
18 verbose npm v6.14.13
19 error code E500
20 error 500 Internal Server Error - GET https://www.atom.io/api/packages/atom-beautify/versions/0.33.4/tarball
21 verbose exit [ 1, true ]

Versions
Atom : 1.60.0 x64
Electron: 9.4.4
Chrome : 83.0.4103.122
Node : 12.14.1

Update check failed. The server sent an invalid response (as per Atom's check utility)

macOS Big Sur
Version 11.6.5

Additional Information:
Packages that I have tried .....
atom-ternjs
autoclose-html-plus
emmet
CSSLint
pigments
language-ejs
atom-beautify

The issue is an internal error on atoms side. So default installs with apm or inside atom won't work as they rely on that API.

Workaround is installing packages directly from their GitHubs. So for a package like https://atom.io/packages/language-rust:
apm install language-rust WONT WORK
apm install zargony/atom-language-rust should work
Format is apm install <GitHubUser>/<PackageRepo>. Note that the repo might be named differently than the package itself

Do we know if Atom are looking into this? I am also getting all package installs failing and my backups are failing between computers (work + home) and I cannot sync packages. It's rather annoying and can be a potential mess.

ladar commented

See issue #946 but I originally closed it because it seemed to be fixed. Can you check again and post something there?

Yesterday the problem was still there -- this morning it was gone !

I checked out the server issue that I originally had "npm ERR! code E500" on any package I picked, and it appears to be fixed on my machine. I was able to install all the packages that I asked for on the GUI, and the Atom updates from the server (which were not working yesterday), are now working again. I tried to install "atom-clock" from the command line and that worked too -- I verified in Atom that it was now there.

I don't know about anyone else, but everything is working here.

I have checked over an hour ago and all seems to be working fine again and I can install and backup between machines without a problem.

Also just confirmed, the issue seems to be fixed. Using the package manager through the GUI/CLI does appear to be working correctly again.

Still having issues with this. apm and GUI fails. Also get errors from the search function..