jacobrask / styledocco

Automatically generate a style guide from your stylesheets.
http://jacobrask.github.com/styledocco/
MIT License
1.07k stars 118 forks source link

Preview iframe can't render in Chrome 33 #111

Closed Layzie closed 10 years ago

Layzie commented 10 years ago

I'm using Chrome 32.0.1700.77 (Official Build 244503). Iframe is blocked cause of CORS. The error message is below.

Uncaught SecurityError: Blocked a frame with origin "http://localhost:10080" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "data". Protocols must match.

Above message has occured in my local server, but styledocco's demo site has same error.

styledocco

I think this problem is related #100.

theleanship commented 10 years ago

I'm experiencing this as well, have only been able to get round it by disabling the same origin policy in chrome. Anyone else have work arounds?

chrisvdp commented 10 years ago

I am also getting it in Chrome 32 and Chrome Canary, but not Safari or Firefox, on OS X 10.9.1

theleanship commented 10 years ago

I applied the changes of this commit https://github.com/jacobrask/styledocco/commit/9e01c8cb4f8d7dc0565783929516a58721e1815d from #100 and it seems to fix the problem. This change doesn't seem to have been released yet though.

Layzie commented 10 years ago

@isnotahippy Oh, I got it. I misunderstood fixed commit had been released already.

Thank you.

stefanjudis commented 10 years ago

Hey guys, any news on that one?

Not working anymore in Chrome + Chrome Canary since today.

Fix by @isnotahippy does not work.

stefanjudis commented 10 years ago

Just for more information, the exception in console.

Uncaught SecurityError: Blocked a frame with origin "http://br.yves.dev" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "data". Protocols must match.

got exception when trying to postMessage from http://br.yves.dev/styleguide/components-buttons.html to data://text/html, 
DOMException {message: "Invalid target origin 'data://text/html,' in a call to 'postMessage'.", name: "SyntaxError", code: 12, stack: "Error: Invalid target origin 'data://text/html,' i…mb/2.8.2_0/generated/extension_properties.js:45:3", INDEX_SIZE_ERR: 1…}
Layzie commented 10 years ago

@stefanjudis

I'm work well using 9e01c8c.

Can you try to put below code in your package.json?

"devDependencies": {
  "styledocco": "git://github.com/jacobrask/styledocco.git"
}

Then npm install again.

marrs commented 10 years ago

I've published a new release with the latest fixes in. I'm closing the ticket for now but please re-open if you are still having issues, and provide details about your browser and its version number.

Layzie commented 10 years ago

@marrs Thanks for release.:+1:

SN81 commented 9 years ago

Unfortunable the bug isn't fixed yet. Got the same problem with chrome version 38.0.2125.104 Can anybody help?

gorioli commented 9 years ago

Having the same bug after browsing StyleDocco examples at GitHub using Chrome Version 39.0.2171.95. The message I see on my Console is:

Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://jacobrask.github.io" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "data". Protocols must match.