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

SSL Handshake Failed - iOS simulator #2243

Open
yasinkafadar opened this issue Jan 29, 2025 · 15 comments
Open

SSL Handshake Failed - iOS simulator #2243

yasinkafadar opened this issue Jan 29, 2025 · 15 comments
Assignees
Labels
bug Something isn't working ✅ Done Ticket is addressed and fixed.

Comments

@yasinkafadar
Copy link

yasinkafadar commented Jan 29, 2025

Description

I'm getting SSL Handshake Failed error. code=999. I've double checked iOS simulator settings. Proxyman cert has beed already installed and trusted. Proxyman version: 5.14.0

Steps to Reproduce

Current Behavior

Expected Behavior

Environment

Proxyman Version 5.14.0 (51400) | macOS: Version 15.3 (Build 24D60)

  • macOS version: 15.3 (24D60)
@yasinkafadar yasinkafadar added the bug Something isn't working label Jan 29, 2025
@basselalesh
Copy link

seeing the same thing, going back to the previous Proxyman release fixes it

@NghiaTranUIT
Copy link
Member

@yasinkafadar @basselalesh the latest update didn't change any iOS Simulator / Certificate logic. It should work.

Can you open Simulators -> Device Menu -> Erase all Contents and Settings… then, install the certificate to the simulator again?

I just tested with v5.14.0 and iOS 16.2 Simulator, it can decrypt HTTPS from Safari app.

Image

@NghiaTranUIT NghiaTranUIT self-assigned this Jan 30, 2025
@NghiaTranUIT
Copy link
Member

@basselalesh can you verify both certificate are the same: Name, and expiry date:

  • iOS Simulator -> Settings app -> General -> About -> Trust Settings
  • Proxyman app -> Settings… -> Certificate Section

Image

It should work if it's the same certificate

@NghiaTranUIT
Copy link
Member

Tested with a basic SwiftUI, make a HTTPS requests to httpbin.org by using URLSession.

Image

@basselalesh
Copy link

same certificate, erased settings, still doesn't work on the old version

I have the same one side by side with the old version which is intercepting the same responses no problem

@NghiaTranUIT
Copy link
Member

Hm, it's odd. Can you launch a new iOS simulator and try again?

@basselalesh
Copy link

no luck

@yasinkafadar
Copy link
Author

I had tried everything but not working :(

  • Erase all content for simulators (tried most of them)
  • Restart simulators
  • Remove and add cert again and again
  • It was working well just previous version
Image

@yasinkafadar
Copy link
Author

I removed one of them and then it starts working well again :)

@NghiaTranUIT
Copy link
Member

@basselalesh how about your case?

Can you confirm that it's the same certificate?

Proxyman certificate iOS Simulator


@yasinkafadar do you use custom Root Certificate?

@NghiaTranUIT
Copy link
Member

@yasinkafadar @basselalesh I found a bug.

You can fix it by going to the Proxyman -> Certificate menu -> Reset all Certificates. Then re-installing the certificate again.

The problem is: Your Keychain has 2 certificates, which are the same name, so Proxyman gets a wrong one.

@yasinkafadar
Copy link
Author

Thank you for your support. When I removed one of them from keychain, It started working. So I couldn't test it as you described.

@TianyiZhao003
Copy link

Hi @NghiaTranUIT
I'm seeing the same issue (I'm on Version 5.14.0 (51400)) and I have tried all the troubleshooting provided above
I have only 1 certificate.

@TianyiZhao003
Copy link

Error from simulator:

error	16:34:39.037178-0800	com.apple.WebKit.Networking	StrictTrustEvaluate failed
error	16:34:39.046077-0800	com.apple.WebKit.Networking	boringssl_context_handle_fatal_alert(2165) [C1.1.1.1:2][0x138406680] write alert, level: fatal, description: certificate unknown
error	16:34:39.046099-0800	com.apple.WebKit.Networking	boringssl_context_error_print(2155) [C1.1.1.1:2][0x138406680] Error: 4318073472:error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/ssl/handshake.cc:419:
error	16:34:39.046729-0800	com.apple.WebKit.Networking	boringssl_session_handshake_incomplete(241) [C1.1.1.1:2][0x138406680] SSL library error
error	16:34:39.046751-0800	com.apple.WebKit.Networking	boringssl_session_handshake_error_print(44) [C1.1.1.1:2][0x138406680] Error: 4318073472:error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/ssl/handshake.cc:419:
error	16:34:39.046767-0800	com.apple.WebKit.Networking	nw_protocol_boringssl_handshake_negotiate_proceed(780) [C1.1.1.1:2][0x138406680] handshake failed at state 12288: not completed
error	16:34:39.046844-0800	com.apple.WebKit.Networking	nw_endpoint_flow_failed_with_error [C1.1.1.1 127.0.0.1:9090 in_progress socket-flow (satisfied (Path is satisfied), interface: lo0, proxy)] already failing, returning

@NghiaTranUIT
Copy link
Member

@TianyiZhao003 Try the latest build v5.15.0.

Go to Certificate menu -> Reset all certificate -> Then, reinstalling it again on your Mac and simulator.

You can test it by visiting www.google.com on Safari app from your Simulator

@NghiaTranUIT NghiaTranUIT added the ✅ Done Ticket is addressed and fixed. label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ✅ Done Ticket is addressed and fixed.
Projects
None yet
Development

No branches or pull requests

4 participants