<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>154448</bug_id>
          
          <creation_ts>2016-02-19 05:26:55 -0800</creation_ts>
          <short_desc>Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.</short_desc>
          <delta_ts>2019-05-02 16:18:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>LATER</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henrik Hartz">hhartz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>arkr17997</cc>
    
    <cc>a.tion.surf</cc>
    
    <cc>bburg</cc>
    
    <cc>graouts</cc>
    
    <cc>it</cc>
    
    <cc>joepeck</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1166400</commentid>
    <comment_count>0</comment_count>
    <who name="Henrik Hartz">hhartz</who>
    <bug_when>2016-02-19 05:26:55 -0800</bug_when>
    <thetext>-------
Auto-generated details:

Inspected URL:        (unknown)
Loading completed:    false
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/602.1.20+ (KHTML, like Gecko)
Uncaught exceptions:
 - SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent. (at Setting.js:61:44)
 - ReferenceError: Can&apos;t find variable: InspectorBackend (at InspectorBackendCommands.js:32:17)
 - ReferenceError: Can&apos;t find variable: InspectorBackend (at Main.js:59:25)
-------

* STEPS TO REPRODUCE
1. What were you doing? Include setup or other preparations to reproduce the exception.
   - debugging a web view
2. Include explicit, accurate, and minimal steps taken. Do not include extraneous or irrelevant steps.
   - load a WKWebView instance in iOS simulator
   - use menu &quot;Develop&quot; -&gt; &quot;Simulator&quot; -&gt; &quot;about: blank&quot; (same result if the WKWebView has loaded content

* NOTES
Document any additional information that might be useful in resolving the problem, such as screen shots or other included attachments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1166401</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-02-19 05:27:06 -0800</bug_when>
    <thetext>&lt;rdar://problem/24740414&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1166436</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-02-19 09:41:01 -0800</bug_when>
    <thetext>Hey! What version of the iOS did you see this on? What version of iOS is running in the iOS Simulator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167366</commentid>
    <comment_count>3</comment_count>
    <who name="Henrik Hartz">hhartz</who>
    <bug_when>2016-02-23 04:26:16 -0800</bug_when>
    <thetext>(Sorry for the lag) This was observed using both 9.1 and 8.4 simulators, and a WKWebView prior to actual loading any content (as I need to debug some problems that happens as a HTML string is loaded in the WKWebView)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167367</commentid>
    <comment_count>4</comment_count>
    <who name="Henrik Hartz">hhartz</who>
    <bug_when>2016-02-23 04:27:51 -0800</bug_when>
    <thetext>addendum; I get the same error if I have loaded HTML content into the view and then attempt loading the web inspector.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167370</commentid>
    <comment_count>5</comment_count>
    <who name="Henrik Hartz">hhartz</who>
    <bug_when>2016-02-23 04:35:38 -0800</bug_when>
    <thetext>addendum #2; Here&apos;s a gist of a viewcontroller that reproduces the issue for me:

https://gist.github.com/hhartz/3c5356919e8962b3f6be</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1176018</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-03-17 20:54:43 -0700</bug_when>
    <thetext>Is this still happening? This sounds like a frontend issue (Safari, or WebKit Nightly).

This sounds very similar to a recent bug that was fixed, Bug 155265.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1176106</commentid>
    <comment_count>7</comment_count>
    <who name="Henrik Hartz">hhartz</who>
    <bug_when>2016-03-18 01:05:08 -0700</bug_when>
    <thetext>Yes it&apos;s still happening with WebKit nightly, exact same exception messages logged. Can you suggest any additional steps that would help you identify/reproduce the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1177734</commentid>
    <comment_count>8</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-03-24 11:52:00 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Yes it&apos;s still happening with WebKit nightly, exact same exception messages
&gt; logged. Can you suggest any additional steps that would help you
&gt; identify/reproduce the issue?

Sorry for taking so long to reply. I was absolutely stumped. However, I think I stumbled across the problem!

In Safari&apos;s Preferences &gt; Privacy, do you have Cookies blocked?

If you change the setting to &quot;Allow from websites I visit&quot; do things start working again?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1177735</commentid>
    <comment_count>9</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-03-24 11:53:16 -0700</bug_when>
    <thetext>&gt; In Safari&apos;s Preferences &gt; Privacy, do you have Cookies blocked?

I should be clear, the label is &quot;Cookies and website data&quot; since here the issue is localStorage data, not really cookies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178279</commentid>
    <comment_count>10</comment_count>
    <who name="Henrik Hartz">hhartz</who>
    <bug_when>2016-03-26 08:26:46 -0700</bug_when>
    <thetext>That&apos;s it, works fine if cookies are enabled. Does that mean this setting has to be enabled for Safari debugging to work? At the very least it would be better to improve the error message, but if a user really wants to block cookies and local storage the simulator target could be greyed out or something similar to indicate it won&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178436</commentid>
    <comment_count>11</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2016-03-28 10:09:03 -0700</bug_when>
    <thetext>This is a bug. You should not need to change the cookie/storage setting to use Web Inspector. We will need to override the setting for our WebView. Thanks for testing this for us!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178438</commentid>
    <comment_count>12</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2016-03-28 10:10:59 -0700</bug_when>
    <thetext>*** Bug 155611 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187465</commentid>
    <comment_count>13</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2016-04-26 10:52:28 -0700</bug_when>
    <thetext>*** Bug 156991 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1187515</commentid>
    <comment_count>14</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-04-26 13:21:36 -0700</bug_when>
    <thetext>Given that this was an issue based on a Safari Preferences, this issue turned out to indeed be a Safari side issue and the fix would be there. The Safari issue is tracked by the radar created by this bug (&lt;rdar://problem/24740414&gt;).

I&apos;m going to close the bugzilla bug because there is no more action to be done in WebKit for this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>