Repository navigation
Get Started Tutorial #1181
Description
Activity
e.g.:....?
...with the...?Did your message lose something in translation?
The only requirement is that you can start a local server. You don't have to do that with Python, you could use XAMPP or Apache or Node or whatever other tool you want to get a local server running.
In contrast Anjular.JS examples let me work from the file system, say like:
file:///W:/sandbox/samples/polymer/finished/index.htmlThis is not possible given how the HTML Imports polyfill works. It uses Ajax to load local resources and that is prevented in some browsers. Unfortunately this is a hard requirement and will not change.
@robdodson The example also behaves weird in Firefox: it won't load properly unless you run it specifically on port 80 (see the StackOverflow I encountered while trying to untangle this problem). So, if I run
python3 -m http.server 8880I get a blank page. But if I run
sudo python3 -m http.server 80I get the element correctly.
In the first example, did you change all your import paths to include the port?
No, I did not. I used the local import paths (like
bower_components/webcomponentsjs/webcomponents.min.js).@art-solopov I have never encountered this issue when testing on Firefox. If you would, could you answer a fee questions?
- What OS are you on?
- Do you have any extensions installed that might be affecting this?
- Do you see any errors in the console?
Thanks,
Arthur@arthurevans I run Firefox Developer Edition 39.0a2 on Ubuntu 14.04.2. I've run it in the safe mode and the behavior persists.
The only console warning I had was this:
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.createHm. I found other reports of issues with Firefox connecting to localhost, and I was going to suggest you try 127.0.0.1 instead of localhost, but...
That error suggests that it is connecting, but for some reason stuff isn't displaying.
@art-solopov out of curiosity, can you get a vanilla index.html file with an h1 that just says 'hello world' to display if you run it on port 8880? To me this feels like an issue with Firefox + Ubuntu + python's server.
Actually, connecting to
127.0.0.1:8880except oflocalhost:8880helped. 😮@robdodson The index.html file is displaying properly, I can inspect it and the Dev Tools show the DOM all right.
@art-solopov I thought it might. So, it sounds like an IPv6 issue. Firefox uses IPV6 by default, and using the IPv4 localhost address works correctly.
I'm not sure whether this is because the python server doesn't like IPv6, or because of the way /etc/hosts is configured on Ubuntu... But I'm guessing one of those is the root cause.
@arthurevans Here's a weird one for you.
I've installed a SixOrNot addon for my "main" browser (Firefox 38.0) to determine if you're correct... Andlocalhost:8880works (across IPv4). So it works in FF 38.0, but not in Developers Edition 39.0. Sorry, now I don't understand anything at all.By the way, I can access this page over Wi-Fi okay. I probably should go and write Mozilla about this issue. I'm sorry I've bothered you.
I wonder if it'd help to turn off IP6 on the interface that has the problem...you can use the network manager to do this, on the interface's 'IPv6 Settings' tab - Method: 'Ignore'.
@davidmaxwaterman Doesn't do anything. Actually, in my /etc/hosts file localhost is specifically defined as 127.0.0.1. ::1 is aliased as ip6-localhost.
Solved the issue by wiping all history. Again, sorry to bother you all.
@art-solopov No worries -- it's helpful to know when folks encounter trouble with the tutorial. It helps us improve the docs to make sure they work for more people.
Thanks for the report!
Hi ...
I hope you can re-think this tutorial structure/delivery -- It looks like a well paced learning activity. Just don't bother with Windows 64-bit, Firefox or Python-s v3.5, v3.4 or v2.9.
Oh yes Chrome was helpful because it identified the cross-browser scripting issue embedded in the examples. (d'hoh! I feel so dumb -- Not.)
In contrast Anjular.JS examples let me work from the file system, say like:
Just nice because it is a single page app; but also because they load script as script:
I haven't started the tutorial today because python doesn't install -- I hacked a version of 2.9 that works OK but there were errors in the HTTP server script (not your responsibility). Tried to us the files from the command line and browser with my trusty text editor, like the "old days" -- but the format doesn't allow me to load //these// html files because of perceived cross-browser issues!
I may be mistaken. As I see it Polymer is similar to jQuery or Angular such that, I can load libraries with the <script> tag and take advantage of cool stuff!
I'm getting zero joy using rel="import" -- and I seriously wonder if that is a NEED or just some-one's idea of a 'cool thing to do'. From a want to get started and use the technology person's viewpoint, I think "tutorials" should be more accessible and have as few pre-requisites as possible.