ios – How to make Expo stack traces more readable?


My Expo app is throwing an error on the iOS simulator, and I’m struggling to identify where it’s happening in my code. The stack trace looks like this:

ReferenceError: Property 'id' doesn't exist
    at anonymous (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:195968:39)
    at tryCallTwo (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:61:9)
    at doResolve (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:216:25)
    at Promise (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:82:14)
    at anonymous (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:195967:33)
    at anonymous (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:196666:36)
    at anonymous (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:196479:19)
    at nextTick (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:196450:37)
    at tryCallOne (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:53:16)
    at anonymous (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:139:27)
    at apply (native)
    at anonymous (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:15376:26)
    at _callTimer (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:15255:17)
    at _callReactNativeMicrotasksPass (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:15300:17)
    at callReactNativeMicrotasks (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:15506:44)
    at __callReactNativeMicrotasks (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:2856:46)
    at anonymous (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:2630:45)
    at __guard (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:2829:15)
    at flushedQueue (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:2629:21)
    at callFunctionReturnFlushedQueue (http://192.168.0.129:8081/index.bundle//&platform=ios&dev=true&hot=false&lazy=true:2614:33)

I think I’m searching for the wrong things, because everything I read says Metro “generates sourcemaps by default” and provides ways to STOP doing that, obviously not my use case here.

Short of just chopping out logical blocks of code and adding console.logs all over the place (which I’ve been doing and it just feels like boiling the ocean), how can I isolate the source of this error? Is there a way to make this stack trace more readable?

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img