Skip to content

Imported resource from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null' is therefore not allowed access. #1535

Description

I did the same site as the Making app for 10 minutes , and Chrome
display and white image , the Inspect element was a bug as its title .

Also, bower_components \ polymer \ docs \ index.html was a few files that did not exist . These are:

  • Bower_components / polymer / perf - lib / perf.js
  • Bower_components / polymer / x- elements / x -doc -viewer / x- doc- viewer.html
  • Bower_components / polymer / assets / icons.html

It is a version of the Polymer 0.5 .
Please look at this , I was two or three weeks looked for this.

Activity

  1. miztroh-zz commented on May 14, 2015

    @miztroh-zz

    Due to the way HTML imports work, Polymer requires a web server. You could try developing using Chrome Dev Editor, which has a built-in web server.

    https://chrome.google.com/webstore/detail/chrome-dev-editor-develop/pnoffddplpippgcfjdhbmhkofpnaalpg

  2. sorvell commented on May 21, 2015

    @sorvell
    Contributor

    By design HTMLImports can only load resources from the same (non-file) domain or domains that support CORS.

  3. kevinpschaaf commented on May 21, 2015

    @kevinpschaaf
    Member

    Those docs are old and vestigial, thanks for pointing out. We'll remove. The PRIMER.md and polymer-project.org website should be used for docs.

  4. codedcontainer commented on Oct 16, 2015

    @codedcontainer

    You could alwasy just set up your own node server and then you can present these locally instead of pushing them to your own testing server.

  5. kolarski commented on Apr 6, 2016

    @kolarski

    How about using polymer inside cordova ?

  6. xiaoxuanwang commented on May 19, 2016

    @xiaoxuanwang

    We could easily start a web server by using python:
    python -m SimpleHTTPServer 8000

  7. josephmokenela commented on Nov 24, 2016

    @josephmokenela

    You can consider using polymer starter kit as well and install the local development server.
    The instructions are on the following link.
    https://developers.google.com/web/tools/polymer-starter-kit/

  8. stevenroose commented on Mar 7, 2018

    @stevenroose

    Wait what?? With the "new web" we will no longer be able to open HTML files from local files?? What the hell?? Can someone perhaps point me to some documentation of this?

  9. miztroh-zz commented on Mar 7, 2018

    @miztroh-zz

    @stevenroose Opening an HTML file directly will work just fine via a file protocol URL. However, HTMLImports cannot load data via that protocol.

  10. stevenroose commented on Mar 7, 2018

    @stevenroose

    Opening an HTML file directly will work just fine

    Only when that file doesn't import other files. What if I want to create an offline-capable browser dashboard that does use htmlimports?

  11. miztroh-zz commented on Mar 7, 2018

    @miztroh-zz

    Operating offline isn't the issue. The protocol is the issue. file:// requests will not work, but you can run a local web server (polymer serve, express, etc.) to use HTTP requests instead. You could even use the following Chrome extension to run a local web server.

    https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en

  12. DieAntonie commented on Jan 21, 2019

    @DieAntonie

    @stevenroose , this isn't an issue in Edge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions