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

captureException return invalid event id #1200

Closed
5 of 11 tasks
aminerol opened this issue Nov 16, 2020 · 5 comments
Closed
5 of 11 tasks

captureException return invalid event id #1200

aminerol opened this issue Nov 16, 2020 · 5 comments

Comments

@aminerol
Copy link

aminerol commented Nov 16, 2020

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 2.0.0

react-native version: 0.62.2

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

No link.

Configuration:

(@sentry/react-native)

Sentry.init({
  enableAutoSessionTracking: true,
  dsn: config.sentry.dsn,
  ignoreErrors: [
       "remote notifications are not supported in the simulator",
 ],
 environment: config.env,
});

or

(react-native-sentry)

Sentry.config(
  'https://...@sentry.io/...'
  // other options
 ).install();

I have following issue:

captureException returns a wrong event id and no issue been reported to sentry dashboard, also tried to attach that event to a feedback through axio but same result, no feedback been reported

Steps to reproduce:

  • here is the function am using for reporting a feedback
const eventId = captureException(error, {level: Severity.Error})
        const params = {
            event_id: eventId,
            name: currentUser?.name,
            email: currentUser?.email,
            comments: message,
            logger: Severity.Info,
        };

        return Axios.post(config.sentry.feedbackEndpoint, params, {
            headers: {
                "Content-Type": "application/json",
                Authorization: `DSN ${config.sentry.dsn}`,
            },
        });

Actual result:

a wrong event id and no feedback nor exception been reported

Expected result:

a valid event id, hence a new feedback reported

A working workaround

downgrading to v1.8.2 solve this issue and captureException behave as it should

@jennmueng
Copy link
Member

Hmm, for clarification, by wrong event id you mean that the event isn't getting sent and doesn't exist on the Sentry Dashboard right? Or how is it wrong?

@aminerol
Copy link
Author

Yes, indeed it returns an event id but that event doesn't exist on the sentry dashboard, it's more like an invalid event id

@aminerol aminerol changed the title captureException return wrong event id captureException return invalid event id Nov 18, 2020
mergify bot pushed a commit to celo-org/celo-monorepo that referenced this issue Dec 19, 2020
### Description

Upgrade sentry/react-native from 1.7.1 to 2.1.0.

This is part of our effort to improve debugging capabilities. With this update we hope to see better stack traces in some native crashes where the entire trace is missing.

I went through the release notes for each of the releases since 1.7.1 to make sure we capture any breaking changes and to see what has been fixed and what to watch out for.

One thing that has been added is release health which we should discuss whether we want on or off: https://blog.sentry.io/2020/05/19/crash-free-sessions-carefree-users-with-release-health

What's new in sentry:

- Bump sentry-android to 3.2.0 getsentry/sentry-react-native#1208
- Fix: set userId for hard-crashes if no user is set [#1049](getsentry/sentry-java#1049) 
- Bump @sentry/javascript dependencies to [5.28.0](getsentry/sentry-react-native#1228)
- Bump sentry-cocoa to [6.0.9](getsentry/sentry-react-native#1200)


### Other changes
Set sentry automatic session tracking explicitly off because the default has changed in 2.0. Not sure yet if we want that on so I set it off to be explicit.


### Tested

Manually causing crashes in JS:
`throw new Error("My first Sentry error!");`
and in native:
`Sentry.nativeCrash();`

### Related issues

- Fixes #6203

### Backwards compatibility

Yes.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto
Copy link
Contributor

@aminerol does that still happen? I can't reproduce that an event does not get sent using the latest Sentry RN SDK

@aminerol
Copy link
Author

@marandaneto nope, it works just fine in latest Sentry RN

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

No branches or pull requests

3 participants