title: ChromeDriver/Spinach/Selenium error: Failed to read the 'localStorage' property from 'Window': Storage is disabled inside 'data:' URLs
body: <p>I am getting an error with my spinach tests (Ruby on Rails). Every test fails for the same reason:</p>
  
  <pre><code>&lt;unknown&gt;: Failed to read the 'localStorage' property from 'Window': Storage is disabled inside 'data:' URLs.
        (Session info: chrome=46.0.2490.86)
        (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Mac OS X 10.10.5 x86_64)
  </code></pre>
  
  <p>Example failing test step from Spinach:</p>
  
  <pre><code>step 'I visit the site' do
    visit "/top?DEBUG_USER=#{$spinach_test_userid}"
    page.execute_script('localStorage.clear()') # clear localStorage and reload to act as fresh login
    visit "/top?DEBUG_USER=#{$spinach_test_userid}"
  end
  </code></pre>
  
  <p>Ideas?</p>
  
  <p>Set-up includes RSpec, Capybara, Spinach, Chromedriver, Selenium. Code includes Mongo, Node.js, Rails...</p>
  
  <p>UPDATE:
  Realized that the tests were not set up to run the app before running the test, so it was trying to find local storage without having correctly visited the page first ('page not found'). Running app manually in a separate terminal tab solved the problem. Leaving this question up for next n00b who needs help. ;-)</p>