[
https://issues.apache.org/jira/browse/SHINDIG-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697217#action_12697217
]
John Hjelmstad commented on SHINDIG-158:
----------------------------------------
Hi-
I don't have a repro container config set up for this right now, and I'm not a
huge expert on this particular problem, but I'll try to help.
This sounds like the "bfcache" issue, which Googlers have run into on a few
occasions... though it's odd that server-side URLs would be cached in a state
that somehow makes the setAuthToken call in the container not match the
#rpctoken parameter in the IFRAME URL. When rendering the gadget with &debug=1,
can you (using Firebug perhaps) see what exactly the container thinks the token
should be, and what the gadget thinks the token is? Ie. "on initial render,
token is A. this works. When hitting back button, token is [A|B] on the
container and [A|B] on the gadget".
Of particular interest: does the token become null/undefined? There was a
recent issue discovered with rpc.js (though this bug has been around for a long
time) wherein authTokens set that are numbers would fail to match the token
found on the query string due to lack of type coercion. I just submitted a fix
for this.
One technique I've seen to bust the bfcache is actually (and ironically) to
generate IFRAMEs in JS, generating the token similarly. When generating the
IFRAME, first set iframe.src = "about:blank", then set iframe.src = gadgetUrl.
I'm not sure why exactly this works, but it may be worth experimenting.
Short of figuring something out through the above analysis, I'd like to repro
this myself and see if there's some fix in rpc.js itself (actually, even if
there's a workaround it'd be great for rpc.js to somehow be resilient to this,
if the browser quirk in question allows it). Do you have a simple repro case?
Does the simple/sample container exhibit this behavior for you on the affected
browsers?
> Reloading when using postMessage causes RPC errors
> --------------------------------------------------
>
> Key: SHINDIG-158
> URL: https://issues.apache.org/jira/browse/SHINDIG-158
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Environment: Firefox 3.0, Safari 3.1
> Reporter: Paul Lindner
>
> 1) View sample container page
> 2) Before the gadget has rendered press reload (if using Firefox 3.0), For
> Safari just reload
> 3) rpc token errors will be observed, and dynamic-height etc will fail.
> I added some debugging, here's Safari's output
> setting authtoken to '1622832586
> http://mirth.inuus.com:8080/gadgets/files/samplecontainer/samplecontainer.html?
> BEWARE: permissive.js loaded
> http://mirth.inuus.com:8080/gadgets/ifr?url=http%3A%2F%2Fmirth.inuus.com%3A8080%2Fgadgets%2Ffiles%2Fsamplecontainer%2Fexamples%2FSocialHelloWorld.xml&synd=default&mid=0&nocache=1&country=ALL&lang=ALL&view=default&parent=http%3A%2F%2Fmirth.inuus.com%3A8080#rpctoken=983258013&st=john.doe:john.doe:samplecontainerapp:shindig
> Error: Invalid auth token: '983258013' does not match '1622832586'
> http://mirth.inuus.com:8080/gadgets/js/rpc.js?c=1&debug=1 (line 571)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.