warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.35k stars 373 forks source link

Sign in fails propably because of certificate change by proxy #4326

Closed stefanniemeyer closed 2 months ago

stefanniemeyer commented 8 months ago

Discord username (optional)

No response

Describe the bug

Warp shows a pop up "Request to log in failed".

I start warp on a SLES VM behind a corporate proxy. The proxy replaces the certificates of a https connections and sends self signed certificates. The root CA of these certificate are installed properly, so curl e.g. is fine with this.

It looks like warp does not accept these certificates. Excerpt from warp.log:

2024-02-25T08:37:47Z [WARN] Initial access token request to Firebase failed: error sending request for url (https://securetoken.googleapis.com/v1/token?key=AIzaSyBdy3O3S9hrdayLJxJ7mriBR4qgUaUygAs): error trying to connect: invalid peer certificate: UnknownIssuer

Caused by:
    0: error trying to connect: invalid peer certificate: UnknownIssuer
    1: invalid peer certificate: UnknownIssuer
2024-02-25T08:37:47Z [ERROR] Failed to log in user with error: Unexpected(error sending request for url (https://app.warp.dev/proxy/token?key=AIzaSyBdy3O3S9hrdayLJxJ7mriBR4qgUaUygAs): error trying to connect: invalid peer certificate: UnknownIssuer

Caused by:
    0: error trying to connect: invalid peer certificate: UnknownIssuer
    1: invalid peer certificate: UnknownIssuer)

warp_network.log warp.log

To reproduce

  1. I start warp-terminal
  2. Click on "Sign in"
  3. I am already logged in to Google, so the browser redirects me back to warp
  4. Warp shows a pop up "Request to log in failed"

Expected behavior

No response

Screenshots

No response

Operating system

Linux

Operating system and version

SLES 15.4

Shell Version

zsh 5.6

Current Warp version

No response

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

stefanniemeyer commented 8 months ago

Warp version is v0.2024.02.20.08.01.stable_01-1

stefanniemeyer commented 8 months ago

Hi,

the environment variables HTTP_PROXY, HTTPS_PROXY, NO_PROXY and they lowercase counterparts are all set. Otherwise curl would not work and I mentionend in the issue, that curl works fine.

Besides that, warp would log an error like cannot connect to https://securetoken.googleapis.com The proxy acts like a man in the middle. It opens the https connection, searches for any suspicious content to block it. If the content is OK, the connection is secured again but with a self signed certificate of our company.

That is a standard in companies.

The programm that established the connection must now either ignore the certificate or accept it because the root CA that is used to sign these certificate is installed on the machine in /etc/ssl/certs.

Best regards, Stefan

On Donnerstag, Feb. 29, 2024 at 12:15 AM, David Stern @. @.)> wrote:

@stefanniemeyer (https://github.com/stefanniemeyer) Thanks for letting us know!

How is the proxy configured on your machine? I'm curious if there's something we should be querying that we've overlooked.

I believe we support the HTTP_PROXY and HTTPS_PROXY environment variables - could you try setting these to the URL of your proxy server before launching Warp and see if that fixes things?

— Reply to this email directly, view it on GitHub (https://github.com/warpdotdev/Warp/issues/4326#issuecomment-1970076569), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ACZ763DWI52FWVWROTY65ATYV63B7AVCNFSM6AAAAABDYWJQW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZQGA3TMNJWHE). You are receiving this because you were mentioned.Message ID: @.***>

stefanniemeyer commented 8 months ago

I just installed version v0.2024.02.27.08.01.stable_03-1 The error still occurs:

07:59:41 [WARN] Initial access token request to Firebase failed: error sending request for url (https://securetoken.googleapis.com/v1/token?key=AIzaSyBdy3O3S9hrdayLJxJ7mriBR4qgUaUygAs): error trying to connect: invalid peer certificate: UnknownIssuer

Caused by:
    0: error trying to connect: invalid peer certificate: UnknownIssuer
    1: invalid peer certificate: UnknownIssuer
07:59:41 [ERROR] Failed to log in user with error: Unexpected(error sending request for url (https://app.warp.dev/proxy/token?key=AIzaSyBdy3O3S9hrdayLJxJ7mriBR4qgUaUygAs): error trying to connect: invalid peer certificate: UnknownIssuer

Caused by:
    0: error trying to connect: invalid peer certificate: UnknownIssuer
    1: invalid peer certificate: UnknownIssuer)
stefan-niemeyer commented 6 months ago

Hi, still now progress on this bug? Warp should accept the system wide installed certificates or allow to add a path to root certificates.

stefanniemeyer commented 2 months ago

I just downloaded the latest version as AppImage and now it works.