braver / fonts

Free and open fonts for the Atom editor
MIT License
127 stars 26 forks source link

Unable to Update/Download latest version 3.10.0 #97

Open stachurr opened 4 years ago

stachurr commented 4 years ago

After trying different approves from updating fonts to 3.10.0, I decided to uninstall it so I could reinstall it again. The installation fails with the same error given when attempting to update: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Users\\r4_st\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\bin\\node.exe', 1 verbose cli 'C:\\Users\\r4_st\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli '--globalconfig', 1 verbose cli 'C:\\Users\\r4_st\\.atom\\.apm\\.apmrc', 1 verbose cli '--userconfig', 1 verbose cli 'C:\\Users\\r4_st\\.atom\\.apmrc', 1 verbose cli 'install', 1 verbose cli 'https://www.atom.io/api/packages/fonts/versions/3.10.0/tarball', 1 verbose cli '--target=3.1.10', 1 verbose cli '--disturl=https://atom.io/download/electron', 1 verbose cli '--arch=x64', 1 verbose cli '--global-style', 1 verbose cli '--msvs_version=2015' ] 2 info using npm@6.2.0 3 info using node@v10.2.1 4 verbose npm-session 7574292e0e687355 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 http fetch GET 304 https://www.atom.io/api/packages/fonts/versions/3.10.0/tarball 1116ms (from cache) 8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/fonts/versions/3.10.0/tarball zlib: unexpected end of file 9 timing stage:rollbackFailedOptional Completed in 10ms 10 timing stage:runTopLevelLifecycles Completed in 1456ms 11 verbose stack ZlibError: zlib: unexpected end of file 11 verbose stack at Zlib.(anonymous function).onerror (C:\Users\r4_st\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\minizlib\index.js:131:21) 11 verbose stack at Unzip.write (C:\Users\r4_st\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\minizlib\index.js:255:31) 11 verbose stack at Unzip.flush (C:\Users\r4_st\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\minizlib\index.js:222:10) 11 verbose stack at Unzip.end (C:\Users\r4_st\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\minizlib\index.js:229:10) 11 verbose stack at Object.end (C:\Users\r4_st\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\tar\lib\parse.js:415:21) 11 verbose stack at PassThrough.onend (_stream_readable.js:634:10) 11 verbose stack at Object.onceWrapper (events.js:273:13) 11 verbose stack at PassThrough.emit (events.js:187:15) 11 verbose stack at endReadableNT (_stream_readable.js:1090:12) 11 verbose stack at process._tickCallback (internal/process/next_tick.js:63:19) 12 verbose cwd C:\Users\r4_st\AppData\Local\Temp\apm-install-dir-120017-2752-vsnq77.ussud 13 verbose Windows_NT 10.0.18362 14 verbose argv "C:\\Users\\r4_st\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\r4_st\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\r4_st\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\r4_st\\.atom\\.apmrc" "install" "https://www.atom.io/api/packages/fonts/versions/3.10.0/tarball" "--target=3.1.10" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style" "--msvs_version=2015" 15 verbose node v10.2.1 16 verbose npm v6.2.0 17 error code Z_BUF_ERROR 18 error errno -5 19 error zlib: unexpected end of file 20 verbose exit [ -5, true ]

lierdakil commented 4 years ago

Well, the relevant part here is this: zlib: unexpected end of file, the rest is just fluff. The caveat is that all packaging is actually handled by GitHub, so I can't do much about it anyway. That said, I've checked, and apm install fonts works as expected for me, so it either was a temporary problem, which is already fixed, or it's an issue on your side (perhaps with your Internet connection, but that's a blind guess obviously)

StefanGreve commented 4 years ago

I have the exact same issue. I also tried to update & re-install Atom but I could not resolve the error that way. Interestingly enough, I can't install any other font-related packages, either.

For example take this output:

Installing “fonts-cjk@2.2.0” failed.
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Stefan Greve\.atom\.apm\_logs\2020-03-25T13_54_21_526Z-debug.log

It's the exact same error message in both cases. On the other hand, Hydrogen v2.14.1 and teletype v0.13.4 could be installed just fine the other night. As far as I am concerned, my internet connection should be good enough to download extensions. Perhaps there exists some incompatibility issues with another extensions I have already installed? Your guess is as good as mine.

taw00 commented 4 years ago

Still unresolved 4 months later (note, I have no issues installing other packages):

Installing “fonts@3.10.0” failed.
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/todd/.atom/.apm/_logs/2020-04-24T15_54_15_561Z-debug.log
lierdakil commented 4 years ago

I can not reproduce the issue.

$ apm install --verbose fonts@3.10.0
Installing fonts@3.10.0 to /home/livid/.atom/packages REQUEST { url: 'https://atom.io/api/packages/fonts',
  json: true,
  retries: 4,
  strictSSL: true,
  headers: { 'User-Agent': 'npm/6.2.0 node/v10.2.1 linux x64' },
  callback: [Function],
  method: 'GET' }
REQUEST make request https://atom.io/api/packages/fonts
REQUEST onRequestResponse https://atom.io/api/packages/fonts 200 { server: 'Cowboy',
  connection: 'close',
  date: 'Fri, 24 Apr 2020 22:13:29 GMT',
  status: '200 OK',
  'referrer-policy': 'strict-origin-when-cross-origin',
  'strict-transport-security': 'max-age=631139040',
  'x-frame-options': 'DENY',
  'content-security-policy':
   'default-src \'self\'; font-src https://github-atom-io-herokuapp-com.freetls.fastly.net https://github-atom-io-herokuapp-com.global.ssl.fastly.net; frame-src \'self\' https://www.youtube.com; img-src https: \'self\' https://github-atom-io-herokuapp-com.freetls.fastly.net data:; media-src \'self\'; object-src \'self\' https://github-atom-io-herokuapp-com.freetls.fastly.net; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com https://platform.twitter.com https://github-atom-io-herokuapp-com.freetls.fastly.net; style-src \'self\' \'unsafe-inline\' https://github-atom-io-herokuapp-com.freetls.fastly.net;',
  'x-xss-protection': '1; mode=block',
  'x-content-type-options': 'nosniff',
  'x-download-options': 'noopen',
  'x-permitted-cross-domain-policies': 'none',
  'content-type': 'application/json; charset=utf-8',
  etag: 'W/"6c27035760ab9d4f1a6ce6623607ce6a"',
  'cache-control': 'max-age=0, private, must-revalidate',
  'x-request-id': '9c10f805-3861-4e78-bfc4-11b6c33e01e6',
  'x-runtime': '0.008366',
  'x-rack-cache': 'miss',
  vary: 'Accept-Encoding, Origin',
  via: '1.1 vegur' }
REQUEST reading response's body
REQUEST finish init function https://atom.io/api/packages/fonts
REQUEST response end https://atom.io/api/packages/fonts 200 { server: 'Cowboy',
  connection: 'close',
  date: 'Fri, 24 Apr 2020 22:13:29 GMT',
  status: '200 OK',
  'referrer-policy': 'strict-origin-when-cross-origin',
  'strict-transport-security': 'max-age=631139040',
  'x-frame-options': 'DENY',
  'content-security-policy':
   'default-src \'self\'; font-src https://github-atom-io-herokuapp-com.freetls.fastly.net https://github-atom-io-herokuapp-com.global.ssl.fastly.net; frame-src \'self\' https://www.youtube.com; img-src https: \'self\' https://github-atom-io-herokuapp-com.freetls.fastly.net data:; media-src \'self\'; object-src \'self\' https://github-atom-io-herokuapp-com.freetls.fastly.net; script-src \'self\' \'unsafe-inline\' https://ssl.google-analytics.com https://www.google-analytics.com https://platform.twitter.com https://github-atom-io-herokuapp-com.freetls.fastly.net; style-src \'self\' \'unsafe-inline\' https://github-atom-io-herokuapp-com.freetls.fastly.net;',
  'x-xss-protection': '1; mode=block',
  'x-content-type-options': 'nosniff',
  'x-download-options': 'noopen',
  'x-permitted-cross-domain-policies': 'none',
  'content-type': 'application/json; charset=utf-8',
  etag: 'W/"6c27035760ab9d4f1a6ce6623607ce6a"',
  'cache-control': 'max-age=0, private, must-revalidate',
  'x-request-id': '9c10f805-3861-4e78-bfc4-11b6c33e01e6',
  'x-runtime': '0.008366',
  'x-rack-cache': 'miss',
  vary: 'Accept-Encoding, Origin',
  via: '1.1 vegur' }
REQUEST end event https://atom.io/api/packages/fonts
REQUEST has body https://atom.io/api/packages/fonts 57317
REQUEST emitting complete https://atom.io/api/packages/fonts
npm WARN saveError ENOENT: no such file or directory, open '/tmp/apm-install-dir-120325-3042922-1k72lgl.c6ec/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-120325-3042922-1k72lgl.c6ec/package.json'
npm WARN apm-install-dir-120325-3042922-1k72lgl.c6ec No description
npm WARN apm-install-dir-120325-3042922-1k72lgl.c6ec No repository field.
npm WARN apm-install-dir-120325-3042922-1k72lgl.c6ec No README data
npm WARN apm-install-dir-120325-3042922-1k72lgl.c6ec No license field.

+ fonts@3.10.0
added 1 package and audited 1 package in 2.755s
found 0 vulnerabilities

Attach the full log if you want me to take a look at it. But the chance I will be able to do anything on our end is rather slim, this very much seems like an NPM issue.

lierdakil commented 4 years ago

StackOverflow suggests

npm cache clean --force
npm cache verify
taw00 commented 4 years ago

I ended up installing it by hand with a git clone and npm install. That worked.

I just did the cache clean thing and we'll see the next time it needs to be updated. Thanks for your input.

@stefangreve Did you ever get it installed? Can you try the npm clean --force suggestion?

ricosandyca commented 4 years ago

Same here... I've tried to run this but it still didn't work

npm cache clean --force
npm cache verify

My error log

1 verbose cli [ '/usr/share/atom/resources/app/apm/bin/node',
1 verbose cli   '/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js',
1 verbose cli   '--globalconfig',
1 verbose cli   '/home/ricosandyca/.atom/.apm/.apmrc',
1 verbose cli   '--userconfig',
1 verbose cli   '/home/ricosandyca/.atom/.apmrc',
1 verbose cli   'install',
1 verbose cli   'https://www.atom.io/api/packages/fonts/versions/3.11.0/tarball',
1 verbose cli   '--target=5.0.13',
1 verbose cli   '--disturl=https://atom.io/download/electron',
1 verbose cli   '--arch=x64',
1 verbose cli   '--global-style' ]
2 info using npm@6.2.0
3 info using node@v10.2.1
4 verbose npm-session a3a06511c099e994
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://www.atom.io/api/packages/fonts/versions/3.11.0/tarball 3102ms (from cache)
8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/fonts/versions/3.11.0/tarball zlib: unexpected end of file
9 timing stage:rollbackFailedOptional Completed in 2ms
10 timing stage:runTopLevelLifecycles Completed in 3253ms
11 verbose stack ZlibError: zlib: unexpected end of file
11 verbose stack     at Zlib.(anonymous function).onerror (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/minizlib/index.js:131:21)
11 verbose stack     at Unzip.write (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/minizlib/index.js:255:31)
11 verbose stack     at Unzip.flush (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/minizlib/index.js:222:10)
11 verbose stack     at Unzip.end (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/minizlib/index.js:229:10)
11 verbose stack     at Object.end (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/tar/lib/parse.js:415:21)
11 verbose stack     at PassThrough.onend (_stream_readable.js:634:10)
11 verbose stack     at Object.onceWrapper (events.js:273:13)
11 verbose stack     at PassThrough.emit (events.js:187:15)
11 verbose stack     at endReadableNT (_stream_readable.js:1090:12)
11 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)
12 verbose cwd /tmp/apm-install-dir-2020420-19311-nrkjn8.fb6lo
13 verbose Linux 4.15.0-29deepin-generic
14 verbose argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/ricosandyca/.atom/.apm/.apmrc" "--userconfig" "/home/ricosandyca/.atom/.apmrc" "install" "https://www.atom.io/api/packages/fonts/versions/3.11.0/tarball" "--target=5.0.13" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style"
15 verbose node v10.2.1
16 verbose npm  v6.2.0
17 error code Z_BUF_ERROR
18 error errno -5
19 error zlib: unexpected end of file
20 verbose exit [ -5, true ]

My atom version is 1.47.0x64 I got another problem with platform-ide-terminal on this version. I don't know that's atom issues or packages issues

lierdakil commented 4 years ago
7 http fetch GET 304 https://www.atom.io/api/packages/fonts/versions/3.11.0/tarball 3102ms (from cache)
8 silly fetchPackageMetaData error for https://www.atom.io/api/packages/fonts/versions/3.11.0/tarball zlib: unexpected end of file

And here's the issue, which is different from the other reported here, but is in the similar general category. Apparently, something went wrong, probably the download got interrupted. This mangled file was saved to cache. Now the same file keeps getting pulled from cache.

The only question is how to remove that from the cache. As far as I know, apm cache is supposedly in $HOME/.atom/.apm.

ricosandyca commented 4 years ago

@lierdakil it's working I followed this instruction for deleting the cache as you explained

Thanks :+1:

taw00 commented 4 years ago

Works for me now as well. I think this boils down to a caching issue. What should happen is that this particular error should be caught and dealt with. Either alerting the user that there may be a caching issue and how to resolve it. Or ... if confident enough, atom or the package installation process should just fix it.

lierdakil commented 4 years ago

Feel free to open an issue on atom/atom repo. Can't fix the installer issue on the package side.

taw00 commented 4 years ago

Feel free to open an issue on atom/atom repo. Can't fix the installer issue on the package side.

Done. I suppose this issue can be closed.

miniminiwhite commented 4 years ago

Or maybe you can try the other way and install the package manually... it works fine for me.

I deleted the cache manually by cleaning up the folder ~/.atom/.apm, yet the apm install fonts command didn't work well somehow and got stuck, so I downloaded and installed the package manually.

  1. Remove the fonts package you currently have in atom;
  2. Download the latest release from github, I downloaded the zip file but the other one should work the same way;
  3. Unzip the content to ~/.atom/packages (since other package folders don't contain any version number, I removed the version number from the folder name just in case, fonts-3.11.0fonts. Not sure if that's an issue);
  4. cd ~/.atom/packages/fonts;
  5. apm install.

Hope this helps a bit. Curse the terrible network btw. 💢

thien0709 commented 3 years ago

Vẫn chưa được giải quyết 4 tháng sau đó (lưu ý, tôi không gặp vấn đề gì khi cài đặt các gói khác):

Installing “fonts@3.10.0” failed.
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/todd/.atom/.apm/_logs/2020-04-24T15_54_15_561Z-debug.log

Cuối cùng tôi đã cài đặt nó bằng tay với một bản sao git và cài đặt npm. Nó có tác dụng.

Tôi vừa làm bộ nhớ cache sạch sẽ và chúng ta sẽ thấy lần tiếp theo nó cần được cập nhật. Cảm ơn bạn đã nhập liệu của bạn.

@StefanGreve Bạn đã bao giờ cài đặt nó chưa? Bạn có thể thử gợi ý npm clean --force không?

Can you give me specifics?