anseki / vscode-color

Helper with GUI to generate color codes such as CSS color notations.
MIT License
97 stars 27 forks source link

FetchError: Invalid response body while trying to fetch #111

Closed dko1905 closed 3 years ago

dko1905 commented 3 years ago

Steps to Reproduce:

  1. Install extension
  2. Use extension in a CSS file

Log (All lines): console.log

It seems to be something to do with:

/usr/lib/code-oss/resources/app/out/vs/workbench/workbench.desktop.main.js:62 [Extension Host] FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/combined-stream: Integrity verification failed for sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== (/home/daniel/.npm/_cacache/content-v2/sha512/fa/27/2962e195c5c1c2925bbda526e2b27047a8eb989ee4d2e533cc700cf3419b6a2afcc6865bc4d53c6264f1b640cf1736067db382b325a503057611b68a8602)    at Readable.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:195:14)    at Readable.emit (events.js:223:5)    at /usr/lib/node_modules/npm/node_modules/make-fetch-happen/cache.js:92:30    at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)    at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18)    at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:619:10)    at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:695:18)    at _drainQueueStep (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12)    at _drainQueue (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)    at Async._drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)    at Immediate.Async.drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)    at processImmediate (internal/timers.js:439:21)
anseki commented 3 years ago

Hi @Dko1905, thank you for the comment. Try this:

cd ~/.vscode-oss/extensions/anseki.vscode-color-0.4.5
npm install
dko1905 commented 3 years ago

Sorry for the late response. I've run the commands you have supplied, here is the console output:

$ cd ~/.vscode-oss/extensions/anseki.vscode-color-0.4.5 
daniel@void4ever ~/.vscode-oss/extensions/anseki.vscode-color-0.4.5 $ npm install                                          
npm WARN deprecated vscode@0.10.7: This package is deprecated in favor of @types/vscode and vscode-test. For more information please read: https://code.visualstudio.com/updates/v1_36#_splitting-vscode-package-into-typesvscode-and-vscodetest
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== integrity checksum failed when using sha512: wanted sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/combined-stream: Integrity verification failed for sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== (/home/daniel/.npm/_cacache/content-v2/sha512/fa/27/2962e195c5c1c2925bbda526e2b27047a8eb989ee4d2e533cc700cf3419b6a2afcc6865bc4d53c6264f1b640cf1736067db382b325a503057611b68a8602)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/daniel/.npm/_logs/2021-04-15T08_19_44_136Z-debug.log

The full log is attached.

dko1905 commented 3 years ago

I have updated npm to version 7.9.0. The issue persists. Here is the "new" output:

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== integrity checksum failed when using sha512: wanted sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/combined-stream: sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== integrity checksum failed when using sha512: wanted sha512-+icpYuGVxcHCklu9pSbisnBHqOuYnuTS5TPMcAzzQZtqKvzGhlvE1TxiZPG2QM8XNgZ9s4KzJaUDBXYRtoqGAg== but got sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==. (0 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/daniel/.npm/_logs/2021-04-15T08_22_13_309Z-debug.log

2021-04-15T08_22_13_309Z-debug.log

anseki commented 3 years ago

Cache data in your computer is broken. Try this:

npm cache clean --force
dko1905 commented 3 years ago

I have cleaned npm and run npm install successfully. I then opened vs-code, reinstalled the extension successfully and tried it by moving cursor to a color in a css file and then running Pick Color in the command menu (or what it's called in vs-code). It fails with a new error: tmp I then looked in the developer console: new1 That's already a known issue, so I installed GConf on my system. Then a new error: new2 This issue seems to have something to do with #90 I am using electron version 9.4.1_1. full_vscode_log.log

dko1905 commented 3 years ago

Oh no, I restarted vs code again and I get a new error: new_error1.log May have something to do with #108

anseki commented 3 years ago

Your computer has two problems.

  1. As you said, new problem was caused by installing different version of npm. This may help you: https://github.com/anseki/vscode-color/issues/108#issuecomment-774365209
  2. libgconf is required in your computer. Try this:
    sudo apt-get install libgconf-2-4

    And, execute the extension again after installation that.

dko1905 commented 3 years ago

I have downgraded npm and reinstalled gconf. I'm back to the this issue.

anseki commented 3 years ago

Do you mean that the error about libgconf was shown again? If so, the installing was failed maybe.

dko1905 commented 3 years ago

This error: img This log: log.log

anseki commented 3 years ago

That error should be solved by this: https://github.com/anseki/vscode-color/issues/108#issuecomment-774365209 The log means that your NPM was not replaced, it was failed maybe. Check result of the npm install npm@6.14.11.

dko1905 commented 3 years ago

It succeeded.

$ npm --version
6.14.11
dko1905 commented 3 years ago

Maybe I attached the wrong log, I'll attach a new one.

anseki commented 3 years ago

Try this:

cd ~/.vscode-oss/extensions/anseki.vscode-color-0.4.5
npm install npm@6.14.11

(cd target is important)

dko1905 commented 3 years ago

Try this:

It's installed. I did it again just because.

new image: epic (1) new log: log.log

dko1905 commented 3 years ago

Here is a large image of the log. larger

anseki commented 3 years ago

The issue might be solved by downgrading the glibc in your computer, but I don't know whether this is best solution or not. Sorry, I can't help you about this. I think that you had better use internal Color Picker of VS Code instead.

dko1905 commented 3 years ago

Thank you for the support.

anseki commented 3 years ago

:smile: