Cannot get non-ssl json data to work


#1

I am trying to load data from http://localhost:8080/XXXX

however, I am always getting

2019-12-16 08:00:05.129 React Studio[61142:3299371] JS http client request completed: status 0, connectionerr Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9858, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7fde93fa6cd0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://localhost:8080/XXXX, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9858, _kCFStreamPropertySSLClientCertificateState=0, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://localhost:8080/XXXX, _kCFStreamErrorCodeKey=-9858}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=http://localhost:8080/XXXX, NSErrorFailingURLStringKey=http://localhost:8080/XXXX, _kCFStreamErrorDomainKey=3}, data 0x0 (0)
2019-12-16 08:00:05.130 React Studio[61142:3299371] Logged from JS:  error during loading{}
2019-12-16 08:00:05.130 React Studio[61142:3299371] Logged from JS:  calling web service read data cb, proxy: 0
2019-12-16 08:00:05.130 React Studio[61142:3294843] -[NVSDataSheetViewController scriptedWebService:didReadDataSheetWithError:rowData:] -- error Error Domain=JSErrorDomain Code=1 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.} -- data count: 0
2019-1

I also changed my server to serve data with a self signed cert, that did change the error message but it still fails

    2019-12-16 08:01:54.525 React Studio[61142:3301581] JS http client request completed: status 0, connectionerr Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fde95195930>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=(
        "<cert(0x7fde96143800) s: XXX i: XXX>"
    ), NSUnderlyingError=0x7fde43db4190 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://localhost:8443/XXXX, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, kCFStreamPropertySSLPeerCertificates=(
        "<cert(0x7fde96143800) s: XXX i: XXX>"
    ), _kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7fde95195930>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://localhost:8443/XXXX, _kCFStreamErrorCodeKey=-9802}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://localhost:8443/XXXX, NSErrorFailingURLStringKey=https://localhost:8443/XXXX, NSErrorClientCertificateStateKey=0}, data 0x0 (0)

#2

Check to make sure this is not your issue:


#3

nope, I have set insecure to “true”, still getting this error.


#4

so I configure my http://localhost:8080/XXX url in the data plugin settings, have “insecure HTTP” checked.
Then I press “reload data from server”


and get the error message.

I am on the latest version (Version 1.7.4 (366)) on Mac OS Catalina.

I also tried with a self signed cert without success. Is this something to do with Mac OS secure transport requirements?


#5

You need to generate a certificate for you server. Google can probably help you how to do it with your exact server configuration. E.g. here are a couple of articles for node+express:

https://hackernoon.com/set-up-ssl-in-nodejs-and-express-using-openssl-f2529eab5bb


#6

I tried that too as stated in the initial post. Didn’t work either.