Skip to content

Potential data race in Storage method #13369

Closed
@jesus-mg-ios

Description

@jesus-mg-ios

Description

image

Reproducing the issue

Define a storage instance and call storage.reference(forURL: String) from multiple threads and sometimes the warn in Xcode happened.
image

 let task = Task { try await withCheckedThrowingContinuation { continuation in let storageReference = self.storage.reference(forURL: referencePath) storageReference.getData() { data, error in if let error { continuation.resume(throwing: error) return } guard let data, !data.isEmpty else { continuation.resume(throwing: Error.error) return } continuation.resume(returning: data) } } as Data } return await task.value 

Firebase SDK Version

10.25.0

Xcode Version

15.2

Installation Method

Swift Package Manager

Firebase Product(s)

Storage

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    close