- Posts: 60
- Thank you received: 7
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
remotecontrol error
- r0bis
- Topic Author
- Offline
- Senior Member
Less
More
5 months 6 days ago - 5 months 6 days ago #252414
by r0bis
r0berts
remotecontrol error was created by r0bis
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
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
r0berts
Last edit: 5 months 6 days ago by r0bis.
Please Log in to join the conversation.
- r0bis
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 60
- Thank you received: 7
5 months 5 days ago - 5 months 5 days ago #252443
by r0bis
r0berts
Replied by r0bis on topic remotecontrol error
Same issue as the continuation of the older thread
forums.limesurvey.org/forum/installation...-8-1?start=12#252424
Bug has been reported: bugs.limesurvey.org/view.php?id=19258
6 hours later it has been solved as well, thanks to @mfavetti and @JanE
@mfavetti made a PR for limer that should fix this issue.
Using that PR I created a new fork of limer with that PR
You can test it by running
CODE:devtools::install_github("Jan-E/limer", force = TRUE)
See github.com/cloudyr/limer/pull/66 and github.com/Jan-E/limer
Bug has been reported: bugs.limesurvey.org/view.php?id=19258
6 hours later it has been solved as well, thanks to @mfavetti and @JanE
@mfavetti made a PR for limer that should fix this issue.
Using that PR I created a new fork of limer with that PR
You can test it by running
CODE:devtools::install_github("Jan-E/limer", force = TRUE)
See github.com/cloudyr/limer/pull/66 and github.com/Jan-E/limer
r0berts
Last edit: 5 months 5 days ago by r0bis.
Please Log in to join the conversation.