firebase-js-sdk
firebase-js-sdk copied to clipboard
Cannot inject key into script value on iOS 16.7.4
Operating System
iOS 16.7.4
Browser Version
Safari
Firebase SDK Version
10.7.2
Firebase SDK Product:
Auth
Describe your project's tooling
React app
Describe the problem
This issue affects users on iOS 16.7.4. The problem was also present in the iOS 17.2 Beta, but was fixed before release. It was not fixed in iOS 16.7.4, however.
The Firebase SDK does not respond anymore. We use a subscription to onAuthStateChanged
in our app state, but nor the nextObserver, neither the errorCallback is called.
When the issue arises, we observe following error when our app is launched on an affected device.
UnknownError: Cannot inject key into script value
This issue was also referenced here, but closed already.
Steps and code to reproduce issue
Create Firebase app (auth, Firestore) and open it in Safari on iOS 16.7.2. Make sure offline persistence is enabled. Upgrade the device to iOS 16.7.4. Open the app again. It will print the error above, and the sync will hang.
We are experiencing this issue as well. We upgraded the Firebase SDK from 8.10.1 to 10.7.2 in an attempt to resolve the issue but can confirm that it is still occurring on 10.7.2, on iOS 16.7.4 only. In our case it's a cordova app.
This seems to be the same as this issue https://github.com/firebase/firebase-js-sdk/issues/7742 It seems to be a Safari/iOS bug and I'm not sure what we could do to work around it.
The other issue that was link has since been closed and resolved. Are you still experiencing this issue? Thanks!
Hey @bo-rik. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@bo-rik if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.