Refused to load preload-store.js

AI-generated summary

Users reported a console error in Chrome: ‘Refused to load preload-store.js’ due to a Content Security Policy (CSP) violation after a recent upgrade. DBHacker shared screenshots and noted the issue also appeared on meta. gerhard confirmed it was a known issue being addressed by eviltrout. DBHacker asked if a public list of known issues exists to avoid redundant reports; j.jaffeux reassured users that searching first is appreciated but not mandatory. eviltrout initially thought the fix was deployed but later confirmed it was still occurring — then fixed it for real. DBHacker confirmed the fix, noting the removal of preload-store.js, and shared appreciation for eviltrout’s 2014 Ember.js debugging screencast, which remains relevant today.

FYI:

Screen Shot 2020-05-07 at 4.39.08 PM

Getting this error in chrome console after recent upgrade (was not seeing this console error before upgrade, FYI):

Refused to load the script 'https://staging.test-site.com/preload-store.js' because it violates the following Content Security Policy directive: "script-src https://staging.test-site.com/logs/ https://staging.test-site.com/sidekiq/ https://staging.test-site.com/mini-profiler-resources/ https://staging.test-site.com/assets/ https://staging.test-site.com/brotli_asset/ https://staging.test-site.com/extra-locales/ https://staging.test-site.com/highlight-js/ https://staging.test-site.com/javascripts/ https://staging.test-site.com/plugins/ https://staging.test-site.com/theme-javascripts/ https://staging.test-site.com/svg-sprite/ https://www.google-analytics.com/analytics.js". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fall

Same console error exists when browsing meta, FYI:

That’s a known issue. @eviltrout is working on it.

Fantastic!

Thanks for the update!

OBTW @gerhard

Is there a list of these “known issues” so when I see these things I can search the list first before asking a question or being generally annoying?

On this end, did a search but did not find any open Discourse or Ember issues on this.

No search is your best bet, it’s ok if you try to at least search first, no worries.

It should already be fixed if you get the latest version of Discourse.

edit: I see it’s still happening! I’ll look at it.

And now it’s fixed, for real this time!

Hi Robin @eviltrout

Thanks and confirmed (seems you removed preload-store.js) !!

On a distantly related note, ran across your awesome 2014 screencast today during morning coffee, which seems even more relevant today than in 2014:

How to debug an Ember.js application