Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explanation needed: Why is parsed stack different when using StackTrace.fromError with option offline=true and offline=false? #236

Open
AldinaSculac opened this issue Feb 16, 2023 · 0 comments

Comments

@AldinaSculac
Copy link

AldinaSculac commented Feb 16, 2023

Hi all, I need bit of a help when using stacktrace-js in my React Native project.

Working with with Simulator iPhone 14 Pro, iOS 16.2.

"dependencies": {
    "@react-navigation/bottom-tabs": "6.0.9",
    "@react-navigation/native": "6.0.6",
    "@react-navigation/stack": "6.0.11",
    "hermes-engine": "0.11.0",
    "jetifier": "2.0.0",
    "react": "18.1.0",
    "react-native": "0.70.6",
     "stacktrace-js": "2.0.0"
  }

When using StackTrace.fromError and setting offline=true I get this as the first object in a stack array

  {
   "columnNumber":32,
   "fileName":"http://.../index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myapp",
   "functionName":"onPress",
   "lineNumber":101677,
   "source":"  at onPress (http://.../index.bundleplatform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myapp:101677:32)"
  },

If I set the offline option to false I get this:

  {
   "columnNumber":60,
   "fileName":"http://.../myapp/src/screens/MainScreen.tsx",
   "functionName":"MainScreen",
   "lineNumber":36
  },

What I get when using offline=false aligns with logbox message.

Can anyone explain why I get the difference, and why is in offline=false mode functionName the same as the screen name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant