Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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.

0 votes


Accepted answer

Permanent link

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

0 votes

Comments

 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.

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";

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

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

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

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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jan 15 '18, 3:29 a.m.

Question was seen: 4,279 times

Last updated: Jan 16 '18, 3:27 a.m.

Confirmation Cancel Confirm