I'm facing following issue. When in my canvas app i'm trying to use some openCTI methods, for example
And nothing happens. Callback never called. After some debugging and logging, I found that post message is failed in
CanvasProxy.js. It's writes following log string
CanvasProxy.js:20 source origin's function returning false http://www.mydomain.com interactionApi/method=getPageInfo_1&nonce=someNonce&apiVersion=32
I found that it tests string
for being JSON (with method
appearsJson). And this is obviously not JSON.
Why is this happening? Is there some problems with settings or API calls?
It is usual salesforce sales mode (not console)
Any help is appreciated.
Addition 1: As my discoveries show - this is a problem of 2 canvas iframes (canvas-outer and canvas-inner). Interaction.js sends postMessages from inner to outer frame, but shoul post it from inner to top frame, so if anybody knows how to get rid of 2 frames and have my app in 1 iframe - please let me know.