这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jmkrein
Copy link
Contributor

@jmkrein jmkrein commented Jul 3, 2024

📜 Description

Fix an app crash that occurs when trying to log an invalid value for the key NSUnderlyingErrorKey within the userInfo of an NSError.

💡 Motivation and Context

Fixes #4143

Huge credit to dohyeondk for helping identify the root cause of this issue.

💚 How did you test it?

Added two new unit tests.

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@krystofwoldrich
Copy link
Contributor

Hi @jmkrein,
thank you for opening this fix,
we will review it shortly, excuse the slower response time due to ongoing PTOs/Holidays.

Copy link
Contributor

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good to me! But before we can merge it, one of the code owner will need to review it as well.

@jmkrein jmkrein marked this pull request as ready for review July 5, 2024 14:58
@jmkrein
Copy link
Contributor Author

jmkrein commented Jul 5, 2024

No worries on the delay, I totally understand. Thank you for the review, @krystofwoldrich!

@codecov
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.410%. Comparing base (7e757f4) to head (a9d1dda).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4144       +/-   ##
=============================================
+ Coverage   91.377%   91.410%   +0.033%     
=============================================
  Files          605       605               
  Lines        48267     48302       +35     
  Branches     17409     17440       +31     
=============================================
+ Hits         44105     44153       +48     
+ Misses        4070      4057       -13     
  Partials        92        92               
Files Coverage Δ
Sources/Sentry/SentryClient.m 98.464% <100.000%> (+0.048%) ⬆️
Tests/SentryTests/SentryClientTests.swift 97.611% <100.000%> (+0.038%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e757f4...a9d1dda. Read the comment docs.

@brustolin
Copy link
Contributor

We just need an entry for the CHANGELOG

@jmkrein jmkrein force-pushed the jk/fix/invalid-NSUnderlyingErrorKey branch from 14fbe63 to 4b13194 Compare July 8, 2024 16:44
@brustolin brustolin merged commit 86660d6 into getsentry:main Jul 10, 2024
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

Successfully merging this pull request may close these issues.

Invalid NSError object can cause crash

4 participants