-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
RCOCOA-2310: Fix a crash when receiving 401/403 when opening a watch stream #8536
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dianaafanador3
approved these changes
Apr 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!, Just a few comments
@@ -26,10 +26,13 @@ final public class WatchTestUtility: ChangeEventDelegate { | |||
private let openExpectation: XCTestExpectation | |||
private let closeExpectation: XCTestExpectation | |||
private var changeExpectation: XCTestExpectation? | |||
private let expectError: Bool | |||
public var closeError: Error? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
public var closeError: Error? | |
public var didCloseError: Error? |
nirinchev
added a commit
that referenced
this pull request
Apr 10, 2024
* master: RCOCOA-2305: Update base url to point to services.cloud.mongodb.com (#8537) Update docs URL (#8538) RCOCOA-2310: Fix a crash when receiving 401/403 when opening a watch stream (#8536) Add core version to build-binaries workflow (#8525) Add an empty changelog section Upgrade to core 14.4.1 (#8526) Release v10.49.0 Upgrade to core 14 (#8496) RCOCOA-2308: Add GHA workflow for core prebuilds (#8517) Release 10.48.1 Add NSPrivacyAccessedAPICategoryDiskSpace to the privacy manifest (#8511) 🔄 Synced file(s) with realm/ci-actions (#8520) Add build-binaries workflow (#8515) Only commit the changelog in the add empty changelog release step (#8505) Release 10.48.0 Introduce `_customRealmProperties()` to all Realm Objects to allow for client-generated RLMProperties (via Swift Macros) (#8490) Update packaging for Xcode 15.3 (#8502) # Conflicts: # Realm/RLMAsyncTask.mm # Realm/RLMSyncSession.mm
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like we can end up in a situation where
URLSession:didCompleteWithError
is invoked withnil
error, which results in a crash if we try to insert it as a value forNSError.userInfo
dictionary. With this change we insert[NSNull null]
forNSUnderlyingErrorKey
instead.I've added a test that uses the watch functionality as that appears to be the only thing that exercises the
RLMEventSessionDelegate
codepaths. It's not the cleanest test, but I couldn't come up with anything better that reproduces the crash.Fixes #8519