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

Bump firebase from 7.14.2 to 8.5.0 #1362

Closed
wants to merge 5 commits into from

Conversation

0xdevalias
Copy link
Contributor

@0xdevalias 0xdevalias commented May 6, 2021

Bumps firebase from 7.14.2 to 7.24.0

Partially fixes sparkletown/internal-sparkle-issues#617

Partially fixes sparkletown/internal-sparkle-issues#645

Release Notes

  • Old Version: 7.14.2 (April 23, 2020): release notes
  • a whole bunch of bug fixes, features, etc (only calling out some interesting/notable ones)
    • 7.14.6 (May 29, 2020; release notes)
      • Feature: Added support for calling FirebaseFiresore.settings with { ignoreUndefinedProperties: true }. When this parameter is set, Cloud Firestore ignores undefined properties inside objects rather than rejecting the API call.

    • 7.16.0 (July 09, 2020; release notes)
      • Fixed: Clear timeout after a successful response or after the request is canceled

        • Callable Function throw Deadline Exceeded Error even on successful response

    • 7.18.0 (August 13, 2020; release notes)
      • Fixed: The SDK no longer crashes with the error "The database connection is closing". Instead, the individual operations that cause this error may be rejected.

    • 7.19.0 (August 20, 2020; release notes)
      • Feature: Released @firebase/rules-unit-testing to replace the @firebase/testing package.

    • 7.21.0 (September 17, 2020; release notes)
      • Changed: The SDK now uses FirestoreError instead of Error in onSnapshot*() error callbacks.

    • 7.22.0 (October 1, 2020; release notes)
      • Feature: Users can now set a custom domain for callable functions.

    • 7.23.0 (October 8, 2020; release notes)
      • Changed: Moved the loggingEnabled check to wait until performance initialization finishes, which prevents the SDK from dropping custom traces right after getting the performance object.

      • Throws an exception when startTime or duration is not a positive value in the trace.record() API.

  • 8.0.0 (October 26, 2020; release notes, BREAKING CHANGES)
    • Breaking change: browser fields in package.json files now point to ESM bundles instead of CJS bundles. Users who are using ESM imports must now use the default import instead of a namespace import.

      • Before 8.0.0: import * as firebase from 'firebase/app'

      • After 8.0.0: import firebase from 'firebase/app'

      • Code that uses require('firebase/app') or require('firebase') will still work, but in order to get proper typings (for code completion, for example) users should change these require calls to require('firebase/app').default or require('firebase').default. This is because the SDK now uses typings for the ESM bundle, and the different bundles share one typings file.

    • Breaking change: Removed deprecated experimentalTabSynchronization settings. To enable multi-tab synchronization, use synchronizeTabs instead.

    • Breaking change: Removed the timestampsInSnapshots option from FirestoreSettings. Now, Cloud Firestore always returns Timestamp values for all timestamp values.

    • Changed: This release removes runtime type validations that are covered by TypeScript. Developers can use our TypeScript types to validate API usage.

  • a whole bunch of bug fixes, features, etc (only calling out some interesting/notable ones)
    • 8.0.1 (November 5, 2020; release notes)
      • Feature: Added a withFunctionTriggersDisabled method which runs a user-provided setup function with emulated Cloud Functions triggers disabled. This can be used to import data into the Realtime Database or Cloud Firestore emulators without triggering locally emulated functions. This method only works with Firebase CLI version 8.13.0 or higher.

    • 8.0.2 (November 12, 2020; release notes)
      • The SDK now retries IndexedDB errors a fixed number of times to handle connection issues in mobile WebKit.

    • 8.1.2 (; release notes)
      • Fixed: Fixed a bug that prevented usage of FieldPath objects with multiple special characters.

    • 8.2.0 (December 11, 2020; release notes)
      • Feature: Released Firestore Bundles (pre-packaged Firestore data). For NPM users, this can be enabled via an additional import: firebase/firestore/bundle. For CDN usage, it is enabled by default.

      • Changed: A write to a document that contains FieldValue transforms is no longer split up into two separate operations. This reduces the number of writes the backend performs and allows each WriteBatch to hold 500 writes regardless of how many FieldValue transformations are attached.

      • Changed: Changed to dispatch no more than 1000 collected performance events for each network request. Events over the cap will be queued and sent with the next dispatch.

    • 8.2.1 (December 17, 2020; release notes)
      • Fixed: Fixed an issue that prevented the SDK from automatically retrieving custom claims for a User

    • 8.2.2 (January 7, 2021; release notes)
      • Fixed: Fixed an issue in the Transaction API that caused the SDK to return invalid DocumentReference objects through DocumentSnapshot.data() calls.

    • 8.2.4 (January 21, 2021; release notes)
      • Fixed: Fixed an error that caused FirestoreDataConverter.fromFirestore() to be called with an incorrect QueryDocumentSnapshot object.

    • 8.2.5 (January 28, 2021; release notes)
      • Fixed: Classes like DocumentReference and Query can now be serialized to JSON

    • 8.2.6 (February 04, 2021; release notes)
      • Fixed: Correctly handle ignoreUndefinedProperties in set({ merge: true }). Previously this would behave as if the undefined value were FieldValue.delete(), which wasn't intended.

    • 8.2.7 (February 11, 2021; release notes)
      • Fixed a bug where local cache inconsistencies were unnecessarily being resolved.

    • 8.2.8 (February 18, 2021; release notes)
      • Fixed a behavior causing gtag.js to be downloaded twice on Firebase Analytics initialization.

    • 8.3.0 (March 10, 2021; release notes)
      • Feature: Added support to remove the FirestoreDataConverter on a Firestore reference by calling withConverter(null)

    • 8.4.0 (April 12, 2021; release notes)
      • Fixed a bug where decimal inputs to Timestamp.fromMillis() were calculated incorrectly due to floating point precision loss.

    • 8.4.2 (April 23, 2021; release notes)
      • Fixed an issue where errors from grpc are thrown directly to user code. Now they are wrapped in FirestoreError.

      • Fixed the infinite recursion caused by the FirebaseStorageError message getter.

    • 8.5.0 (May 5, 2021; release notes)
      • Note: This is the latest version listed in the Firebase JavaScript SDK Release Notes at this time (though it's not the latest version that exists)
  • 9.0.0 (beta) (BREAKING CHANGES)

PR Notes

  • Let's not upgrade to the 9.0.0 beta in this PR (though i'm super keen for it's final release, as it introduces modular code/tree shakeable code!)
  • Seemingly can't upgrade to 8.5.0 at the moment due to dependency version incompatibilities between firebase and firebase-admin (see Bump firebase from 7.14.2 to 8.5.0 #1362 (comment))

See Also

@0xdevalias 0xdevalias added dependencies Pull requests that update a dependency file 💥 tech-debt labels May 6, 2021
@0xdevalias 0xdevalias requested a review from a team as a code owner May 6, 2021 09:43
@0xdevalias 0xdevalias self-assigned this May 6, 2021
@0xdevalias 0xdevalias temporarily deployed to feature-preview May 6, 2021 09:44 Inactive
@0xdevalias 0xdevalias marked this pull request as draft May 6, 2021 09:44
@codeclimate
Copy link

codeclimate bot commented May 6, 2021

Code Climate has analyzed commit c40d4b5 and detected 0 issues on this pull request.

View more on Code Climate.

@github-actions
Copy link

github-actions bot commented May 6, 2021

Visit the preview URL for this PR (updated for commit c40d4b5):

https://co-reality-staging--preview-pr-1362-9d7btseg.web.app

(expires Fri, 21 May 2021 08:37:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@0xdevalias 0xdevalias added the 🐛 bug A bug, error, issue, problem, etc within the platform. label May 6, 2021
@0xdevalias 0xdevalias changed the title bump firebase from 7.14.2 to 7.24.0 bump firebase from 7.14.2 to 8.5.0 May 6, 2021
@0xdevalias
Copy link
Contributor Author

0xdevalias commented May 6, 2021

Bumping to 8.5.0 caused the following to be displayed:

npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.

Looking at npm ls @firebase/util:

⇒  npm ls @firebase/util
[email protected] /Users/devalias/dev/sparkle/sparkle
├─┬ [email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]  deduped
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── UNMET PEER DEPENDENCY @firebase/[email protected]  deduped
│ │ └── UNMET PEER DEPENDENCY @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ └─┬ @firebase/[email protected]
│ │   └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── UNMET PEER DEPENDENCY @firebase/[email protected]  deduped
│ │ └── UNMET PEER DEPENDENCY @firebase/[email protected]
│ └── @firebase/[email protected]
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    ├─┬ @firebase/[email protected]
    │ └── @firebase/[email protected]  deduped
    └── @firebase/[email protected]

npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]
npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]
npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]
npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]

It looks like:


Even after running npm update firebase-admin to bump it to the latest version (9.7.0), firebase-admin still seems to want a 0.x version (@firebase/[email protected]) of @firebase/util

..snip..
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    ├─┬ @firebase/[email protected]
    │ └── @firebase/[email protected]  deduped
    └── @firebase/[email protected]

npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]
npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]
npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]
npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]

After running npm i @firebase/util to get @firebase/[email protected], we see a different error message:

npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.

Looking at npm ls @firebase/util:

⇒  npm ls @firebase/util
[email protected] /Users/devalias/dev/sparkle/sparkle
├── @firebase/[email protected]
├─┬ [email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]  deduped
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ └─┬ @firebase/[email protected]
│ │   └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ └── @firebase/[email protected]
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    ├─┬ @firebase/[email protected]
    │ └── @firebase/[email protected]
    └── UNMET PEER DEPENDENCY @firebase/[email protected]

npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]

I also found this similar issue on StackOverflow that seems to be the same issue, but between firebase and firebase-tools (rather than firebase-admin):

It looks like we're using quite an old version of firebase-tools as well:

We should probably update that soon too.. though probably as a separate PR if we don't need it to resolve version issues here.


It looks like the latest released version of firebase (8.5.0) may not be compatible with the latest released version of firebase-admin (8.7.0)


There seems to be an open issue / fix PR for this in the firebase-admin repo:

@0xdevalias
Copy link
Contributor Author

0xdevalias commented May 6, 2021

npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.

Based on the below, I expect we'll basically need to find versions of @firebase/auth, @firebase/firestore and @firebase/storage that rely on the 0.x version of @firebase/util:

⇒  npm ls @firebase/auth-types
[email protected] /Users/devalias/dev/sparkle/sparkle
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    └── @firebase/[email protected]
⇒  npm ls @firebase/firestore-types
[email protected] /Users/devalias/dev/sparkle/sparkle
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    └── @firebase/[email protected]
⇒  npm ls @firebase/storage-types
[email protected] /Users/devalias/dev/sparkle/sparkle
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    └── @firebase/[email protected]

Plan for tomorrow: Try 'stepping back' in firebase versions to find the last time it relied on a 0.x version of @firebase/util, and see if that works for us till firebase/firebase-admin-node#1241 / firebase/firebase-admin-node#1250 land.

  • 8.5.0
  • 8.4.3

@0xdevalias 0xdevalias temporarily deployed to feature-preview May 7, 2021 08:34 Inactive
@0xdevalias
Copy link
Contributor Author

0xdevalias commented May 11, 2021

RE: #1362 (comment)

It looks like a new version of firebase-admin has just been released that updates a bunch of the internal dependencies:

This might fix the issues we were seeing with conflicting versions. Worth checking it out before going any further in trying to find an older compatible release.

@0xdevalias
Copy link
Contributor Author

0xdevalias commented May 12, 2021

Edit: This version is buggy/broken, see #1362 (comment):

Looks like firebase 8.6.0 is out now too:

@0xdevalias
Copy link
Contributor Author

firebase 8.6.1 bugfix version released:

@0xdevalias
Copy link
Contributor Author

@0xdevalias 0xdevalias changed the title bump firebase from 7.14.2 to 8.5.0 Bump firebase from 7.14.2 to 8.5.0 May 24, 2021
@yurii-lubynets
Copy link
Contributor

will be fixed in scope #1883

@0xdevalias
Copy link
Contributor Author

0xdevalias commented Jul 25, 2021

will be fixed in scope #1883

@yurii-lubynets it tends to be poor open-source etiquette to throw away previous contributions that solve the same problem; particularly without at least making use of the commits contributed, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A bug, error, issue, problem, etc within the platform. dependencies Pull requests that update a dependency file 💥 tech-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants