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

SFDX Update returns Error: S3 host is not reachable. #610

Closed
mnunezdm opened this issue Sep 14, 2020 · 16 comments
Closed

SFDX Update returns Error: S3 host is not reachable. #610

mnunezdm opened this issue Sep 14, 2020 · 16 comments
Labels
env:windows Labels enviornment-specific issues and pull requests for Windows.

Comments

@mnunezdm
Copy link

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

@sjurgis
Copy link

sjurgis commented Sep 24, 2020

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

@TamiTakamiya
Copy link

TamiTakamiya commented Oct 20, 2020

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

@mnunezdm
Copy link
Author

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
Copy link
Author

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
Copy link
Author

@ntotten

@maelmonnier
Copy link

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)

@x0r5
Copy link

x0r5 commented Nov 3, 2020

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

@x0r5
Copy link

x0r5 commented Nov 3, 2020

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.

@clairebianchi
Copy link
Collaborator

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

@clairebianchi clairebianchi added the more information required Issue requires more information or a response from the customer label Nov 13, 2020
@mnunezdm
Copy link
Author

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

@no-response no-response bot removed the more information required Issue requires more information or a response from the customer label Nov 15, 2020
@enhendrickson
Copy link

still an issue

@naustin
Copy link

naustin commented Mar 8, 2021

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

@TamiTakamiya
Copy link

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?

@mshanemc mshanemc added the env:windows Labels enviornment-specific issues and pull requests for Windows. label May 20, 2021
@mshanemc
Copy link
Contributor

mshanemc commented Dec 9, 2021

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.

@amp42
Copy link

amp42 commented Oct 1, 2022

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: oclif/config#107

@cristiand391
Copy link
Member

this was fixed a few months ago, please let us know if you see this issue on latest.
oclif/plugin-update#540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env:windows Labels enviornment-specific issues and pull requests for Windows.
Projects
None yet
Development

No branches or pull requests