Gabriel Dausque Posted January 19, 2021 Share Posted January 19, 2021 Hello using OpenId for authentication with spotfire 10.10 using javascript Api for a mashup, I'm having trouble with authentication with the same code that is working for 10.3 : with 10.3.6 when trying to open a document : - If I'm not authenticate, the createlogin handler is called, the button to call the login window is created - when clicking, authentication window appears - when login is done, window is closing and the onReady handler is called With 10.10 and openid : - If I'm not authenticate, the createlogin handler is called, the button to call the login window is created - when clicking, authentication window appears - authentication is running with sso, BUT the login window stays on landing page and will never close until I close it manually - the readyHandler is never called The only way for me to have the document opening in 10.10 is to poll to see if the app object has been created, and if it is not, to retry to open the document. Can you help with this issue Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted January 20, 2021 Share Posted January 20, 2021 To troubleshoot, can you enable Developer Tools in both the main browser where you open the mashup file and also in the login popup dialog. Check for any errors in the console tab here that might help troubleshoot Link to comment Share on other sites More sharing options...
Gabriel Dausque Posted January 21, 2021 Author Share Posted January 21, 2021 Here is the only message I've received in the mashup window : Failed to load resource: the server responded with a status of 401 () for this script : /spotfire/wp/js-api/initiate:1 Nothing in the login window, but as it is a Sso process, it is too fast for me to open the console window before the authentication process ... My question is why after sso process the onReadyHandler is never called Link to comment Share on other sites More sharing options...
Gabriel Dausque Posted January 21, 2021 Author Share Posted January 21, 2021 After debugging a little bit the loader.js, here is my understanding of the issue : - during logging, process, loader.js wait for a window message to call the ending function : function s(o, l) { window.removeEventListener("message", f), C.parentNode.removeChild©, v && v.close(), m && m.parentNode.removeChild(m); var p = document.createElement("script"); if (((p.type = "text/javascript"), p.appendChild(document.createTextNode(o)), document.head.appendChild(p), "function" == typeof spotfire.webPlayer.Application)) { var d = new spotfire.webPlayer.Customization(); if (i) for (var h in i) d.hasOwnProperty(h) && (d[h] = i[h]); a(l, new spotfire.webPlayer.Application(g + "/spotfire/wp/", d, c, r, n)); var s = t.shift(); s s() : (e = !1); } else a({ status: "INTERNAL_ERROR", message: "JavaScript API does not contain a definition of 'spotfire.webPlayer.Application'." }); }which is in charge of calling the onready handler. In my case, after authentication, no window message are sent from the authentication window to the caller window. I think it is related to the fact that after authentication, I'm still on the landing page, which is quite surprising. EDIT : It seems that the authentication process does not redirect us tohttps:///spotfire/js-api/proxy.html as it seems to do it in spotfire 10.3.X Can you help on why the authentication process seems to act as if I have only opened the Spotfire web interface In attachment you will find the simplest code example I've used to reproduce the issue. and also a small video showing the behavior Link to comment Share on other sites More sharing options...
Gabriel Dausque Posted January 21, 2021 Author Share Posted January 21, 2021 Done. No message at all in both devtool console. I ve added new element, test code, and also a vdeo of the symptom. I ve tested after upgrading to 10.10.3 (I was in 10.10.0 juste before) : behavior still the same. Link to comment Share on other sites More sharing options...
Gabriel Dausque Posted January 25, 2021 Author Share Posted January 25, 2021 Hello, I have another information that is quite important for this issue : The issue does'nt appears if THERE IS NO WHITE SPACE IN DOCUMENT PATH !! Which is quite surprising. If I use a file with no white space in library path, the login process is working well. I think this is a regression in spotfire code : as I already says, the login process is working fine in 10.3.6, but If I have white space in document path Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now