Chrome Security Error Dom Exception 18
Contents |
Support Search GitHub This repository Watch 261 Star 7,040 Fork 765 pouchdb/pouchdb Code Issues 90 Pull requests 7 Projects 0 Wiki Pulse uncaught error security_err dom exception 18 Graphs New issue SecurityError: DOM Exception 18 with Chrome on iOS #4876 securityerror dom exception 18 Closed dsmeltz opened this Issue Feb 9, 2016 · 9 comments Projects None yet Labels None yet Milestone dom exception 18 safari No milestone Assignees No one assigned 5 participants dsmeltz commented Feb 9, 2016 I know this has been reported and fixed before. It has reared it's ugly head again with dom exception 18 ios either the latest version for Chrome on iOS or iOS itself. The issue happens after you call "new PouchDB" and then try to call the ".info" method for the database. I tried lowering the initial database size, but that didn't seem to have any effect. We were using Pouch 3.4.0 and didn't receive any error, but it was silently failing.
Security Error Dom Exception 18 Phonegap
After upgrading to 5.2.1, the error was able to be caught. The received error is seen in the screen grab below. Versions being used: PouchDB: 3.4.0 and 5.2.1 iOS: 9.2.1 iOS device: iPad Air 2 Chrome for iOS: 48.0.2564.104 PouchDB member nickcolley commented Feb 9, 2016 Thanks a lot for the report! We're not currently testing 9.x in Travis, https://github.com/pouchdb/pouchdb/blob/master/.travis.yml#L82, we should look at trying to get this tested. Sounds like you're using Safari for iOS? There's a WKWebView issue with a similar error https://gist.github.com/nolanlawson/08eb857c6b17a30c1b26#uiwebview Which can be worked around with https://github.com/nolanlawson/fruitdown dsmeltz commented Feb 9, 2016 We're using Chrome not Safari, if it makes a difference. In looking at the "What's New" notes for the latest release of Chrome on iOS, it states that it is using WKWebView. PouchDB member nickcolley commented Feb 9, 2016 @dsmeltz I wonder what user-agent Chrome for iOS produces, we do some (regrettable but needed) user-agent sniffing so we should double check that our assumptions hold up with Chrome for iOS updating to WKWebView. I think here you'll have to use Fruitd
up at inopportune times and ruin your day with an “Uncaught Error” and a big red exception killing your code in its tracks. So you’re playing around with HTML5 Canvas
Security Error Dom Exception 18 Cordova
when all of a sudden you’re getting a Uncaught Error: SecurityError: DOM Exception phantomjs dom exception 18 18 in the console. What’s it mean? DOM Exception 18 This exception is thrown when your code is trying to access security error dom exception 18 localstorage something it shouldn’t, including cross-domain resources or stuff on your local filesystem. Once you hit this one you will either need to loosen your browser security settings which is never optimal, or https://github.com/pouchdb/pouchdb/issues/4876 find out how to work around it. HTML5 Canvas & Exception 18 Which brings us to the case of the complaining canvas. Loading images into your canvas from another domain will “taint” your canvas, meaning any attempts to read the canvas back again will fail with this error. This is because your Javascript adheres to a same-origin policy to increase security. It’s essentially done as a containment http://getcontext.net/read/chrome-securityerror-dom-exception-18 measure so that a rogue script can’t use your browser to access resources you’re authenticated against. Hypothetical Canvas Attack For instance, if I hypothetically wanted to access your email and your browser didn’t prevent cross-site-scripting, I could perform a $.ajax('http://gmail.com'). This would pull down your logged-in gmail page, and then I could send all your email messages back to my server. The same applies for images. This feature prevents a rogue site pulling down your Facebook photos, for instance (which again could hypothetically be done), rendering them to a canvas in order to get a hold of the binary image data then sending it back to the attack server. So the second you draw a third party image to your canvas, you can no longer read back the resulting image. The easy solution is to host all your images locally or if that’s not possible you could use a script to pull down and serve the images on your behalf. SVG Image & Canvas SecurityError If you’re playing around with drawing SVG to Canvas in Chrome, you may also run into this security error, but for a different reason. This appears to be a Chrome-specific feature (p
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://apple.stackexchange.com/questions/125584/broken-safari-dom-exception-18 and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Different Questions Tags Users Badges https://bugs.webkit.org/show_bug.cgi?id=137760 Unanswered Ask Question _ Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute: Sign up Here's dom exception how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Broken Safari: Dom Exception 18 up vote 4 down vote favorite 1 I've just tried everything and I cannot seem to fix this for the life of me. Basically, Safari has started reporting the following error in the JS console: dom exception 18 "SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent." Most of Ajax interactions via https are not working, so I cannot log into Twitter, Facebook or even Apple's own Developer Center. I've tried installing Webkit, and even removing all preferences files that I'm aware of. Other local browsers (Firefox, Chrome, Opera...) work just fine. I'm using Safari 7.0.2 in Mavericks. osx safari share|improve this question asked Mar 26 '14 at 8:43 pantulis 271127 add a comment| 2 Answers 2 active oldest votes up vote 6 down vote Fixed. After inspecting the exact JS error when accessing the twitter login page, the offending line was trying to access the browser local storage. The "Privacy" settings in Safari had the "Block cookies and other website data" set to "Always". I've set this to "From third parties and avertisers" and now it's working again. share|improve this answer answered Mar 26 '14 at 8:55 pantulis 271127 add a comment| up vote 0 down vote More Specific Instructions (same solution) To enable third-party cookies: On your iPhone or
This bug is not in your last search results. Bug137760 - WKWebView: openDatabase results in DOM Exception 18 Summary: WKWebView: openDatabase results in DOM Exception 18 Status: RESOLVED DUPLICATE of bug 156928 Product: WebKit Classification: Unclassified Component: WebKit2 Version: 528+ (Nightly build) Platform: iPhone / iPad Unspecified Importance: P2 Normal Assigned To: Nobody URL: Keywords: InRadar Depends on: 156928 Blocks: 154633 Show dependency tree /graph Reported: 2014-10-15 17:47 PDT by Nolan Lawson Modified: 2016-04-27 14:03 PDT (History) CC List: 19 users (show) 3rdparty andersca ap baas beidson calinuswork cgarcia ddkilzer eoconnor jkndrkn joepeck jonathan.dong.webkit mcatanzaro mjs peter.legen sam timothy webkit-bug-importer zac.spitzer See Also: Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Nolan Lawson 2014-10-15 17:47:47 PDT Within a WKWebView on iOS 8 (12A366), simply run some minimal openDatabase code: openDatabase('mydatabase', 1, 'mydatabase', 5000000, function (db) { console.log('it works!'); }); This results in the following error: Error: SecurityError: DOM Exception 18 I can understand that you might not want to enable Web SQL by default, but it seems from the WebKit Framework Reference [1] that there's no way to enable it. Would it make sense to have an option on the WKPreferences [2] such as `databaseEnabled`? In Android, such an option is available on the WebSettings object [3] so that developers have a workaround for the DOM Exception 18 error. Thanks! [1]: https://developer.apple.com/library/ios/documentation/Cocoa/Reference/WebKit/ObjC_classic/index.html [2]: https://developer.apple.com/library/ios/documentation/WebKit/Reference/WKPreferences_Ref/index.html [3]: https://developer.android.com/reference/android/webkit/WebSettings.html#setDatabaseEnabled%28boolean%29 Comment 1 Radar WebKit Bug Importer 2015-02-18 12:03:47 PST