|
Post by Priya Saini on Dec 20, 2017 3:10:17 GMT
I am using Rho::AsyncHttp.get to fetch data from an api hosted on ssl enabled URL. It is working fine on Rhosimulator and is returning SSL connect error on android device (Moto X Play).
Here is the code snippet:
sync_div_response = Rho::AsyncHttp.get( :url => Rho::RhoConfig.divisionUrl, :http_command => "POST", :headers => {"Content-Type" => "application/json"}, :body => "", :ssl_verify_peer => false) if sync_div_response["status"] == 'ok' response_data = sync_div_response["body"] puts "SYNC RESPOSE DATA #{response_data}" data = Division.find(:all) jsondata = Rho::JSON.parse(response_data) if !data.empty? data.each do |dt| dt.destroy end end jsondata.each do |json| a = Division.create(json) a.name = a.title a.language = Rho::RhoConfig.language a.save end else puts "IMPORTANT NOTIFICATION: Error in SYNC Division API response, API response is below:" end Please suggest.
|
|
|
Post by Alex Epifanov on Dec 20, 2017 9:33:52 GMT
Prya, could you get an ADB or app log from your Moto device.
|
|
|
Post by Priya Saini on Dec 22, 2017 6:50:56 GMT
I have a screenshot of the error but i do not see any option to insert image. Error says: Call of "connect" failed: SocketTimeoutException: SSL handshake timed out Net | Operation finished with error 35: SSL connect error CURL NetRequest: METHOD=[POST] URL = [https://url to api] BODY=[] RhodesService | PING network failed.
|
|
|
Post by Alex Epifanov on Dec 22, 2017 14:29:30 GMT
Any other log messages above this? You can increase log verbosity by setting minSeverity=0 in rhoconfig.txt. The reason for SSL failure may be something with certificates error. For instance if your server certificate is not recognized by instaled CAs on device, or if some protocol-specific extensions are requested by server. This information should be available from verbose log.
|
|
|
Post by Priya Saini on Dec 28, 2017 5:28:45 GMT
This is working fine on IOS. And, on Android, it is crashing the app. So, it is difficult to get the logs.
|
|
|
Post by Priya Saini on Dec 29, 2017 9:54:43 GMT
Any suggestion?
|
|
|
Post by Super Admin on Dec 29, 2017 12:29:00 GMT
What is your Rho version?
|
|
|
Post by Priya Saini on Jan 2, 2018 6:17:06 GMT
This is happening on Rhodes 5.0.38. I have upgraded to 5.5.0.55 but i am not able to generate the build to test. I am getting "Error interpreting erb"
On simulators, this is working fine.
|
|
|
Post by Alex Epifanov on Jan 4, 2018 11:36:27 GMT
> Error interpreting erb This may generally mean that something is wrong with app's Ruby code ( syntax error usually ). In RMS6 command line build there is a line and file indication where the error happens. With RMS5.5 you can probably see error highlight in the RhoStudio.
|
|