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

Add nil check for crash #3799

Merged
merged 1 commit into from
Jan 11, 2025
Merged

Add nil check for crash #3799

merged 1 commit into from
Jan 11, 2025

Conversation

bbirman
Copy link
Member

@bbirman bbirman commented Jan 11, 2025

No description provided.

@@ -104,7 +104,12 @@ - (void)completeWithSuccess {
if (self.completionBlock) {
dispatch_async(dispatch_get_main_queue(), ^{
SFUserAccount *account = [[SFUserAccountManager sharedInstance] accountForCredentials:self.credentials];
NSDictionary *userInfo = @{ kSFNotificationUserInfoAccountKey : account };
Copy link
Member Author

Choose a reason for hiding this comment

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

There’s a crash reported at this line with reason -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] but we don’t have app logs or repro steps. It looks like the crash would be because the account is nil so I added a check for that for now but I’d like to dig deeper into why the account is nil if we get any more info

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.11%. Comparing base (33923fa) to head (6cf01c0).
Report is 1265 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff            @@
##           dev    #3799       +/-   ##
========================================
+ Coverage     0   62.11%   +62.11%     
========================================
  Files        0      225      +225     
  Lines        0    21582    +21582     
========================================
+ Hits         0    13406    +13406     
- Misses       0     8176     +8176     
Components Coverage Δ
Analytics 84.09% <72.09%> (∅)
Common 68.96% <85.90%> (∅)
Core 50.74% <34.55%> (∅)
SmartStore 73.70% <ø> (∅)
MobileSync 87.58% <93.26%> (∅)
Files with missing lines Coverage Δ
...rceSDKCore/Classes/OAuth/SFOAuthSessionRefresher.m 81.57% <100.00%> (ø)

... and 206 files with indirect coverage changes

@bbirman bbirman merged commit eec01c6 into forcedotcom:dev Jan 11, 2025
7 of 8 checks passed
@bbirman bbirman deleted the dictionary-crash branch January 11, 2025 02:36
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.

3 participants