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

Can not update extensions due to "Error: Server returned 404" (rust-analyzer) #149518

Closed
rlabrecque opened this issue May 14, 2022 · 40 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions marketplace Microsoft VS Code Marketplace issues verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Milestone

Comments

@rlabrecque
Copy link

rlabrecque commented May 14, 2022

  • VS Code Version: 1.68.0-insider
  • OS Version: Windows 10 21H2

Steps to Reproduce:

  1. Have rust-analyzer 0.2.853 installed from the marketplace
  2. Observe that your extensions are out of date.
  3. Try to use the "Check for Extension Updates" option
  4. Receive notification alert "Error: Server returned 404", no extensions receive updates.

Uninstalling rust-analyzer 0.2.853 resolved this for me.

Expectations:

  1. Notification Alert would have shown which extension it was. I only found out via the Developer Tools Console.
  2. Other extensions would have updated fine regardless of this error caused by one extension.
  3. It's been failing to update extensions in the background for a while despite having "Keep extensions up to date checked", a warning that this was failing would have been nice. (It also caused all extensions to appear up to date, when they in fact weren't.)

Developer Tools Console output:

request.ts:46 
 GET https://rust-lang.gallerycdn.vsassets.io/extensions/rust-lang/rust-analyzer/0.2.853/1639376535349/Microsoft.VisualStudio.Code.Manifest 404
request.ts:46 
 GET https://rust-lang.gallerycdn.vsassets.io/extensions/rust-lang/rust-analyzer/0.2.853/1639376535349/Microsoft.VisualStudio.Code.Manifest 404
notificationsAlerts.ts:40 Error: Server returned 404
    at C (request.ts:49:9)
    at J.getManifestFromRawExtensionVersion (extensionGalleryService.ts:1023:16)
    at async J.getEngine (extensionGalleryService.ts:1128:21)
    at async J.isValidVersion (extensionGalleryService.ts:671:19)
    at async J.toGalleryExtensionWithCriteria (extensionGalleryService.ts:868:8)
    at async J.queryGalleryExtensions (extensionGalleryService.ts:809:22)
    at async J.getExtensions (extensionGalleryService.ts:618:26)
    at async Ms.checkForUpdates (extensionsWorkbenchService.ts:1076:30)
    at async Object.run (extensions.contribution.ts:584:5)
    at async k.runAction (actions.ts:190:3)
    at async k.run (actions.ts:181:4)
@Ramblestsad
Copy link

I've met the same problem. When I clicked the button Check for Extensions Update, I got a message Server returned 404.

VS Code Version: 1.67.1(universal)
OS Version: macOS Monterey 12.3.1

@kinghat
Copy link

kinghat commented May 15, 2022

Version: 1.67.1
Commit: da15b6f
Date: 2022-05-06T12:39:22.915Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.13.0-41-generic snap

same issue here. not sure if its related but happened at the same time i messed with the rust extensions. i thought rust-analyzer rolled to the main rust extension. i disabled rust-analyzer and installed rust. if i disable both extensions i still get the error.

@tresuke
Copy link

tresuke commented May 16, 2022

I have faced the same problem.

It seems that the change in the Marketplace identifier of rust-analyzer from matklad.rust-analyzer to rust-lang.rust-analyzer seems to have affected the problem.
I solved the problem by uninstalling the old rust-analyzer and installing the new rust-lang.rust-analyzer again.

@bpetlert
Copy link

Version: 1.67.1
Commit: da15b6f
Date: 2022-05-06T12:39:22.915Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.17.7-zen1-1-zen

I got the same problem when use rust-analyzer v0.3.1051. I got this message: Command 'Extensions: Check for Extension Updates' resulted in an error (Server returned 404). After switch to Pre-Release version rust-analyzer v0.3.1055. No problem anymore.

@MitchTalmadge
Copy link

MitchTalmadge commented May 17, 2022

Same problem with rust-analyzer. After uninstalling the extension I can update my others.

image

image

@getaceres
Copy link

Same problem here. Having rust-analyzer installed prevents any extension update.

@rlabrecque rlabrecque changed the title Can not update extensions due to "Error: Server returned 404" Can not update extensions due to "Error: Server returned 404" (rust-analyzer) May 18, 2022
@rlabrecque
Copy link
Author

Hey @sandy081 is it possible to escalate this? It's becoming a security issue. People suffering from this are not receiving any extension updates and are falling behind on extension security patches. Thanks!

There might be a temporary fix that someone on the marketplace side could do for rust-analyzer specifically, though fixing the root causes in vscode would be fantastic as well.

@MitchTalmadge
Copy link

Fully agree that this is a security issue; users have no way to know that their auto updates are not working. There is no indication that updates are even available.

@jonasbb
Copy link

jonasbb commented May 19, 2022

I see some more symptoms in my installation. I see different behavior between just opening the extension page or first searching for the extension and then opening the page. Using the pre-release version also seems not to cause issues with updates. More details are here rust-lang/rust-analyzer#12305 (comment)

@CyriacBr
Copy link

In my case, I can't even install the extension. I've just setup a codespace but I receive a "Server returned 404" error when trying to install rust-analyzer.

@rlabrecque
Copy link
Author

@isidorn Would you be able to triage this one given your activity in the rust-analyzer and marketplace repos?

@sandy081
Copy link
Member

@rlabrecque Apologies that I did not notice this. Will investigate soon. Are there any simple steps to reproduce?

@sandy081
Copy link
Member

It seems I am not able to install release versions of this extension at all

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority extensions Issues concerning extensions labels May 19, 2022
@sandy081 sandy081 added this to the May 2022 milestone May 19, 2022
@sandy081
Copy link
Member

Marketplace CDN is returning 404 for following request

https://rust-lang.gallerycdn.vsassets.io/extensions/rust-lang/rust-analyzer/0.2.853/1639376535349/Microsoft.VisualStudio.Code.Manifest

Marketplace is returning above URL indeed when querying for this extension

image

CC @prashantvc @SaiKanth007

@sandy081 sandy081 removed the important Issue identified as high-priority label May 19, 2022
@sandy081
Copy link
Member

sandy081 commented May 19, 2022

Here are the issues I noticed:

  1. Cannot install release version of Rust analyzer extension in Insiders (In stable works)
  2. Cannot update Rust analyzer extension
  3. Preventing other extensions to update

Root cause is that Marketplace when requested for latest versions, is returning 0.2.853 version that is invalid/bogus - this version's assets (manifest, vsix) are not found and it has no properties. It seems it was published with old publisher name.

Irrespective of that, an error while updating one extension shall not prevent other extensions.

@sandy081 sandy081 added the marketplace Microsoft VS Code Marketplace issues label May 19, 2022
@SaiKanth007
Copy link

Looking into it

sandy081 added a commit that referenced this issue May 20, 2022
@SaiKanth007
Copy link

The extension was recently transferred to a new publisher 'rust-lang' and there is a step that got missed from the publisher end. I will reach out to the publisher and discuss on this.

@sandy081
Copy link
Member

Yes - it fixes the update.

@jonasbb
Copy link

jonasbb commented May 23, 2022

I updated to the latest rust-analyzer version v0.3.1066 and can still reproduce this error with the release version of the extension. VS Code still tries to download https://rust-lang.gallerycdn.vsassets.io/extensions/rust-lang/rust-analyzer/0.2.853/1639376535349/Microsoft.VisualStudio.Code.Manifest.

The latest rust-analyzer release contains the PR "internal: Publish universal VSIX to make VS happy" rust-lang/rust-analyzer#12349
From the descriptions here and in the PR it is not clear if that alone should have fixed the issues already.

@SaiKanth007
Copy link

@jonasbb I assume the latest version for universal is not yet published to marketplace, the latest version for universal is still 0.2.853 on marketplace

@jonasbb
Copy link

jonasbb commented May 23, 2022

@SaiKanth007 The last two releases (release and pre-release) are based on the above linked PR. The release v0.3.1066 is just a couple of hours old, so also after the PR was merged. That means that at least some new extension versions were published. Of course, it could be that the universal version failed for some reason, maybe @lnicola knows?
Screenshot from 2022-05-23 12-05-20

@lnicola
Copy link
Contributor

lnicola commented May 23, 2022

Publishing the universal VSIX failed in https://github.com/rust-lang/rust-analyzer/runs/6549037342?check_suite_focus=true#step:19:36 with an already exists error.

Maybe we should make sure to put the universal VSIX first in the list?

@isidorn
Copy link
Contributor

isidorn commented May 23, 2022

@SaiKanth007 just informed me he is investigating. We should have more details soon.
Thank you for your patience.

@sandy081 sandy081 added the candidate Issue identified as probable candidate for fixing in the next release label May 23, 2022
@isidorn
Copy link
Contributor

isidorn commented May 23, 2022

It seems like this error is coming from the vsce publish step. We are emailing with Aleksey from the rust-analyzer extension side. We suggest to try a workaround to publish the universal version of the extension using the marketplace UI
https://marketplace.visualstudio.com/manage/publishers/rust-lang

This is a workaround. Sorry about this.

@lnicola
Copy link
Contributor

lnicola commented May 23, 2022

Would we have to do that only once, or every time? I don't know whether we have access there.

@isidorn
Copy link
Contributor

isidorn commented May 23, 2022

Another workaround as @lnicola suggests - publishing universal first before other versions should work.

And yes, you should only need to do this once. We want you to keep your nice automatic flow.

bors added a commit to rust-lang/rust-analyzer that referenced this issue May 23, 2022
internal: Try to publish the universal VSIX before the other ones

CC microsoft/vscode#149518 (comment)
@lnicola
Copy link
Contributor

lnicola commented May 23, 2022

@isidorn that appears to have failed in an interesting way in https://github.com/rust-lang/rust-analyzer/runs/6559062568?check_suite_focus=true.

@isidorn
Copy link
Contributor

isidorn commented May 23, 2022

@lnicola thanks a lot for trying. I suggest to try to upload the universal version directly via Marketplace UI then.
I have also sent Alexey an email. If both of you do not have access let me know and then we can go for an alternative approach tomorrow.

And I apologise again for the issue, it seems like the combination of platform specific extensions and renaming the extension publisher uncovered quite some issues on our side.

@lnicola
Copy link
Contributor

lnicola commented May 23, 2022

AFAIK neither of us has access, so that might be problematic.

And yeah, don't worry, we've had some fun with platform-specific extensions before.

@isidorn
Copy link
Contributor

isidorn commented May 23, 2022

@lnicola I will drop you and Alexey an email. We have an idea.

@sandy081
Copy link
Member

rust-analyzer extension team has published an universal version which fixed this issue in VS Code stable. Hence closing this.

Thanks a lot @lnicola for your active involvement in getting this issue fixed. Very much appreciated 👏

@lnicola
Copy link
Contributor

lnicola commented May 23, 2022

Wait, how did it fix the issue? Publishing the Alpine VSIX failed right afterwards.

@sandy081
Copy link
Member

Fix for this issue needed any universal version > 0.2.853 to be published and that seems to be happened.

Publishing the Alpine VSIX failed right afterwards.

This seems to be a different unrelated issue which shall be looked at separately.

@isidorn
Copy link
Contributor

isidorn commented May 24, 2022

Thanks everybody for tackling this weird issue.

Community please let us know if somebody can still reproduce this problem.
Thanks!

@lnicola
Copy link
Contributor

lnicola commented May 30, 2022

Update: publishing went through!

The Marketplace still has a minor issue where it's only showing the pre-release versions (because they're higher than the stable ones), but that's not a new problem.

@tanhakabir tanhakabir added the verification-steps-needed Steps to verify are needed for verification label Jun 2, 2022
@joyceerhl joyceerhl added the verified Verification succeeded label Jun 6, 2022
@joaomoreno joaomoreno removed the candidate Issue identified as probable candidate for fixing in the next release label Jun 7, 2022
@sesameJar
Copy link

Hey guys, I accidentally removed my rust-analyzer and now I cannot install it for the same reason. Is this supposed to be fixed?

@lnicola
Copy link
Contributor

lnicola commented Jun 14, 2022

@sesameJar did you try restarting Code afterwards?

@PierreBeucher
Copy link

Still had a similar issue, I upgraded to latest VS Code (1.68.1) and it works now.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions marketplace Microsoft VS Code Marketplace issues verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Projects
None yet
Development

No branches or pull requests