# Uncaught Error: SECURITY_ERR: DOM Exception 18 #374

Closed
opened this issue Jan 13, 2013 · 18 comments

Projects
None yet
5 participants

### adius commented Jan 13, 2013

 I'm really confused right now. I'm hosting a website with github-pages and I used to work on the website locally (Apache, URL: localhost/~user/dir/ ) And now I wanted to update it but it didn't render the MathJax anymore and threw this error which doesn't help me at all. On github-pages however the exactly same commit works without any problems. Has anybody an idea how this could happen?
Author

### adius commented Jan 14, 2013

 Seems to occur only in Chrome! Firefox and Safari work as expected.
Member

### pkra commented Jan 14, 2013

 Which version of Chrome? (and which OS while you're at it ;) )
Author

### adius commented Jan 14, 2013

 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17
Member

### pkra commented Jan 14, 2013

 Thanks. Do you have a minimal example by any chance?
Author

### adius commented Jan 14, 2013

 http://adriansieber.com/mathematik_1/ Well, that's not really minimal but it has a pretty simple structure. For me it looks like MathJax doesn't work on localhost at all right now.
Member

### pkra commented Jan 14, 2013

 Thanks. We'll look into it. (PS: Sehr nette Uebungsaufgaben. Hast Du mal versucht, jsxgraph oder xyjax fuer die Diagramme zu benutzen?)
Author

### adius commented Jan 14, 2013

 😄 Ich hab stundenlang nach einem Programm für die Diagramme gesucht, aber irgendwie nichts sinnvolles gefunden. D3.js mit force-directed layout schien mir dann doch ein bisschen ein overkill zu sein :-P Am liebsten waere mir etwas mit der funktionalitaet von graphviz. Das Xy-jax sah aber auf jeden fall schon mal interessant aus! Das muss ich mir mal noch genauer anschauen. Danke!
Member

### pkra commented Jan 14, 2013

 :) Na ja, waere natuerlich sehr huebsch. Es braeuchte endlich mal gute macros um bekannte LaTeX packete in d3.js oder three.js code konvertieren...

### gaurav-sanghani commented Jan 17, 2013

 Hey, I've gotten this issue as well, although in different context. The issue crops up in Chrome when the user has disabled 3rd party cookies. Here's the jsfiddle - http://jsfiddle.net/fVNJE/. Here's the line of code that throws the error. if (window.chrome && typeof (window.sessionStorage) !== "undefined" && h.nodeName === "STYLE") { Seems to be occurring at line 676 once the minified MathJax.js file, v2.1, is expanded in Chrome.
Contributor

### fred-wang commented Jan 31, 2013

 UndschuldogudDeutschvorstarichnicht... I have been able to reproduce the issue as gaurav-sanghani indicates and find the same location. However, then the error happens everywhere, not only local website. @adius just to see if that's the same error, can you please check what options are set for you in chrome://settings/content and also expand the error message in the javascript console (try "http://cdn.mathjax.org/mathjax/latest/unpacked/MathJax.js?config=TeX-MML-AM_HTMLorMML to get a relevant line number).
Member

### pkra commented Feb 7, 2013

 @adius could you help us track this down?
Author

### adius commented Feb 7, 2013

 Sry, I'm really bussy right now. I'll try to find some time on the weekend!
Member

### pkra commented Feb 7, 2013

 No problem at all -- thanks for helping us! - sent via Hojoki
Author

### adius commented Mar 29, 2013

 Ok, problem solved! I blocked cookies for localhost. After turning it on it works just like expected! Thanks for help! …but actually it should also work with blocked cookies, right? I won't close the issue.
Member

### dpvc commented Mar 29, 2013

 @adius, thanks for the update. Yes, you are right, it should still work even with cookies disabled. We need to add try {...} catch () {...} around the setting of the cookie. Thanks for leaving it open.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 17, 2013

 Trap errors while saving cookies (and go on silently). Resolves issue m… 
…athjax#374.
 436595a 
Member

### dpvc commented Apr 17, 2013

 The issue374 branch of my fork of MathJax includes code to trap the error and go on silently. (It would be possible to issue an error message, but I doubt it is worth it.)
Contributor

### fred-wang commented Apr 19, 2013

 OK, that sounds good to me. => Ready for release.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 19, 2013

 Merge branch 'issue374' into develop 
Resolves issue mathjax#374.
 3c013be 
Member

### dpvc commented Apr 19, 2013

 OK, Merged.