Fork me on GitHub
#cljsrn
<
2021-04-14
>
naomarik01:04:13

How do you guys deal with debugging production errors in react native apps compiled in shadow-cljs?

andre06:04:33

we don't have errors in production

😎 18
🎉 3
joshmiller18:04:02

@naomarik I use Bugsnag and upload source maps to it, which will give me a good idea where something went wrong, but for the most part I really don’t have errors that trigger crashes, I have incorrect implementations.

raspasov19:04:51

@naomarik Are you asking about :advanced?

naomarik09:04:02

Yeah, I recently had to blindly debug an issue I was having with advanced compilation because error message wasn't saying anything. Couldn't figure out how to get source maps to work, used chrome debugger too. shadow-cljs release app --debug helped a little bit though.

raspasov21:04:28

You need two source maps: one produced by ClojureScript and one produced by RN Metro. When you get an error with a stack trace from RN, you need to walk the source maps in the correct order to find where the error in the CLJS code originated. I wrote some custom code to do this but I haven’t polished it/made it into a lib at this point.