shanalikhan / code-settings-sync

🌴💪 Synchronize your Visual Studio Code Settings Across Multiple Machines using GitHub GIST 💪🌴
https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
MIT License
4.01k stars 390 forks source link

Crash when extension not found in marketplace #1274

Open ochen1 opened 3 years ago

ochen1 commented 3 years ago

🐛 Describe the bug

A clear and concise description of what the bug is. You are always welcome to check the Troubleshooting section before filing the ticket.

The extension's download procedure halts entirely upon extension installation failure (eg. due to unavailability).

This crash is recoverable, simply by moving onto the next plugin and ignoring the failed plugin.

🌴 Visual Studio Code Version : v1.51.1 / 1.52.1 🌴 Code Settings Sync Version : v3.4.3 🌴 Standard or Insiders : Standard 🌴 Portable or Installed : Installed / Code-Server 🌴 OSS or Official Build : Official 🌴 Operating System : Linux KDENeon 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux / Linux 61520c20553d 5.4.0-1019-gcp #19-Ubuntu SMP Tue Jun 23 15:46:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 🌴 Occurs On: Download 🌴 Proxy Enabled: No 🌴 Gist Id: b4bdb838ff56a4261a6f8f4a203dfef1

📰 To Reproduce

Steps to reproduce the behavior:

  1. Follow standard installation procedure.
  2. Sync settings from VS Code to GitHub Gist
  3. Go to code-server, or a version of VS Code without the full marketplace.
  4. Attempt to download sync.
  5. Crashes when extension is not found. (See error.)

💪 Expected behavior

A clear and concise description of what you expected to happen.

If a extension is not found, I expect the sync extension to report an error (eg. through a notification or the output console), and move onto the next extension.

A failure in installation of one extension should not halt the entire procedure.

📺 Console Error Log

If applicable, add screenshots or paste the console log from developer console of VSCode (Help Menu > Developer Tool - Console Tab).

image

image (download procedure stops)

[2021-01-03 11:13:10.846] [window] [error] Extension 'nick-rudenko.back-n-forth' not found.: Error: Extension 'nick-rudenko.back-n-forth' not found.
    at handler (http://localhost:8000/static/c4610f7829701aadb045d450013b84491c30580d/home/runner/.local/lib/code-server-3.8.0/lib/vscode/out/vs/workbench/workbench.web.api.js:7164:503)

📺 Additional context

Add any other context about the problem here.

Having such an error be caught would be very useful, especially on code-server, where the amount of marketplace extensions is limited.

NightMachinery commented 3 years ago

I have also seen this because of a network error:

Error: Error: Error: Extension 'activitywatch.aw-watcher-vscode' not found. at /home/eva/.local/share/code-server/extensions/shan.code-settings-sync-3.4.3/out/extension.js:290:22293   at /home/eva/.local/share/code-server/extensions/shan.code-settings-sync-3.4.3/out/extension.js:290:11611   at Object.throw (/home/eva/.local/share/code-server/extensions/shan.code-settings-sync-3.4.3/out/extension.js:290:11716)    at s (/home/eva/.local/share/code-server/extensions/shan.code-settings-sync-3.4.3/out/extension.js:290:10513)   at processTicksAndRejections (internal/process/task_queues.js:97:5)
senpl commented 3 years ago

As workoround gist edit and remove not found extension. Still better solution should be avaliable.