zivl / sentry-testkit

A Sentry plugin to allow Sentry report interception and further inspection of the data being sent
https://zivl.github.io/sentry-testkit/
MIT License
112 stars 26 forks source link

[Question]: Is this confirmed working with sentry-react-native 4.11.0? #151

Closed dorisaward closed 1 year ago

dorisaward commented 1 year ago

I updated sentry-react-native from version 4.8.0 and the tests using sentry-testkit failed due to no reports being returned from the testkit.

I tried updating to the newest version of testkit from version 4.1.0 to 5.0.4 and it didn't make a difference.

I had a look to see if the testkit versions corresponded to particular versions of sentry, but I couldn't find anything like that.

Could you let me know if there is a specific version of testkit I should use for sentry-react-native version 4.11.0?

jfaris commented 1 year ago

Our tests using sentry-testkit have been failing since @sentry/react-native 4.10.0. They were passing with 4.9.0. I haven't been able to look into it but it seems something changed with sentry 4.10.0. Tests continue to fail with 4.12.0.

zivl commented 1 year ago

thanks @dorisaward & @jfaris for reporting this regression. by your description it seems that something has changed on @sentry/react-native end. I'll try to investigate and handle it soon, and to be transparent, the flow is eventually reproduce it and then open issue to sentry-react-native.

in the mean time, can you share code snippets? specify version? make it reproducible? I'm also taking a look at sentry-react-native's CHANGEOG.md to try and catch what change might affect the way react-native is reporting events... you're welcome to help 😄

jfaris commented 1 year ago

Thanks for looking at this @zivl

I agree that seems like something changed in @sentry/react-native but I didn't see anything with a quick look at the release notes. The last working version was 4.9.0 and every version since then has failed.

The behavior we are seeing is that testkit.reports() returns an empty array in all of our tests. They were all passing until something changed with sentry/react-native 4.10.0.

Hopefully that helps you a bit. I'll be pretty busy for the next couple weeks but let me know if there is anything else you need.

liamjones commented 1 year ago

The behavior we are seeing is that testkit.reports() returns an empty array in all of our tests. They were all passing until something changed with sentry/react-native 4.10.0.

That's what we're seeing here too

zivl commented 1 year ago

I've created a project to reproduce the issue, and also opened issue in https://github.com/getsentry/sentry-react-native/issues/2718

zivl commented 1 year ago

The following PR https://github.com/getsentry/sentry-react-native/pull/2730 is willing to solve this issue, waiting for release

jfaris commented 1 year ago

Our tests pass with @sentry/react-native 4.13.0! Thank you @zivl for reproducing this and helping it get fixed.

zivl commented 1 year ago

oh right!!! 💯