Skip to content

A few FirebaseStorage bugs on iOS SDK 10 #10374

@russellwheatley

Description

@russellwheatley

Description

I've created a repository with a full reproduction of the issues we experienced trying to integrate FlutterFire with iOS SDK 10. Please see issue reproduction details for the bugs we found. The downloadURL issue may actually be a problem with firebase-tools, not sure.

Reproducing the issue

Here's the repository which illustrates the issues: https://github.com/invertase/ios-sdk-10-issues

Ripped from the README.md of that repository:

To reproduce and what to expect:

  1. Clone repo and pod install. Open xcworkspace in Xcode.
  2. Run Storage emulator and allow all read/write operations in Storage rules.
  3. Run the app.
  4. downloadUrl method fails when using it in combination with the Storage emulator. Press the "downloadUrl emulator failure" button to see the error produced. The response includes a metadata object not stringified which I think is the problem. Comment out the emulator initialization and run app again to see a successful response. It does not contain a
    metadata object.
  5. putFile method fails when there is no "path" property in metadata. Press the "putFile failure" button to see this error: "Fatal error: Internal error enqueueing a Storage task". It's because path does not exist on metadata which is a read only property. It can be worked around using intializeWithDictionary and adding "name" property as it puts "name" on "path" property here
  6. updateMetadata method fails to update customMetadata when you initialise metadata with initWithDictionary. Press the "updateMetadata failure" button to see response does not include updated custom metadata (i.e. "foo":"bar" in this example). If you comment out the way FIRStorageMetadata is initialised here and uncomment here, you will see custom metadata in response.

I have more detailed notes on the PR that landed for FlutterFire here

Firebase SDK Version

10.0.0

Xcode Version

14.0.1

Installation Method

CocoaPods

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
PODS:
  - FirebaseAppCheckInterop (10.0.0)
  - FirebaseAuthInterop (10.0.0)
  - FirebaseCore (10.0.0):
    - FirebaseCoreInternal (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/Logger (~> 7.8)
  - FirebaseCoreExtension (10.0.0):
    - FirebaseCore (~> 10.0)
  - FirebaseCoreInternal (10.0.0):
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseStorage (10.0.0):
    - FirebaseAppCheckInterop (~> 10.0)
    - FirebaseAuthInterop (~> 10.0)
    - FirebaseCore (~> 10.0)
    - FirebaseCoreExtension (~> 10.0)
    - GTMSessionFetcher/Core (~> 2.1)
  - GoogleUtilities/Environment (7.8.0):
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/Logger (7.8.0):
    - GoogleUtilities/Environment
  - "GoogleUtilities/NSData+zlib (7.8.0)"
  - GTMSessionFetcher/Core (2.1.0)
  - PromisesObjC (2.1.1)

DEPENDENCIES:
  - FirebaseCore
  - FirebaseStorage

SPEC REPOS:
  trunk:
    - FirebaseAppCheckInterop
    - FirebaseAuthInterop
    - FirebaseCore
    - FirebaseCoreExtension
    - FirebaseCoreInternal
    - FirebaseStorage
    - GoogleUtilities
    - GTMSessionFetcher
    - PromisesObjC

SPEC CHECKSUMS:
  FirebaseAppCheckInterop: 9a7af9d0a4d9197265cda30194f3644e8aea24f9
  FirebaseAuthInterop: c342679f45bee2a665a3b9148a55fcdb10df8c66
  FirebaseCore: 97f48a3a567a72b8d4daa0f03c3aadb78df4e995
  FirebaseCoreExtension: 449595a035812f16314ca88cebf959e3bb77dd67
  FirebaseCoreInternal: 5eb3960335da5ea30115d57d39db6988c4ad06f3
  FirebaseStorage: 8b0b0630e11b9f3e4a479a26cfccb70ec790ec50
  GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7
  GTMSessionFetcher: ffbb25ec00ebcb5201adab0a56d808f6f1902d9f
  PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb

PODFILE CHECKSUM: ceb067e068b541148ba09522826f60b3700a4865

COCOAPODS: 1.11.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions