Page reload loop when recording URL using WTF
kenrussell opened this issue · comments
While trying to diagnose a significant graphics driver bug http://crbug.com/696187 using WTF, I enabled recording for the associated URL:
https://floooh.github.io/oryol-webgl2/asmjs/MultipleRenderTarget.html
Doing so causes the browser to go into an infinite loop reloading the page.
Maybe this is caused by the fact that the page is using WebGL 2.0 rather than WebGL 1.0, and WTF probably needs to be extended to support the new API. Still, it should fail more gracefully.
CC'ing @spite as he found similar problems trying to debug other WebGL content; not sure whether that was for WebGL 1.0 or 2.0.
Yes, happens on WebGL 1 content, too.
It also happens with an incognito session with no extensions, not the first time, but the second time around: starting a new incognito session, recoding and stopping doesn't loop; but starting a new recording in the same browser, it loops.
Could it be related to a cookie or localStorage stored value?
Yes the infinite reload thing is super annoying and it's been a problem for a while. Something changed security-wise in chrome at some point which affects how we load our script into the page.
If you're injecting in an https page, you need to click the little "load unsafe scripts" badge in the url bar to proceed, but the reload makes that impossible. One hacky way to get around this is to open the devtools and hit the "pause" button - this will give you a chance to enable the script loading, and then you can "play" to continue loading.
As far as webgl2 - currently we just intercept getContext(webgl|experimental-webgl), so we'll just silently ignore any webgl2 action.
I added an issue to track webgl2 support: #593
Thanks @rsturgell for the explanation. Is there some other way you can inject your needed scripts into the page -- maybe eval'ing them -- so that it doesn't think the https page is loading a non-https script? I'm pretty sure @spite has done similar tricks for his DevTools extensions.
Can we host the pages it needs to load on an https server?