This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-03
Channels
- # babashka (17)
- # beginners (166)
- # calva (97)
- # cider (4)
- # clara (2)
- # clj-kondo (46)
- # cljsrn (5)
- # clojure (334)
- # clojure-canada (1)
- # clojure-dev (144)
- # clojure-europe (14)
- # clojure-germany (5)
- # clojure-nl (10)
- # clojure-spec (1)
- # clojure-uk (46)
- # clojurescript (50)
- # conjure (1)
- # core-async (52)
- # core-typed (5)
- # cursive (3)
- # datomic (3)
- # emacs (11)
- # figwheel (16)
- # figwheel-main (9)
- # fulcro (29)
- # graalvm (19)
- # graphql (14)
- # helix (46)
- # hoplon (4)
- # hugsql (2)
- # jobs (2)
- # jobs-discuss (1)
- # juxt (15)
- # kaocha (6)
- # off-topic (9)
- # pedestal (7)
- # portkey (7)
- # re-frame (10)
- # reagent (29)
- # shadow-cljs (13)
- # spacemacs (70)
- # sql (13)
- # tools-deps (26)
- # xtdb (23)
i might be misconfiguring figwheel, but if i turn off chrome > security > allow third party site cookies, figwheel vomits on load with a `DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.`. you … cant really use figwheel with this option disabled, but is there a way to at least have figwheel check property access in a try/catch without just throwing outright? maybe a `:preloads` namespace that overrides the window.local/sessionStorage options first-thing, then more gracefully handles those security access errors?
@lwhorton yeah this should probably be a try/catch. This is in #figwheel-main right? I’ll definitely take a PR if you’re into it.
scratch that, no way i’ll be able to get anything submitted since this is a pretty low-prio issue on our end. definitely dont anticipate a PR. 😞 i’m a bad OSS contributor.
i would think maybe this does it? but i haven’t setup checkouts and dont know the workings of sidecar/plugin, etc. to test this out locally:
+++ b/support/src/figwheel/client/utils.clj
@@ -21,5 +21,7 @@
(defmacro feature?
[obj feature]
- `(and (cljs.core/exists? ~obj)
- (cljs.core/exists? (goog.object/get ~obj ~feature))))
+ `(try
+ (and (cljs.core/exists? ~obj)
+ (cljs.core/exists? (goog.object/get ~obj ~feature)))
+ (catch :default _ false)))
if i turn on the chrome feature ‘block sites from setting …’ described here https://stackoverflow.com/questions/30481516/iframe-in-chrome-error-failed-to-read-localstorage-from-window-access-deni
it looks like (for chrome at least) whenever you attempt to even read that property (. js/Window -localStorage)
(or sessionStorage) with that feature blocked, you get this error:
Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
don’t let my code mislead you, though. i only had about 30m to poke around in the codebase so there’s a very good chance this is not at all in the right place. sorry 😞