firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.69k stars 1.49k forks source link

Realtime Database: unknown issue intermittently causing app to not connect to database after 10.25.0 #14188

Open duncannz opened 1 day ago

duncannz commented 1 day ago

Description

We recently released an update to our React Native mobile app that included an upgrade of @react-native-firebase/database from 19.0.0 to 21.0.0, which caused the corresponding Firebase/Database pod to upgrade from version 10.21.0 to 11.2.0.

Although we did not manage to reproduce the issue ourselves, which unfortunately means we do not have any logs, we received an influx of user reports after releasing this update of app behaviour that made it clear that no data was loading from Realtime Database after upgrading to this version. For any given user, the behaviour was intermittent - they could usually fix it temporarily by closing (swiping away from recents) and re-opening the app. Affected users were spread across iOS versions from 16.x to the latest 18.1.1 (i.e. versions much newer than those with the iOS 15 NSURLSessionWebSocket permessage-deflate bug).

After looking through everything that had changed in that version, we identified this upgrade of @react-native-firebase/database (and in turn the Firebase/Database pod) as a potential culprit, and in particular our attention was drawn to the following change in version 10.27.0 of the pod:

[RTDB] Use NSURLSessionWebSocket instead of SocketRocket where possible by @paulb777 in https://github.com/firebase/firebase-ios-sdk/pull/12894

As such, we released another app update in which the only change was to roll back @react-native-firebase/database from 21.0.0 to 20.0.0, which rolled the Firebase/Database pod back from 11.2.0 to 10.25.0 (the version just before the aforementioned change).

This resolved the issue - we stopped receiving those reports after users updated to this app version - so we do believe that that change seems like the most likely culprit. I know this doesn't provide enough information to reproduce and resolve the issue, but I'm hoping it will at least be a starting point in case anyone else has experienced anything similar, or has any ideas.

There is one iOS bug (that will most likely never be fixed) that I've faced before / am aware of that feels like it could somehow be relevant or at least worth looking into - perhaps SocketRocket previously included a workaround for it - but it could also be totally unrelated: https://stackoverflow.com/a/63626414/16739999

Reproducing the issue

No response

Firebase SDK Version

11.2.0

Xcode Version

15.4

Installation Method

CocoaPods

Firebase Product(s)

Database

Targeted Platforms

iOS

Relevant Log Output

No response

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

No response

If using CocoaPods, the project's Podfile.lock

No response

google-oss-bot commented 1 day ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.