LimeSurvey RemoteControl API failing in localhost in Macos Sierra - macos

Currently using Version 2.57.1+161205 of Lime Survey.
I recently got a new Macbook Pro laptop and set up my dev environment. Everything seems to be working except when I try to make JSON RPC calls to the LimeSurvey Remotecontrol API!
It fails at getting the session key from Lime Survey (let alone any other call).
It just pauses for a bit then returns an error saying it is unable to connect to the server. Before the Mac, I had a Windows based PC using Vagrant/Homestead - I had no problems accessing the API.
If I open a browser tab and type in http://lime.app/admin/remotecontrol (lime.app is my vhost pointing to my limesurvey installation) -- I get the list of available API functions etc
But when I try to use the functions through the RPC client (I'm using weberhofer/jsonrpcphp), I get the error.
As a test, I tried to get a session key from an online instance of LimeSurvey (its in a test server). That works perfectly.
But when I'm trying to do the same call locally, it fails each time.
Is there something that needs to be set in the Mac to allow this type of call??

I didn't work out if this was just a Mac issue, but I seem to have resolved the problem.
I'm using the JSON RPC client from https://github.com/weberhofer/jsonrpcphp
On a whim I thought I'd try a different client, so I decided to use https://github.com/fguillot/JsonRPC instead.
Strange thing is, it works!! I have no idea why the previous client would no longer work.

I guess this is a mac address issue , right?
I am not a mac user, so I can't help you much.
Nevertheless, I would test if you are pointing to the right server.
As that open the remotecontrol_handle file and add some kind of error_log command in the get_session_key function. That will tell if Lime is ever being contacted or not.

Related

Sudden self signed certificte problem in multiple environments

I am using Laravel and am trying to send email using Mailgun and Laravel's native Mailable class. The emails are generated as a result of submitting one of several forms. I have been developing my features for a couple of days, and have successfully been receiving emails from my local machine (using homestead) throughout this time.
I have uploaded my code to a server, tested the forms, and everything is still good. Additionally, a colleague of mine has downloaded the code and tests are still successful. So in short, 2 local homestead environments and one ubuntu server are all working as expected.
Suddenly, this functionality has stopped working in all three environments. Upon submitting any form, I get the following error message:
GuzzleHttp \ Exception \ RequestException
cURL error 60: SSL certificate problem: self signed certificate in
certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
This has started happening without any changes being made to the code, and is happening on both the local environments and the server - all at the same time.
I have absolutely no idea what could cause this. Is this mail related and something to do with Mailgun? Is this really a certificate issue and maybe something to do with a corporate certificate that allows traffic to leave the network? I am at a loss.
Is anyone able to offer any advice?
Thanks
Well, after a good night's sleep, I returned this morning and found all my forms working again. I have no idea what the problem was, but it seems to be a problem with an external service, not my setup.
Thanks

Faraday::SSLError at /callback handshake alert: unrecognized_name

I am a total newbie which has started learning Ruby so please be patient with me.
I am doing Ruby challenges where I need to run a Ruby file that launches a web server on my computer. First I run this application in command line with a command:
ruby app.rb
Then I paste this URL to my browser and access to my local server:
http://localhost:4567
On this local web page I click the link that gets connected to a web server on Internet where I should get authenticated. Till this moment everything works good, but during the authentication I have got an error. If there wasn’t any error during my authorization, the application would retrieve my profile data from the internet server. This is the error that I am getting:
Faraday::SSLError at /callback
handshake alert: unrecognized_name.
I have been trying to resolve this problem for two days. What I have done:
1) I think this error is connected somehow with Java. I tried to run this application with all versions of Java (6, 7, 8) as people said they had the same problem when they updated to a higher java version. Unfortunately, my version of Ruby doesn’t accept Java 6.
2) Possible solution which was posted here SSL handshake alert: unrecognized_name error since upgrade to Java 1.7.0), the same as here in 20 similar posts in Stackoverflow about "handshake alert: unrecognized_name" error, where it is suggested to set the jsse.enableSNIExtension property. But I couldn’t understand any of those answers, specifically, where to apply this code. Then I found this link https://community.jivesoftware.com/docs/DOC-140837 where it was advised to open the Java Control Panel (I did it through System Preferences Java). I went through the Java tab and clicked View and added “-Djsse.enableSNIExtension=false” to the Runtime Parameters and applied it.
3) Another possible solution was found here Disable SNI Extension for Ruby net/http - Using IP address with SSL/TLS (the answer given by ZebGir) but I didn’t find the file *http.rb in my .rvm or even within my whole system.
Please advise any hint or link with the possible solution for my issue.
My system is Mac OS X El Capitan.
RVM version 1.27.
Java version 1.8.
Have you tried disabling the ssl setting for your the faraday library? Something like:
connection = Faraday.new 'https://example.com', :ssl => false
Also see: https://github.com/lostisland/faraday/wiki/Setting-up-SSL-certificates

"an error occurred in the application server (Not found)" message in Android app

I've been handed a Genexus KB to make an SD app for it. But each time i want to try it i get a "an error occurred in the application server (Not found)" each time i've ran it in a real device (connected in the internal network thorugh) or in an Android Emulator (Andy).
I've setted the KB to point to a local DB stored in my computer and i've tried different ways to try it and it keeps with no luck.
What else should I do?
PS: when i run the web version of it, there's no problem.
Altight people, first of all thanks for the help you gave me!
Secondly #fpanizza that link you gave me was very useful, I could use CatLog with android emulator Andy (after installing Andy Rootkit) and I found out that my app wasn't reaching REST services in the server which leads me to #Franklin, who was right to let me know that it had to do with REST services and I've found out later that i didn't had installed HTTP Activation at one of the WCF Services at the .Net Framework 4.5 Advanced Services, which allowed to reach REST services, and now it worked.
You can try setting the server URL with the IP of your server.
Is probable that the local host is trying to access itself, the android device.
Service URL property: http://wiki.genexus.com/commwiki/servlet/hwikibypageid?21146
Update
I would do what fpanizza suggests on the comment.
Another troubleshooting idea that may bring some light into problem would be to try to access the rest services from a web navigator on the emulator. The idea would be to validate that the emulator/device can "see" the server. Testing outside the app will help understand if the problem is in the app or the server or the connection device - server.
Thank you #Juan.
For better understanding here I enclose the image.
Control Panel > All Control Panel Items > Programs and Features > Turn Windows features on or off

Google API Testing on non 'localhost' named local server

I'm currently running MAMP Pro (osX 10.9.4) with several different virtual servers on my local machine, one for each of my client's projects. I've been trying to connect to the Google API use OAuth and have everything working just fine when 'REDIRECT URIS' is set to:
http://localhost:8888
However, as mentioned I've got several of these servers running,
e.g. 'https://clientname1:8890' or 'https://clientname2:8890'
Whenever I enter those into the API console I just get a 'Whoops' message telling me something has gone wrong Google's end:
"Server Error: Whoops! Our bad."
It seems as though only 'localhost' is allowed via the API for local testing, is there anyway I can set it up so I can test off any of my local servers?
I had to add my localhost to the allowed referrers list to test locally. Without that inclusion, I get 403 Forbidden errors. You probably just need to add clientname1 and clientname2 or clientname1:8890 and clientname2:8890 to the allowed referrers list in the Google Developers Console. Mine's set under public api access, so maybe it's going to be another problem for you depending what API you're using and how you're using it. Hope it helps -

Web API on IIS7.5 Unable to download * from localhost

I'm currently trying to install web api project directly from vs 2013 to my local dev machine, but when I test one of my http get controllers, I get the following:
My url looks like this:
http://localhost:8081/api/Location/States?queryTerm=Ark
When I test this on my local, this url works and I get my json response.
pay no attention to the web config error in the background. If I enter anything invalid, I get an IIS error, so I know I'm hitting the right URL.
Side note: I'm using IE8 for testing.
I found out the solution, and it may be a config thing, but when I made this as an virtual application to a website, this went away, and it gave me a yellow sign of death (which is a good thing). I was able to deduce this to be an oracle issue, where it couldn't find the database connection, and then found out it couldn't resolve tns names.
So I guess Web API can not be hosted by itself on IIS? I haven't looked into it, but it seems this to be the case, unless there needs to be more tweaking involved.
i know too late for response. But i get same error when I try deploy Odata v4 Application in IIS server.
In server , i hit this error as above, i try everything config but nothing change.
At last, i try connect from client and it work.
I recognize that in Client , it download a json file from Server (in case use Odata , it seem like wsdl file in webservice) and API still work well.
For some reason, it cant download in server, but dont worry, it still work.
Hope this helps!

Resources