It's all about the answers!

Ask a question

How to resolve issue with OSLC workshop, getting error "Javascript is either disabled or not available in your Browser"


Titas Dutta (1514) | asked Jan 15 '18, 3:29 a.m.
edited Jan 15 '18, 3:30 a.m.

I am going through the oslc workshop, for "whoami" service I got the user and while trying with the same user with below url as mentioned in oslc workshop I am getting a html response instead of xml response saying "Javascript is either disabled or not available in your Browser". 


URL: https://xxxx:yyyy/jts/users/admin

Response: 

 </head>
    <body class="claro">
        <noscript>
            <div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div>
        </noscript>
        <div id="net-jazz-ajax-InitialLoadMessage">Loading...</div>
        <div id="net-jazz-ajax-WorkbenchRoot"></div>
        <script type="text/javascript">
djConfig = {
isDebug: false,
usePlainJson: true,
baseUrl: "/jts/web/dojo/",
locale: "en-us",
localizationComplete: true
};
/null/
net = {jazz: {ajax: {}}};
net.jazz.ajax._contextRoot = "/jts";
net.jazz.ajax._appPath = "/jts/auth/authrequired";
net.jazz.ajax._webuiPrefix = "/web/";
</script>
        <script type="text/javascript" src="/jts/web/_js/?include=J~&etag=Hv2vIC3eM0p_en_US&_proxyURL=%2Fjts&ss=MKn89&locale=en-us"></script>
        <script type="text/javascript">
require("dojo/main").getObject('jazz.core.loader', true)._serverStartup="MKn89";
require("dojo/main").getObject('jazz.core.loader',true)._loaded=["J"];
</script>
        <script type="text/javascript">
/ 
            <![CDATA[ /
dojo.addOnLoad( function() {
net.jazz.ajax.ui.PlatformUI.createAndRunWorkbench("net.jazz.web.app.authrequired");
});
/ ]]> /
        </script>
    </body>
</html>

I am getting proper response only for rootservices(https://xxxx:yyyy/jts/rootservices)

For all other services I am getting same html response with error "Javascript is either disabled or not available in your Browser" after trying with removing cache(mentioned in oslc document) facing same issue.

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Jan 15 '18, 3:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 15 '18, 5:17 a.m.

This is the symptom for getting an HTML page (with javascript) back instead of an XML/JSON response body.  The response HTML has JavaScript and the REST Client can not interpret that.

The typical reasons are:

  1. Wrong URI
  2. Missing or wrong  headers
  3. Missing or wrong login credentials in the header
  4. Not following the workshop correctly and e.g. skipping the login to the application before doing these steps

Titas Dutta selected this answer as the correct answer

Comments
Titas Dutta commented Jan 15 '18, 4:44 a.m.

 Hi Ralph,


I followed the steps mentioned in OSLC workshop document,

1. URI - https://xxxx:yyyy/jts/users/admin
2. Request Header- accept : application/rdf+xml
3. As per document no login credentials required in header
4. Already logged in to the application before hitting through postman/restclient.

I checked all these 4 reasons but facing same issue.


Ralph Schoon commented Jan 15 '18, 5:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

No, you are apparently not. I just followed the steps (you fail to say which steps, so I did up to Lab 2.2 page 34 and all the steps worked for me.

And as I said 2.1. Step __5. requires you to login. If you don't or use a different REST client in a different application the Login or redirect web page will come up and cause your error.

The HTML you show indicates that.
net.jazz.ajax._appPath = "/jts/auth/authrequired";


Ralph Schoon commented Jan 15 '18, 5:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If I log out and post again, I get exactly your result.


Titas Dutta commented Jan 16 '18, 12:35 a.m.

Thanks for your answer Ralph..after reinstalling REST client it's working fine, I am getting expected result now.


Ralph Schoon commented Jan 16 '18, 3:27 a.m. | edited Jan 16 '18, 3:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Good to Know. I started to use POSTMAN (based on a Crome app) last time I did REST, because it saves requests. I liked it better than the Firefox REST Client.

One other answer



permanent link
Matthias Buettgen (23612131) | answered Jan 15 '18, 9:40 a.m.

You need to authenticate first in CLM in order to share the cookie with the REST client.

I also recognized that's necessary to enable 3rd party cookies in Firefox.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.