[Bug] iOS Storage reads are never Auth'd
See original GitHub issue[REQUIRED] Please fill in the following fields:
- Unity editor version: 2019.4.28f
- Firebase Unity SDK version: 8.1.0
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: Storage
- Other Firebase Components in use: Auth, Database, Firestore
- Additional SDKs you are using: Yodo1, Megacool
- Platform you are using the Unity editor on: Windows + Mac
- Platform you are targeting: iOS, Android (issues happening on iOS)
- Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)
[REQUIRED] Please describe the issue here:
In our current project, we are using a mix of both Firestore and Storage to create a UGC browser. However, on iOS Storage reads always returns the error Error Code '-13021' 'User' is not authorized to perform the desired action.
Even though we have no problem writing to our storage with the exact same check allow read, write: if request.auth != null
. Similar rules setup on firestore have no issues running and succeed.
Here’s the setup with a Repro project
Steps to reproduce:
What’s the issue repro rate? (eg 100%, 1/5 etc) 100% Reproduction rate
What happened? How can we make the problem occur?
- Setup a project which will download anything from storage. Can be an image or whatever.
- Setup your security rules for reading from the database to check if the user is Authenticated
request.auth != null
- Authorise the user with any kind of Authentication method. For the repro, we use anonymous authentication.
- Make an iOS build to test on. [Editor + Android works as expected]
- Once authenticated attempt to download anything from the storage.
- Note that you get an error noting that the user is not authorized to perform the action. However we should be allowed as the rules allow authorized reads, and the file on the server exists
I’ve attached a repro with more in-depth instructions which is already set up here.
Let me know if I’m missing anything or need to make anything more clear. Cheers, Chris.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (2 by maintainers)
Top Results From Across the Web
iPhone storage bug on iOS 15.3 - incorrec…
iPhone storage bug on iOS 15.3 - incorrect categories, freezing, Messages & iCloud issues. I set up my iPhone 13 several months ago, ......
Read more >Anyone has this iphone storage bug when it loads ...
I got this problem since updating to iOS 15 and seems like 15.0.1 and 15.0.2 still didnt fix it,tried rebooting and several other...
Read more >How to Fix: 'iPhone Storage Almost Full' iOS 15 Bug 2023, 2022
Chances that you may fix the bug by browsing Settings > General > About and compare the Capacity and Availability readings.
Read more >Fixed: Notification Says iPhone Storage Almost Full When ...
Sometimes, after updating, your iPhone says storage is full, despite having plenty of space. This is a known software bug.
Read more >iPhone Storage NOT LOADING or UPDATING Problem How ...
Is your iPhone Storage not calculating and stuck on categories loading page? ... Twitter App NOT VISIBLE in iOS Share Sheet Problem [FIX] ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ve released a new version of the Firebase for Unity SDK, 9.0.0, available here: https://github.com/firebase/firebase-unity-sdk/releases/tag/v9.0.0, that includes the fix for this.
The problem seems to have been in how the C++ SDK was interacting with the iOS SDK, but the iOS SDK was rewritten into swift, so there isn’t a PR on the Unity side that reflects the fix, but from personal testing, I wasn’t able to reproduce it after updating. Thanks for flagging this, and sorry it took a while to fix.
Hi all,
We’ve been struggling to reproduce this issue (including the repro case that you’ve provided). We did recently ship a new version, 8.9.0, which contains a fix to EDM4U, the tool we use to manage iOS dependencies, to properly handle source Cocoapods. I’m not sure if that will resolve the problem though, as we haven’t been able to reproduce it on older versions either.
To confirm, this only seems to be happening on Read, not on Write?