cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1378
Views
25
Helpful
7
Replies

UpdateCallVariable Gadget 401 Unauthorized

Slurpas84
Spotlight
Spotlight

We are facing issues  with the UpdateCallVariable on version 11.6(2) ES06 in one of our clusters.

Nothing happends when we press the "Update"-Button and in the develope tools console we get an error:

POST https://FQDN:8445/gadgets/makeRequest 401 (Unauthorized)

We have another cluster that runs the same exact version, but strangly enough the javascript library seems to be different between the clusters (according to https://FQDN:8445/desktop/assets/js/finesse.js

Working Cluster: 11.6(2)

Non-Working Cluster: 11.0(1)

 

Anyone else that had similar issues?

1 Accepted Solution

Accepted Solutions

Hi,

 

Interesting that you it is working with 11.6(2) in production and not in the lab. Are they the exact same version number? (In case you installed a ES on one and not the other)

 


Can you help me, how i chech the output of _util.getAuthHeaderString(finesse.gadget.Config)?

In your gadget code, just log the value of the output:

clientLogs.log("updateCallVariable(): URL is: " + url);
clientLogs.log("Authentication string:" + _util.getAuthHeaderString(finesse.gadget.Config));

// Build the content body var contentBody = { "Dialog" : { "requestedAction": finesse.restservices.Dialog.Actions.UPDATE_CALL_DATA, "mediaProperties": { "callvariables": { "CallVariable": { "name": name, "value": value } } } } };

One other thought was, have you tried to use incognito/private mode? What browser are you using?

 

Thanx,

Denise

View solution in original post

7 Replies 7

dekwan
Cisco Employee
Cisco Employee

Hi,

 

When you say "We have another cluster that runs the same exact version", do you mean the exact same version of the gadget code? Did you change the code that passes the authentication by any chance? The original code had it as: 

authorization: _util.getAuthHeaderString(finesse.gadget.Config)
 
Since your clusters are on different versions of Finesse, the finesse.js will be different because newer features are added. But, the gadget code should not need to change between 11.0 and 11.6.
 
Also, you said that the error on the browser is:
POST https://FQDN:8445/gadgets/makeRequest 401 (Unauthorized)
 
Did it actually say FQDN or was this just masking the real value for security.
 
Thanx,
Denise

Hi Denise,

 

Thanks alot for your answer.

FQDN is just how i masked our real host for security reasons.

If i browser to the FQDN and paths to UpdateCallVariableDataSampleGadget.js the current config looks the same on both clusters:

            makeRequest(url, {
                method: 'PUT',
                authorization: _util.getAuthHeaderString(finesse.gadget.Config),
                contentType: 'application/xml',
                content: _util.json2xml(contentBody),
            }

 It might be my browser that cashed the versions of the finesse.js since after a finesse tomcat-restart and a cache clear in the browsers, they both show up as 11.6(2) now. Though i still get the 401 unauthorized :/.

 

Any/all help is appretiated!

Hi,

 

By any chance are you on windows 7 or 10? I found an old post that is similar with the 401: https://community.cisco.com/t5/contact-center/finesse-gadget-on-windows-7-64bit-gets-401-error/td-p/3582989

 

If you think it could be a cache problem, can you try to use the nocache option: https://developer.cisco.com/docs/finesse/#!gadget-caching

 

Do other custom gadgets work on the 11.6(2) system? I want to see if it is specific to this gadget or an overall system issue.

 

Another thing that I can think of to try is to download the finesse.js file from the 11.6(2) server, add it to your files and change the path of the finesse.js to point to that one instead of the one on the server.

 

Last thing I can think of is to make sure that _util.getAuthHeaderString(finesse.gadget.Config) is giving you the expected string. So maybe print out this value to see that it is correct.

 

Thanx,

Denise

Hi Denise,

 

It seems to be about the same issue, though I use the same PC(Windows 10) against both the lab and the production-system that both use 11.6(2) with different results.

I also tried the tomcat restart and ?nocache with no change in results.

 

Everything works in the production-system. The reason why we put all the effort into get this to work in our lab for 11.6(2) is so we can upgrade the lab to 12.5 and verify so the gadgets and finesse acts as expected.

 

Ill verify with the working finesse.js later this weekend or on monday, thanks!

 

Can you help me, how i chech the output of _util.getAuthHeaderString(finesse.gadget.Config)?

 

(If you want, you are very welcome to a webex session for a sanity check)

Hi,

 

Interesting that you it is working with 11.6(2) in production and not in the lab. Are they the exact same version number? (In case you installed a ES on one and not the other)

 


Can you help me, how i chech the output of _util.getAuthHeaderString(finesse.gadget.Config)?

In your gadget code, just log the value of the output:

clientLogs.log("updateCallVariable(): URL is: " + url);
clientLogs.log("Authentication string:" + _util.getAuthHeaderString(finesse.gadget.Config));

// Build the content body var contentBody = { "Dialog" : { "requestedAction": finesse.restservices.Dialog.Actions.UPDATE_CALL_DATA, "mediaProperties": { "callvariables": { "CallVariable": { "name": name, "value": value } } } } };

One other thought was, have you tried to use incognito/private mode? What browser are you using?

 

Thanx,

Denise

Hi Denise,

 

I did alot of further investigations with the authentication-strings you gave me and it seemd to look the same.

I also tried multiple times with the ?nocache but finally i also tried the incognito-mode again and this time it worked there aswell, so I went into the browser and cleared the cache "since my account was started" according to Chrome.

 

All my changes to the page and gadgets worked, but apparently it still needed a clear cache to get it working.

Thanks alot for your help!

Hi,

 

I'm glad that you were able to figure it out. I was starting to run out of ideas I hate it when the browser refuses to clear/refresh the cache. 

 

Thanx,

Denise