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

feat(firebase_storage_web): web support #3917

Merged
merged 42 commits into from
Nov 19, 2020

Conversation

ditman
Copy link
Contributor

@ditman ditman commented Oct 20, 2020

Description

This PR introduces a web version for firebase_storage. It is unit tested.

This package has been integration-tested against the current integration tests of firebase_storage. Some tweaks were needed for the tests, but those are in a separate PR, so they can be merged separately.

Related Issues

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

@ditman ditman requested review from Ehesp and Salakar October 20, 2020 00:19
@google-cla google-cla bot added the cla: yes label Oct 20, 2020
/// Upload a [Blob]. Note; this is only supported on web platforms.
///
/// Optionally, you can also set metadata onto the uploaded object.
TaskPlatform putBlob(dynamic data, [SettableMetadata metadata]) {
Copy link
Member

Choose a reason for hiding this comment

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

Any ideas what we can do here @ditman for actually having a Blob type rather than dynamic? I'm not sure how it works on the public facing library since we would need to be pulled in. I was thinking of a stub class, which web overrides?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, maybe an assert(data is html.Blob), or some other runtime check?

We can't really import anything from dart:html when compiling for mobile (the library is not available there); do you think we should provide a BlobPlatform type? What would that do in the native layer, just wrap the bytes?

@ditman
Copy link
Contributor Author

ditman commented Oct 20, 2020

I ran some e2e tests in package:firebase_storage for web, and got the following (very useful) report:

Driver tests failed: 15 (-d chrome):
1) getDownloadURL > gets a download url
   [E]: FirebaseError: Firebase Storage: Object 'ok.jpeg' does not exist. (storage/object-not-found)
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/firebase/src/utils.dart:142:7                                       handleThenable
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError
          ├─  dart-sdk/lib/async/future_impl.dart:708:46                                   handleError


2) getDownloadURL > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:143:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


3) getDownloadURL > throws error if file does not exist
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:160:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


4) list > returns list results
   [E]: Expected a value of type 'List<String>', but got one of type 'MappedListIterable<StorageReference, String>'
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49     throw_
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:64:3       castError
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart:442:10 cast
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart:420:9       as
          ├─  packages/firebase_storage_web/src/utils/list.dart:27:26                          fbListResultToListResultWeb
          ├─  packages/firebase_storage_web/src/reference_web.dart:67:27                       <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                    <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                    [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                    <fn>
          ├─  dart-sdk/lib/async/zone.dart:1198:47                                             _rootRunUnary


5) Reference > listAll
   [E]: Expected a value of type 'List<String>', but got one of type 'MappedListIterable<StorageReference, String>'
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49     throw_
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:64:3       castError
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart:442:10 cast
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart:420:9       as
          ├─  packages/firebase_storage_web/src/utils/list.dart:27:26                          fbListResultToListResultWeb
          ├─  packages/firebase_storage_web/src/reference_web.dart:83:27                       <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                    <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                    [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                    <fn>
          ├─  dart-sdk/lib/async/zone.dart:1198:47                                             _rootRunUnary


6) putData > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:240:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:45:50           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1198:47                                         _rootRunUnary
          ├─  dart-sdk/lib/async/zone.dart:1100:19                                         runUnary
          ├─  dart-sdk/lib/async/future_impl.dart:143:18                                   handleValue


7) putBlob > throws [UnimplementedError] for native platforms
   [E]: Unsupported operation: _Namespace
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart:200:5              get _namespace
          ├─  dart-sdk/lib/io/directory_impl.dart:138:44                                   get systemTemp
          ├─  dart-sdk/lib/io/directory.dart:230:25                                        get systemTemp
          ├─  test_utils.dart:17:45                                                        createFile
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:84:54           runBody
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:123:12          _async
          ├─  test_utils.dart:16:24                                                        createFile
          ├─  reference_e2e.dart:247:33                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:84:54           runBody


8) putFile > uploads a file
   [E]: Unsupported operation: _Namespace
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart:200:5              get _namespace
          ├─  dart-sdk/lib/io/directory_impl.dart:138:44                                   get systemTemp
          ├─  dart-sdk/lib/io/directory.dart:230:25                                        get systemTemp
          ├─  test_utils.dart:17:45                                                        createFile
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:84:54           runBody
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:123:12          _async
          ├─  test_utils.dart:16:24                                                        createFile
          ├─  reference_e2e.dart:266:33                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:84:54           runBody


9) putFile > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:293:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


10) putString > errors if permission denied
   [E]: Should have thrown an error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:320:9                                                     <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:45:50           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1198:47                                         _rootRunUnary
          ├─  dart-sdk/lib/async/zone.dart:1100:19                                         runUnary
          ├─  dart-sdk/lib/async/future_impl.dart:143:18                                   handleValue


11) updateMetadata > errors if metadata update removes existing data
   [E]: Expected: 'es'
          Actual: <null>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  packages/test_api/src/frontend/expect.dart:150:3                             _expect
          ├─  packages/test_api/src/frontend/expect.dart:59:3                              expect$
          ├─  packages/flutter_test/src/widget_tester.dart:429:3                           expect$
          ├─  reference_e2e.dart:339:9                                                     <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:45:50           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                <fn>


12) updateMetadata > errors if property does not exist
   [E]: should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:352:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


13) updateMetadata > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:370:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


14) writeToFile > downloads a file
   [E]: Unsupported operation: _Namespace
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart:200:5              get _namespace
          ├─  dart-sdk/lib/io/directory_impl.dart:138:44                                   get systemTemp
          ├─  dart-sdk/lib/io/directory.dart:230:25                                        get systemTemp
          ├─  test_utils.dart:17:45                                                        createFile
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:84:54           runBody
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:123:12          _async
          ├─  test_utils.dart:16:24                                                        createFile
          ├─  reference_e2e.dart:379:27                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:84:54           runBody


15) writeToFile > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:396:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


Stopping application instance.
Driver tests failed: 15

I'll try to get as many tests fixed as possible (things dealing with "File" won't work, obviously), but there are some test cases there for error handling that are very handy!

@ditman
Copy link
Contributor Author

ditman commented Oct 20, 2020

I just realized that I'm using the wrong project credentials (my own), so OF COURSE some of the expected/unexpected files are not present; I'll try to reproduce the expected layout in my own firebase storage.

@Salakar
Copy link
Member

Salakar commented Oct 20, 2020

I just realized that I'm using the wrong project credentials (my own), so OF COURSE some of the expected/unexpected files are not present; I'll try to reproduce the expected layout in my own firebase storage.

You could copy the web credentials from the Core, Auth or Firestore example - should work for existing tests then :)

@ditman
Copy link
Contributor Author

ditman commented Oct 21, 2020

You could copy the web credentials from the Core, Auth or Firestore example - should work for existing tests then :)

🤦‍♂️

@ditman
Copy link
Contributor Author

ditman commented Oct 21, 2020

I fixed most of the tests, there's only two outstanding issues:

  1. Tasks are not throwing correctly (or funneling the error object correctly so it's detected by the plugin Task management)
  2. It's not clear how Settable metadata is supposed to work (With the current implementation it's difficult to determine if you're trying to unset a property, or haven't passed it at all, both in our API and in the JS-interop layer's)
Driver tests failed: 3 (-d chrome):
1) putData > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:240:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


2) putString > errors if permission denied
   [E]: Should have thrown an [FirebaseException] error
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  reference_e2e.dart:317:11                                                    <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:60:31           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:138:14                <fn>
          ├─  dart-sdk/lib/async/zone.dart:1214:47                                         _rootRunBinary
          ├─  dart-sdk/lib/async/zone.dart:1107:19                                         runBinary
          ├─  dart-sdk/lib/async/future_impl.dart:157:20                                   handleError


3) updateMetadata > errors if metadata update removes existing data
   [E]: Expected: 'es'
          Actual: <null>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  packages/test_api/src/frontend/expect.dart:150:3                             _expect
          ├─  packages/test_api/src/frontend/expect.dart:59:3                              expect$
          ├─  packages/flutter_test/src/widget_tester.dart:429:3                           expect$
          ├─  reference_e2e.dart:339:9                                                     <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:45:50           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                <fn>


Stopping application instance.
Driver tests failed: 3

Most of the changes I did in tests were to "skip" tests that are not supposed to run in Web (I fixed one that was skipping !kIsWeb when it should not be doing that).

Some less legit test changes:

  • There seems to be a difference in behavior with the value of maxResults of ListOptions. The original test had a value of "1", but in web, it was failing one of the >0 tests (because it was returning a single item and zero prefixes.
  • I also had to tweak errors if property does not exist in the updateMetadata group; is it testing some sort of client-side validation?

@ditman
Copy link
Contributor Author

ditman commented Oct 22, 2020

Finally got the "expected a FirebaseException" tests sorted! The last couple of them were caused because I overlooked how the frontend Task connected its implementation of the Future interface to the underlying delegate task; I missed that I needed to handle errors in the JS SDK task.future, and not only in its onComplete Stream.

The patch above fixes that issue.

Driver tests failed: 1 (-d chrome):
1) updateMetadata > errors if metadata update removes existing data
   [E]: Expected: 'es'
          Actual: <null>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:216:49 throw_
          ├─  packages/test_api/src/frontend/expect.dart:155:31                            fail
          ├─  packages/test_api/src/frontend/expect.dart:150:3                             _expect
          ├─  packages/test_api/src/frontend/expect.dart:59:3                              expect$
          ├─  packages/flutter_test/src/widget_tester.dart:429:3                           expect$
          ├─  reference_e2e.dart:339:9                                                     <fn>
          ├─  dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart:45:50           <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:26                <fn>
          ├─  packages/stack_trace/src/stack_zone_specification.dart:208:15                [_run]
          ├─  packages/stack_trace/src/stack_zone_specification.dart:126:14                <fn>


Stopping application instance.
Driver tests failed: 1

The latest test remaining will need some extra logic to be implemented in the web side; I need to "remember" on each ref what metadata has been set, so I can re-apply it upon further calls to updateMetadata.

This is much easier on JS (only updateMetadata with the settings that you intend to set), but that API is lost with our SettableMetadata definition (and the JS interop's, it seems).

I'll patch it in the reference_web directly tomorrow, and then get some unit tests for the web package as well!

I think this is starting to be a fairly usable implementation of the storage package for web!

@ditman
Copy link
Contributor Author

ditman commented Oct 23, 2020

All e2e tests seem to be passing now!

@ditman
Copy link
Contributor Author

ditman commented Oct 23, 2020

I'll try to add some unit tests, but since flutter test --platform chrome is going away, I'll make them integration_test based instead. I'm also removing the Draft status for this PR.

@ditman ditman marked this pull request as ready for review October 23, 2020 00:44
@ditman ditman changed the title feat(firebase_storage_web): Web version [RFC/WIP] feat(firebase_storage_web): Web version Oct 23, 2020
@google-cla
Copy link

google-cla bot commented Nov 19, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Nov 19, 2020
@Ehesp
Copy link
Member

Ehesp commented Nov 19, 2020

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 19, 2020
@ditman ditman requested a review from kroikie as a code owner November 19, 2020 10:33
@google-cla
Copy link

google-cla bot commented Nov 19, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Nov 19, 2020
@Salakar
Copy link
Member

Salakar commented Nov 19, 2020

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 19, 2020
@Salakar Salakar changed the title feat(firebase_storage_web): Web version feat(firebase_storage_web): web support Nov 19, 2020
@Salakar Salakar merged commit 2b038be into firebase:master Nov 19, 2020
@jesusrp98
Copy link

🎉 Congratulations for the merge of this PR @ditman .
One question, Flutter is telling me that I can't use the master version of this packages, using the latest beta version of Flutter.

Because every version of firebase_storage from git depends on firebase_storage_web any which is forbidden, firebase_storage from git is forbidden.
So, because kraken depends on firebase_storage from git, version solving failed.

@ditman
Copy link
Contributor Author

ditman commented Nov 25, 2020

@jesusrp98 what's your pubspec.yaml? I think you need to override both firebase_storage and web from git to grab the latest code. I don't think _web has been published to pub.dev yet.

@jesusrp98
Copy link

@ditman No worries, it has been published to pub.dev! firebase_storage v5.1.0 :)

@firebase firebase locked and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants