SFDX Update returns Error: S3 host is not reachable.
Summary
Running sfdx update throws Warning: Attempting to contact update site... and then Error: S3 host is not reachable
Steps To Reproduce:
- Run sfdx update
Expected result
SFDX to be updated
Actual result
Error thrown
Additional information
Feel free to attach a screenshot.
SFDX CLI Version: sfdx-cli/7.71.0-4193fb4acc wsl-x64 node-v12.18.3
SFDX plugin Version
@oclif/plugin-autocomplete 0.1.5 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.1.0 (core) @oclif/plugin-not-found 1.2.4 (core) @oclif/plugin-plugins 1.9.0 (core) @oclif/plugin-update 1.3.10 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.2.1 (core) analytics 1.12.0 (core) generator 1.1.3 (core) salesforcedx 49.5.0 (49.5.0) ├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 ├─ salesforcedx-templates 49.2.0 ├─ salesforce-alm 49.5.0 └─ custom-metadata 1.0.8 sfdx-cli 7.71.0 (core) sfdx-wry-plugin 0.0.11
OS and version: Windows 10 WSL2
Same here on macOs. Trying to update from
$sfdx plugins
@salesforce/lwc-dev-server 2.5.1
├─ @oclif/plugin-help 2.2.1
└─ @oclif/plugin-update 1.3.9
salesforcedx 49.5.0 (49.5.0)
├─ salesforcedx-templates 49.2.0
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7
├─ custom-metadata 1.0.8
└─ salesforce-alm 49.5.0
I could recreate the problem on Windows 10 WSL2. It looks like the manifestUrl is set to
https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/wsl-x64, which is not available.
I tried to override it to https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/linux-x64 by editing the s3Url() function in config.js file, but cannot make it work yet...
Appently, the problem is the line 94 of the dist/hooks/updateReachability.js
Updating the platform from wsl to linux apparently solves the issue

Maybe just creating the manifest file for wsl-x64 should do the trick
Apparently, salesforce recommends installing sfdx as a global package using npm https://developer.salesforce.com/blogs/2018/05/using-salesforce-cli-with-windows-subsystem-for-linux-in-10-easy-steps.html
@ntotten
I had this problem while @oclif/plugin-autocomplete was installed (however as it was the only plugin installed, I could not assert that this plugin throws this error)
Same issue with me on Win 10 with sfdx run on WSL2. I managed to manually reinstall the package to have newer version.
Apparently, salesforce recommends installing sfdx as a global package using npm https://developer.salesforce.com/blogs/2018/05/using-salesforce-cli-with-windows-subsystem-for-linux-in-10-easy-steps.html
I don't really understand this article, I have instaled the sfdx cli manually without any issues or modification on wsl2 like a year ago, and it works fine. Even opening a Windows browser for authentication. Only the update functionality went wrong like 2 months ago.
@sjurgis @maelmonnier @x0r5 are you still seeing this issue? I just ran sfdx update and it worked as expected
are you using wsl? this only happens when running in wsl
The URL used in the dist/hooks/updateReachability.js still points to https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/wsl-x64 which is not available

# sfdx --version
sfdx-cli/7.80.0-b979aae708 wsl-x64 node-v12.18.3
still an issue
Just ran into this issue while trying to upgrade from sfdx-cli/7.72 on wsl-x64. Here's a workaround. Following the instructions on this page for install of Linux: sfdx_setup_install_cli
I wonder if this wsl-x64 update issue could be resolved just by creating a symbolic link wsl-x64 to linux-x64 on the server that stores updated codes. Or isn't that simple?
I see this fix belonging in oclif https://github.com/oclif/plugin-update/blob/d55d91d8700afb5660593362d0e8f3bea37ed833/src/update.ts#L86
I created internal @W-10289543@ but if anyone who's a WSL user wants to fix that via PR, I'm sure team oclif would be appreciative.
I've been running sfdx on WSL for a while, updates always worked...until recently. I am on 7.158.1 and doing an update runs into Error: HTTP Error 404 for GET https://developer.salesforce.com/wsl-x64 for reasons commenters above already pointed out. wsl-x64 comes back from oclif, platform and arch properties respectively. Haven't tried hardcoding the platform+arch string to linux-x64 in updateReachability.js.
@mshanemc oclif already supports WSL: https://github.com/oclif/config/pull/107
this was fixed a few months ago, please let us know if you see this issue on latest. https://github.com/oclif/plugin-update/pull/540