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

App启动后,SSL 报错,是还没有支持HTTPS吗? #7

Open
Jack--Ma opened this issue Jun 15, 2020 · 3 comments
Open

App启动后,SSL 报错,是还没有支持HTTPS吗? #7

Jack--Ma opened this issue Jun 15, 2020 · 3 comments

Comments

@Jack--Ma
Copy link

Xcode 跑起来后,控制台输出 SSL 错误,我看Info.plist内没有声明允许HTTP连接的App Transport Security Settings,这个是因为后续有升级 HTTPS 的计划吗?

2020-06-15 17:45:23.697415+0800 PrincessGuide[18987:5815949] Task <80369356-3AD3-4B0F-8D86-1FA111BAA0B1>.<2> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 "发生了SSL错误,无法建立与该服务器的安全连接。" UserInfo={NSErrorFailingURLStringKey=https://redive.estertion.win/last_version_jp.json, NSLocalizedRecoverySuggestion=您仍要连接此服务器吗?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <80369356-3AD3-4B0F-8D86-1FA111BAA0B1>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <80369356-3AD3-4B0F-8D86-1FA111BAA0B1>.<2>"
), NSLocalizedDescription=发生了SSL错误,无法建立与该服务器的安全连接。, NSErrorFailingURLKey=https://redive.estertion.win/last_version_jp.json, NSUnderlyingError=0x2832ecbd0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9816, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9816}}, _kCFStreamErrorCodeKey=-9816}
sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-1200 "发生了SSL错误,无法建立与该服务器的安全连接。" UserInfo={NSErrorFailingURLStringKey=https://redive.estertion.win/last_version_jp.json, NSLocalizedRecoverySuggestion=您仍要连接此服务器吗?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <80369356-3AD3-4B0F-8D86-1FA111BAA0B1>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <80369356-3AD3-4B0F-8D86-1FA111BAA0B1>.<2>"
), NSLocalizedDescription=发生了SSL错误,无法建立与该服务器的安全连接。, NSErrorFailingURLKey=https://redive.estertion.win/last_version_jp.json, NSUnderlyingError=0x2832ecbd0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9816, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9816}}, _kCFStreamErrorCodeKey=-9816})
@superk589
Copy link
Owner

不加 App Transport Security Settings 是因为 App 中所使用的所有资源站链接都是支持 https 的,从你的报错来看,可能是开了代理导致的

@Jack--Ma
Copy link
Author

呃...刚刚又试了下,确定是没连代理,也没开VPN,但还是有这个 error

sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-1200 "发生了SSL错误,无法建立与该服务器的安全连接。" UserInfo={NSErrorFailingURLStringKey=https://redive.estertion.win/last_version_jp.json, NSLocalizedRecoverySuggestion=您仍要连接此服务器吗?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <5F70BAFC-F7BE-4F7A-A2C1-77F760F8B6F3>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <5F70BAFC-F7BE-4F7A-A2C1-77F760F8B6F3>.<2>"
), NSLocalizedDescription=发生了SSL错误,无法建立与该服务器的安全连接。, NSErrorFailingURLKey=https://redive.estertion.win/last_version_jp.json, NSUnderlyingError=0x2811bd8c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9816, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9816}}, _kCFStreamErrorCodeKey=-9816})
2020-06-15 19:06:16.765482+0800 PrincessGuide[19077:5842175] [] tcp_input [C2.1:3] flags=[R] seq=3290789253, ack=0, win=0 state=CLOSED rcv_nxt=3290789253, snd_una=1618708759

@hpsoar
Copy link

hpsoar commented Mar 16, 2021

呃...刚刚又试了下,确定是没连代理,也没开VPN,但还是有这个 error

sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-1200 "发生了SSL错误,无法建立与该服务器的安全连接。" UserInfo={NSErrorFailingURLStringKey=https://redive.estertion.win/last_version_jp.json, NSLocalizedRecoverySuggestion=您仍要连接此服务器吗?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <5F70BAFC-F7BE-4F7A-A2C1-77F760F8B6F3>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <5F70BAFC-F7BE-4F7A-A2C1-77F760F8B6F3>.<2>"
), NSLocalizedDescription=发生了SSL错误,无法建立与该服务器的安全连接。, NSErrorFailingURLKey=https://redive.estertion.win/last_version_jp.json, NSUnderlyingError=0x2811bd8c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9816, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9816}}, _kCFStreamErrorCodeKey=-9816})
2020-06-15 19:06:16.765482+0800 PrincessGuide[19077:5842175] [] tcp_input [C2.1:3] flags=[R] seq=3290789253, ack=0, win=0 state=CLOSED rcv_nxt=3290789253, snd_una=1618708759

请问这个问题解决了吗

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

3 participants