This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-07
Channels
- # alda (7)
- # beginners (4)
- # boot (108)
- # cljsrn (40)
- # clojure (24)
- # clojure-berlin (1)
- # clojure-dev (20)
- # clojure-russia (21)
- # clojurescript (115)
- # clojurescript-ios (1)
- # cursive (8)
- # data-science (5)
- # datascript (3)
- # hoplon (313)
- # jobs (1)
- # ldnclj (2)
- # off-topic (19)
- # om (115)
- # portland-or (3)
- # re-frame (9)
- # yada (2)
It is really easy to cause the iOS simulator to display a white screen if you make an error in your ClojureScript code, and it appears to require a re-launch of the simulator to recover. I thought we used to always get red screens. Perhaps this is a new thing to be sorted out as it is s big pain point.
Hi all, hi mike. Is there a link to this group on the cljsrn website. Might be useful.
@olivergeorge: I need to add a link. :)
Can anyone recommend a technique to catch/log unhandled exceptions.
We found that a fresh Natal setup will break if you put a println statement inside the render function on a fresh start. It seems to be that it causes an exception to be thrown but that exception cannot be seen anywhere (a try/catch handler allowed us to capture and render it in our test app).
Cause seems to be that console.log wasn't yet ready. Bigger issue is having visibility of unhandled exceptions.
(Quick follow up. Once everything is loaded up exceptions are caught. I think our problem is mostly the first render happening before things are ready)
(and again: Using .requestAnimationFrame(js/window, #(om/root ....)) works. Feels hacky but better than setTimeout)
@olivergeorge: The requestAnimstionFrame
hack was the result of an offhand suggestion by Vjeux. I've added it as an item in http://cljsrn.org/roadmap.html FWIW
@olivergeorge: Oh I read your Natal ticket. Cool. Maybe that is a more robust approach.
@olivergeorge 's suggestion also solves my problem
@mfikes: not sure if you remember my problem last week; exactly regarding CLJS errors not triggering React Native's "red screen"
@anmonteiro: Cool! I wonder if it also plays into the white screen issue
what is the white screen issue?
the one that happens sometimes when reloading the app?
Currently, if you make an error, especially in IRender where, say, you mistype a fn name, the simulator displays a white screen, removing your previous UI. Then you have to relaunch.
I think we're talking about the same thing
let me try to check that
Here is a demo of the “white screen” issue: https://youtu.be/fANy-QqGiI8
OK, so
on what previously triggered the white screen
I'm now getting RN's red-screen
However: fixing the code doesn't seem to get us out of the red screen
which is still a show-stopper
I've added my comments to the Natal GitHub issue
@anmonteiro: what if you dismiss the red screen
oh I should learn to read
trying that atm
dismissing the red screen gets us the dreadful white screen
do you have any idea why?
it would make more sense to me if it was the predefined class in index.ios.js
and probably easier to solve too
Maybe it would be possible to reload in the simulator if it involved index.ios.js
in some way.
You can see interesting stack traces if you try to call (om/root widget app-state {:target 1})
after getting a white screen. https://gist.github.com/mfikes/2d9a0d75c8c8ab18f0e2
it seems the React instance is not there anymore
hence the null
`