abuiles / ember-101

https://leanpub.com/ember-cli-101
95 stars 23 forks source link

Confusing behavior and output #36

Open bendycode opened 8 years ago

bendycode commented 8 years ago

First off: This should be split into separate issues Sorry I'm not communicating more clearly, but I want to share this, so the book can be improved, despite my confusion.

I'm running into two confusing behaviors on page 14:

  1. My browser says "Paused in debugger" and "Ember application not detected!" I get past this by pressing the "Resume script execution (F8)" blue arrow button.
  2. Instead of seeing the output I'm told "we'll see something like the output below: ...", I see 4 separate red errors. The first one says "[Report Only] Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-j0bVhc2Wj58RJgvcJPevapx5zlVLw6ns6eYzK/hcA04='), or a nonce ('nonce-...') is required to enable inline execution."

If I ignore the red errors, and scroll upwards, I do find the output that's similar to what's shown. These discrepancies were sufficient to stall my ember learning two weeks ago. I turned to other tutorials, assuming Ember CLI 101 was out of date enough to not be currently usable.

I've now come back, and know enough to move past this.

If we want to update the book to avoid losing other readers, there appear to be two issues:

  1. The Chrome Ember Extension saying "Ember application not detected!".
  2. This behavior seemed affected, and improved by commenting out different lines than what's shown for config/environment.js
    1. Is ember-cli-content-security-policy something added since the book was written?
  3. Should Ember 101 have a contentSecurityPolicy added to config/environment.js?
abuiles commented 8 years ago

Thanks for pointing at this.

Probably the best thing we could so is add the CSP info to avoid all those errors, allowing people to focus on what we are trying to show.

I'm sure I mention CSP later on the book so we can explain more once we hit that chapter.