How to debug differences between dev app & published app?

I’m using Expo.SQLite and a library called join-monster to store and retrieve data client-side via graphql. So far, everything works fine locally, but when I publish the Expo app (or if I eject, then do an Xcode “release build”), I get an error message that I have not been able to replicate in my dev environment.

The error message is coming from the join-monster library (https://github.com/stems/join-monster/issues/250), but the question I had for you guys: is there any way to generate the production-ified version of the app locally without actually publishing? Or instrument the published version with a debugger? If I could Debug Remote JS on the prod/buggy version of the app, I could probably figure out the root cause pretty quickly.

Here’s a minimal reproduction I just wrote using Expo/CRNA btw, https://github.com/smoll/monster

You could detach and build locally, then install say the .apk yourself

I’ve actually done this in Xcode and the “release build” manifests this bug. However, there is no way to “Debug Remote JS” inside of this app, is there?

Also, I was able to run idevicesyslog as described in https://docs.expo.io/versions/latest/guides/logging.html but that doesn’t make console.log statements show up, does it?

ya, console.log is like NSLog on iOS, so it goes to system log

Does the error still happen with minifcation on in dev mode?

@nikki Great idea, and your instinct was spot on: exp start --minify causes the error to appear!

Any ideas about what I can do next? Is the minification being performed by babel?

I’m going to skip minification altogether as a workaround for now. This is less than ideal, but I have to do some research into how to skip minification of specific files/code paths. This would help me narrow down whether the minification is breaking due to a problem with my code (my guess is no, since I squinted at the relatively small code for a bit and there are no obvious differences between the minified and unminified versions), or something in the join-monster package, and precisely which file/line number.

I tried using babel-preset-minify - npm to exclude things but none of the flags seem to change the minified bundle at all.