firebase-unity-sdk: [Question] GetFileAsync fails on iOS with unknown error
Please fill in the following fields:
- Unity editor version: 2022.1.8f1
- Firebase Unity SDK version: 8.10.1
- Source you installed the SDK: .tgz from https://developers.google.com/unity/archive#play_asset_delivery
- Problematic Firebase Component: storage
- Other Firebase Components in use: analytics, app, auth, crashlytics, dynamic-links, firestore, functions, remote-config
- Additional SDKs you are using: Facebook
- Platform you are using the Unity editor on: Windows
- Platform you are targeting: iOS
- Scripting Runtime: IL2CPP
Please describe the issue here:
We are trying to load file from Firebase storage using code:
var storageReference = storage.GetReferenceFromUrl(url)
storageReference .GetFileAsync()
We are using the same code on Windows, Android without any problems.
On iOS, however, the same logic fails with error:
An unknown error occurred, error code: 13000, httpResultCode: 300
The exception is not the informative in that case.
Any ideas why this is happening only on iOS, and what we can do to fix that issue?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (4 by maintainers)
The issue still persists, but we just stopped using
GetFileAsync
, and instead, we useGetDownloadUrlAsync
to fetch url, and then manually download the file toApplication.persistentDataPath
viaUnityWebRequest
Thanks for the additional input, @aixaCode. I was able to reproduce the issue, and it seems odd that this is encountered on just the iOS platform. I’ll let the team know about this, and you may refer to this thread for any updates.
Good moorning. We faced quite same issue, but with function
GetBytesAsync
:we use
Firebase.Storage
to store some raw binary files. By a twist of fate I have the same account for login with test email through UnityEditor (win/mac) and through Apple Login on my IPhone.We use
PutBytesAsync
to upload data on storage. And it works on every (Editor win/mac, win Builds (il2cpp), Android builds (il2cpp), and iOS also) platform on the same way (as a ressult, we handle the same file on Storage’s bucket: I Load it by hand from web-page and view from byte-viewer programm).But when we call
GetBytesAsync
we receive byte-array of the same length, but iOS download it with another content.Unfortunatly, I’ll be able to provide enhanced information this evening (about 8PM, UTC +3). But I believe that
GetFileAsync
failed on the same reason: in some way iOS load byte-data in an inappropriate way.At this evening I’'ll provide both byte-array data that has been uploaded and that has been downloaded.
But you may have some thoughts about it before my sdk-upgrade event, I’ll glad to test them. Thanx a lot!