cli icon indicating copy to clipboard operation
cli copied to clipboard

SFDX Update returns Error: S3 host is not reachable.

Open mnunezdm opened this issue 5 years ago • 15 comments

Summary

Running sfdx update throws Warning: Attempting to contact update site... and then Error: S3 host is not reachable

Steps To Reproduce:

  1. 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

mnunezdm avatar Sep 14 '20 07:09 mnunezdm

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

sjurgis avatar Sep 24 '20 03:09 sjurgis

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...

TamiTakamiya avatar Oct 20 '20 04:10 TamiTakamiya

Appently, the problem is the line 94 of the dist/hooks/updateReachability.js

Updating the platform from wsl to linux apparently solves the issue

image

Maybe just creating the manifest file for wsl-x64 should do the trick

mnunezdm avatar Oct 20 '20 09:10 mnunezdm

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

mnunezdm avatar Oct 20 '20 09:10 mnunezdm

@ntotten

mnunezdm avatar Oct 20 '20 09:10 mnunezdm

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)

maelmonnier avatar Oct 27 '20 16:10 maelmonnier

Same issue with me on Win 10 with sfdx run on WSL2. I managed to manually reinstall the package to have newer version.

x0r5 avatar Nov 03 '20 08:11 x0r5

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.

x0r5 avatar Nov 03 '20 08:11 x0r5

@sjurgis @maelmonnier @x0r5 are you still seeing this issue? I just ran sfdx update and it worked as expected

clairebianchi avatar Nov 13 '20 21:11 clairebianchi

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

image

# sfdx --version
sfdx-cli/7.80.0-b979aae708 wsl-x64 node-v12.18.3

mnunezdm avatar Nov 15 '20 11:11 mnunezdm

still an issue

enhendrickson avatar Jan 11 '21 12:01 enhendrickson

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

naustin avatar Mar 08 '21 19:03 naustin

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?

TamiTakamiya avatar Mar 08 '21 20:03 TamiTakamiya

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.

mshanemc avatar Dec 09 '21 20:12 mshanemc

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

amp42 avatar Oct 01 '22 22:10 amp42

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

cristiand391 avatar Jun 22 '23 13:06 cristiand391