Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 6.3.6+231120 (PHP 7.4)
Own server or LimeSurvey hosting: own server, hosted on A2 provider, installed first via softaculous, maintained by paid comfortUpdate
Survey theme/template: default (Fruity)
==================
After the last update today remotecontrol no longer works.
PHP has been 7.4 for a while on my server.
I use R for reports and data analysis. Until today limer worked well, after the update I get error on authentication:
> skey <- get_session_key()
Error: Argument 'txt' must be a JSON string, URL or file.
The options are correct, the same code worked yesterday. I had this type of error once before - first was
resolved by updating github cloudyr/limer to the latest version. Second time that was when hosting providers systems thought my ip was suspicious and was asking to solve captcha for login. After successful login to admin pages I was able to do remotecontrol again.
This time I get the error and no idea how to troubleshoot. Remotecontrol is very important to us, an idea how to work on this would be much appreciated.
I played around with function from migliorati and came to conclusion some things work. But it seems that the response coming back from limesurvey might not be JSON or is an empty response altogether for example you do the usual limer options setup and then:
body.json = list(method = "get_session_key",
id = 1,
params = list(username = getOption('lime_username'),
password = getOption('lime_password')))
now you have the json rpc request (I think); then you give that request to httr:OST
POST(getOption('lime_api'),
content_type_json(),
body = jsonlite::toJSON(body.json,
auto_unbox = TRUE))
you get a response similar to :Response [
lime.server.yours/index.php/admin/remotecontrol
]
Date: 2023-11-20 19:21
Status: 500
Content-Type: text/html; charset=UTF-8
Size: 20.8 kB
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
">
<html xmlns="
www.w3.org/1999/xhtml
" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>ArgumentCountError</title>
<style type="text/css">
/*<![CDATA[*/
say instead of printing you save it to an object RRR, then we can see that it does not seem to be a JSON response at all through
jsonlite::validate(RRR)Error in jsonlite::validate(content(RR, encoding = "utf-8")) :
is.character(txt) is not TRUE