Я нашел несколько других сообщений, но без решения я отправляю это ..
Используя примеры с firebase, я могу загрузить свой файл в хранилище firebase, но не могу получить GetDownloadUrlAsync () - он возвращает неизвестную ошибку:
GetDownloadUrlAsync: System.AggregateException: One or more errors
occurred. ---> Firebase.Storage.StorageException: An unknown error
occurred
--- End of inner exception stack trace ---
---> (Inner Exception #0) Firebase.Storage.StorageException: An
unknown error occurred<---
System.Action`1:Invoke(T)
System.Threading.Tasks.Task:Execute()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext,
ContextCallback, Object, Boolean)
System.Threading.Tasks.Task:ExecuteWithThreadLocal(Task&)
System.Threading.Tasks.Task:ExecuteEntry(Boolean)
System.Threading.ThreadPoolWorkQueue:Dispatch()
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Это происходит в сопрограмме. Вот мой код:
Firebase.Storage.FirebaseStorage storage = Firebase.Storage.FirebaseStorage.DefaultInstance;
Firebase.Storage.StorageReference storage_ref = storage.GetReferenceFromUrl("gs://mystoragelocation.appspot.com");
Firebase.Storage.StorageReference image_ref = storage_ref.Child(file_name);
var task = image_ref.PutFileAsync(path);
yield return new WaitUntil(() => task.IsCompleted);
if (task.IsFaulted) {
uploadWait.SetActive(false);
result.text = task.Exception.ToString();
DebugLog ("Upload Error: " + task.Exception.ToString ());
throw task.Exception;
} else {
storage_ref.GetDownloadUrlAsync().ContinueWith((task2) => {
if (!task2.IsFaulted && !task2.IsCanceled) {
DebugLog("Finished uploading... Download Url: " + task2.Result);
} else {
DebugLog ("GetDownloadUrlAsync: " + task2.Exception.ToString ());
}