fix: Warn when promise rejections won't be caught#1886
Conversation
|
For some reason the android emulator for the e2e test isn't working, says app never started. Works locally... going to keep debugging this |
|
Accidentally hit close |
sample/android/app/src/main/java/io/sentry/sample/MainApplication.java
Outdated
Show resolved
Hide resolved
|
@AbhiPrasad would you mind reviewing this one too? that's a field I don't master, thanks. |
Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
AbhiPrasad
left a comment
There was a problem hiding this comment.
awesome, sorry for the late review. I'll make sure the ✅ comes back way faster :)))
| run: sh ./scripts/prepareConfigsForTesting.sh | ||
| - name: Install SDK in sample | ||
| working-directory: ./sample | ||
| run: yalc add @sentry/react-native |
There was a problem hiding this comment.
Think its unavoidable now, but lets please split up the CI changes from the implementation so that things are easier to revert/git blame in the future.
There was a problem hiding this comment.
agreed, but splitting up would break the e2e since the CI changes are needed, let's keep this in mind for the next PR but I'd rather merge it for now since it's an important fix.
sample/android/app/src/main/java/io/sentry/sample/MainApplication.java
Outdated
Show resolved
Hide resolved
|
Thanks @AbhiPrasad! Just got back from thanksgiving break and addressed your review. Next time will make separate PRs for CI changes. |
|
thanks for reviewing @AbhiPrasad |
📢 Type of change
📜 Description
This fix will appear to not work in the original sample app in this repo as our SDK will use the promise library from the root folder instead of the one inside the sample folder that React Native uses. Thus the end to end tests have been updated to use a packaged version of the SDK via
yalc. This way the promise rejection handler will be tested.e2e test workflow will run the script
sample/scripts/prepareConfigsForTesting.shwhich will swap out the babel config and the metro config to the testing one which will use the packaged SDK instead.Extra
💡 Motivation and Context
Fixes #1077
💚 How did you test it?
End to end tests will now package the SDK and test the unhandled promise instrumentation.
📝 Checklist
🔮 Next steps
Merge docs PR getsentry/sentry-docs#4392