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

PeopleInSpaceTest not working on iosSimulatorArm64 #239

Open
jafesch opened this issue Aug 4, 2023 · 0 comments
Open

PeopleInSpaceTest not working on iosSimulatorArm64 #239

jafesch opened this issue Aug 4, 2023 · 0 comments

Comments

@jafesch
Copy link

jafesch commented Aug 4, 2023

When I try to execute the testGetPeople() from the PeopleInSpaceTest for iosSimulatorArm64 I get the following error. The test works for android. Do you know why this error appears and is there a way to fix this? I've got the same error in my own project when I use KTOR in tests.

io.ktor.client.engine.darwin.DarwinHttpRequestException: Exception in http request: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “people-in-space-proxy.ew.r.appspot.com” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
    "<cert(0x136025a00) s: *.appspot.com i: GTS CA 1C3>",
    "<cert(0x136026600) s: GTS CA 1C3 i: GTS Root R1>",
    "<cert(0x136027000) s: GTS Root R1 i: GlobalSign Root CA>"
), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://people-in-space-proxy.ew.r.appspot.com/astros.json, NSErrorFailingURLStringKey=https://people-in-space-proxy.ew.r.appspot.com/astros.json, NSUnderlyingError=0x600000f26700 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x60000302c320>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9807, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9807, kCFStreamPropertySSLPeerCertificates=(
    "<cert(0x136025a00) s: *.appspot.com i: GTS CA 1C3>",
    "<cert(0x136026600) s: GTS CA 1C3 i: GTS Root R1>",
    "<cert(0x136027000) s: GTS Root R1 i: GlobalSign Root CA>"
)}}, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <77770E9A-86B7-4535-B76D-7867694C74D8>.<1>"
), _kCFStreamErrorCodeKey=-9807, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <77770E9A-86B7-4535-B76D-7867694C74D8>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x60000302c320>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “people-in-space-proxy.ew.r.appspot.com” which could put your confidential information at risk.}
io.ktor.client.engine.darwin.DarwinHttpRequestException: Exception in http request: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “people-in-space-proxy.ew.r.appspot.com” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
    "<cert(0x136025a00) s: *.appspot.com i: GTS CA 1C3>",
    "<cert(0x136026600) s: GTS CA 1C3 i: GTS Root R1>",
    "<cert(0x136027000) s: GTS Root R1 i: GlobalSign Root CA>"
), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://people-in-space-proxy.ew.r.appspot.com/astros.json, NSErrorFailingURLStringKey=https://people-in-space-proxy.ew.r.appspot.com/astros.json, NSUnderlyingError=0x600000f26700 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x60000302c320>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9807, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9807, kCFStreamPropertySSLPeerCertificates=(
    "<cert(0x136025a00) s: *.appspot.com i: GTS CA 1C3>",
    "<cert(0x136026600) s: GTS CA 1C3 i: GTS Root R1>",
    "<cert(0x136027000) s: GTS Root R1 i: GlobalSign Root CA>"
)}}, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <77770E9A-86B7-4535-B76D-7867694C74D8>.<1>"
), _kCFStreamErrorCodeKey=-9807, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <77770E9A-86B7-4535-B76D-7867694C74D8>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x60000302c320>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “people-in-space-proxy.ew.r.appspot.com” which could put your confidential information at risk.}
	at kotlin.Exception#<init>(/opt/buildAgent/work/f43969c6214a19e7/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:25)
	at io.ktor.utils.io.errors.IOException#<init>(/opt/buildAgent/work/8d547b974a7be21f/ktor-io/posix/src/io/ktor/utils/io/errors/IOException.kt:4)
	at io.ktor.utils.io.errors.IOException#<init>(/opt/buildAgent/work/8d547b974a7be21f/ktor-io/posix/src/io/ktor/utils/io/errors/IOException.kt:5)
	at io.ktor.client.engine.darwin.DarwinHttpRequestException#<init>(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/DarwinUtils.kt:103)
	at io.ktor.client.engine.darwin#handleNSError(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/TimeoutUtils.kt:28)
	at io.ktor.client.engine.darwin.internal.DarwinTaskHandler#complete(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/internal/DarwinTaskHandler.kt:59)
	at io.ktor.client.engine.darwin.KtorNSURLSessionDelegate#objc:URLSession:task:didCompleteWithError:(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/KtorNSURLSessionDelegate.kt:63)
	at <global>._696f2e6b746f723a6b746f722d636c69656e742d64617277696e2f6f70742f6275696c644167656e742f776f726b2f386435343762393734613762653231662f6b746f722d636c69656e742f6b746f722d636c69656e742d64617277696e2f64617277696e2f7372632f696f2f6b746f722f636c69656e742f656e67696e652f64617277696e2f4b746f724e5355524c53657373696f6e44656c65676174652e6b74_knbridge8(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/KtorNSURLSessionDelegate.kt:61)
	at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork(Unknown Source)
	at <global>.__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__(Unknown Source)
	at <global>.-[NSBlockOperation(Unknown Source)
	at <global>.__NSOPERATION_IS_INVOKING_MAIN__(Unknown Source)
	at <global>.-[NSOperation(Unknown Source)
	at <global>.__NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__(Unknown Source)
	at <global>.__NSOQSchedule_f(Unknown Source)
	at <global>._dispatch_block_async_invoke2(Unknown Source)
	at <global>._dispatch_client_callout(Unknown Source)
	at <global>._dispatch_continuation_pop(Unknown Source)
	at <global>._dispatch_async_redirect_invoke(Unknown Source)
	at <global>._dispatch_root_queue_drain(Unknown Source)
	at <global>._dispatch_worker_thread2(Unknown Source)
	at <global>._pthread_wqthread(Unknown Source)
	at <global>.start_wqthread(Unknown Source)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant