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

1.45.3 breaks proxy env variables impact on deno upgrade #24691

Closed
oscar6echo opened this issue Jul 23, 2024 · 9 comments · Fixed by #24696 or #25229
Closed

1.45.3 breaks proxy env variables impact on deno upgrade #24691

oscar6echo opened this issue Jul 23, 2024 · 9 comments · Fixed by #24696 or #25229
Assignees
Labels
bug Something isn't working correctly high priority

Comments

@oscar6echo
Copy link

How to replicate (Linux):

From version 1.45.2 in corp env with env variables HTTP(S)_PROXY set do deno upgrade.
It works and deno --version shows new version 1.45.3.
Do deno upgrade again and the external host is unreachable.
I infer that proxy env variables are no longer taken into account (?).

NOTE for other users:
To downgrade to 1.45.2, do curl -fsSL https://deno.land/install.sh | sh -s v1.0.0 with curl proxy env variables http(s)_proxy set.

@bartlomieju
Copy link
Member

Most likely related to #24632

@bartlomieju bartlomieju added the bug Something isn't working correctly label Jul 23, 2024
@bartlomieju bartlomieju self-assigned this Jul 23, 2024
@oscar6echo
Copy link
Author

Fast ! 🚀
Thx

dsherret pushed a commit that referenced this issue Jul 26, 2024
Sending ALPN to a proxy, and then when tunneling, requires better
juggling of TLS configs. This improves the choice of TLS config in the
proxy connector, based on what reqwest does. It also includes some
`ext/fetch/tests.rs` that check the different combinations.

Fixes #24632
Fixes #24691
@oscar6echo
Copy link
Author

Actually the problem is still there in 1.46.0: Pls reopen the issue.
Behind a corp proxy, I cannot deno upgrade after 1.45.2 but it does work for this version.
Was the fix mentioned above merged ? released ? tested behind a proxy (maybe not that easy) ?

See below the error I have:

  • OS: RHEL8
  • config:
# deno
BUCKET_ID=$(ls /DATA)
export DENO_INSTALL="/DATA/$BUCKET_ID/.deno"
export DENO_INSTALL_ROOT=$DENO_INSTALL/bin
export DENO_DIR=$DENO_INSTALL/.cache
export DENO_CERT=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
export DENO_TLS_CA_STORE=system
export PATH="$DENO_INSTALL_ROOT:$PATH"

# proxy
export HTTP_PROXY=xxx
export HTTPS_PROXY=xxx
  • screenshot

screenshot-deno-upgrade-error

So for a corp user at the moment the only way to manage upgrades is:

  • check out release page
  • manual reinstall curl -fsSL https://deno.land/install.sh | sh -s v1.46.0

@seanmonstar
Copy link
Contributor

I see the error message mentions proxy authentication required. Perhaps there was a change in exactly how the credentials for a proxy are parsed/detected. Would you mind sharing what protocol and format your proxy URL is? I don't need the values, just the format.

For example, HTTPS_PROXY=http://user:pass@host?

@oscar6echo
Copy link
Author

The format I use is HTTPS_PROXY=http://username:url_encoded_password@hostname:port

For the avoidance of doubt, by url encoded I mean as described here.
Example: url-encode(toto&#*) = toto%26%23%2A

@bartlomieju
Copy link
Member

@seanmonstar I guess it might be the same problem as #24705 - I probably missed handling that scenario for deno upgrade and FileFetcher.

@oscar6echo
Copy link
Author

Probably related ?
I have noticed that other CLI subcommands also fail with proxy auth.

Same settings as comment above except latest version.

deno-run-error-linux

@bartlomieju
Copy link
Member

@oscar6echo I just merged a PR that should fix it. It will be available on canary release in a couple hours. Let me know if that fixes your problem.

@oscar6echo
Copy link
Author

oscar6echo commented Aug 27, 2024

@bartlomieju thx I will try tomorrow morning.
But how to install the canary version given deno upgrade does not work behind a proxy yet ?

Normally I would do deno upgrade canary.
To install a specific version I do curl -fsSL https://deno.land/install.sh | sh -s v1.46.1 but it does not seem to work for canary ?

This is a bit of a catch 22 situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly high priority
Projects
None yet
4 participants