Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Started Tutorial #1181

Closed
aplatypus opened this issue Feb 11, 2015 · 18 comments
Closed

Get Started Tutorial #1181

aplatypus opened this issue Feb 11, 2015 · 18 comments

Comments

@aplatypus
Copy link

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:

  • file:///W:/sandbox/samples/polymer/finished/index.html

Just nice because it is a single page app; but also because they load script as script:

  • e.g.: <script src="http://code.angularjs.org/1.2.6/angular.min.js"> </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.

@davidmaxwaterman
Copy link

e.g.:....?
...with the...?

Did your message lose something in translation?

@robdodson
Copy link
Contributor

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.html

This 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.

@art-solopov
Copy link

@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 8880

I get a blank page. But if I run

sudo python3 -m http.server 80

I get the element correctly.

@miztroh-zz
Copy link

In the first example, did you change all your import paths to include the port?

@art-solopov
Copy link

No, I did not. I used the local import paths (like bower_components/webcomponentsjs/webcomponents.min.js).

@arthurevans
Copy link

@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

@art-solopov
Copy link

@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.create

@arthurevans
Copy link

Hm. 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.

@robdodson
Copy link
Contributor

@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.

@art-solopov
Copy link

Actually, connecting to 127.0.0.1:8880 except of localhost:8880 helped. 😮

@art-solopov
Copy link

@robdodson The index.html file is displaying properly, I can inspect it and the Dev Tools show the DOM all right.

@arthurevans
Copy link

@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.

@art-solopov
Copy link

@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... And localhost:8880 works (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.

@art-solopov
Copy link

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.

@davidmaxwaterman
Copy link

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'.

@art-solopov
Copy link

@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.

@art-solopov
Copy link

Solved the issue by wiping all history. Again, sorry to bother you all.

@arthurevans
Copy link

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants