Explore data with tworavens generate invalid json error

23 views
Skip to first unread message

Michel Bamouni

unread,
Oct 8, 2018, 8:27:47 AM10/8/18
to Dataverse Users Community
Hi,

I successfully install tworavens but when i clic on "explore" button in dataverse, in tworavens gui, I get the message "Error: Could not parse incoming JSON."I need to click on "Ok" to get the plots display.
When I view the detail call stack, it's seems that the call {my dataverse publique url}/custom/dataapp fails and return the result :

"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
 root@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
"

For information, after installing tworavens, I set "dataurl" and "rappurl" with my dataverse publique url.

Is it a way to solve this proble?

Best regards,

Michel

Michel Bamouni

unread,
Oct 8, 2018, 9:02:47 AM10/8/18
to Dataverse Users Community
I also see that this call vocation is to get sessionId. So can I comment it if there is no solution?

Michel

Don Sizemore

unread,
Oct 8, 2018, 9:15:37 AM10/8/18
to dataverse...@googlegroups.com
Hello,

For a 500 error you definitely want to check the server log.
Time was, TwoRavens couldn't view unpublished/restricted files but I think you can now if you pass an API token.
Is this dataset public, and would you be willing to share a link, privately if you like?

Donald

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/cc15f01f-1b13-4574-a601-f52da9a1e53a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michel Bamouni

unread,
Oct 8, 2018, 9:50:00 AM10/8/18
to Dataverse Users Community
Hi Donald,

I get this error systemacally on any published dataset. I set the error 500 in firefox debug mode. I don't see anything on glassfish server log.
What is this purpose of the call {my dataverse publique url}/custom/dataapp in dataexplore/app_ddi.js file in tworavens

it's this function :
 // Make the actual CORS request.
1958 function makeCorsRequest(url,btn,callback, warningcallback, jsonstring) {
1959     var xhr = createCORSRequest('POST', url);
1960     if (!xhr) {
1961         alert('CORS not supported');
1962         return;
1963     }
1964     // Response handlers for asynchronous load
1965     // onload or onreadystatechange?
1966
1967     xhr.onload = function() {
1968
1969       var text = xhr.responseText;
1970       console.log("text ", text);
1971
1972         try {
1973             var json = JSON.parse(text);   // should wrap in try / catch
1974             var names = Object.keys(json);
1975         }
1976         catch(err) {
1977             estimateLadda.stop();
1978             selectLadda.stop();
1979             console.log(err);
1980             alert('Error: Could not parse incoming JSON.');
1981         }
1982
1983       if (names[0] == "warning"){
1984         warningcallback(btn);
1985         alert("Warning: " + json.warning);
1986       }else{
1987         callback(btn, json);
1988       }
1989     }

On the left side , the line number in js file.

regards,

Michel
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.

Michel Bamouni

unread,
Oct 19, 2018, 7:57:15 AM10/19/18
to Dataverse Users Community
Hi,

I solved my problem.
This error is due to an invalid configuration of custom directory path in R files.

regards,

Michel

Philip Durbin

unread,
Oct 19, 2018, 8:16:08 AM10/19/18
to dataverse...@googlegroups.com
I'm glad you figured it out! Thanks for letting us know.

To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.

To post to this group, send email to dataverse...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages