GithubHelp home page GithubHelp logo

Comments (17)

benwulfe avatar benwulfe commented on May 28, 2024 2

Hi Kobe, I've confirmed this is a bug. It is partly due to an issue with Firebase Storage and partly due to a bug in Unity3d.
The fix on the Firebase side is queued and you should see it in the next release. However, the behavior will not be fixed until Unity 5.6 which is currently in beta and fixes a bug in how http urls are handled.
Thanks for taking the time to report this.

from quickstart-unity.

benwulfe avatar benwulfe commented on May 28, 2024

Hi Kobe,

The error indicates that there is a problem creating the output stream, which is the resulting file on disk. It actually is not related to the source of the data in Firebase Storage. Could it be that you are trying to create the file in a subfolder and maybe that subfolder does not exist -- or you do not have permissions to that subfolder?
Can you please indicate the destination path you are using and platform?

-Ben

from quickstart-unity.

kobechenyang avatar kobechenyang commented on May 28, 2024

Hi, Ben

I was trying in editor. Here is my path

storageRef.GetFileAsync(Application.persistentDataPath+'/'+"test.txt").ContinueWith(task ...

I didn't use a coroutine.

I also tried the code from sample app which directly load the file into the memory:

IEnumerator DownloadFromFirebaseStorage() { StorageReference reference = FirebaseStorage.DefaultInstance .GetReferenceFromUrl(firebaseStorageLocation); var task = reference.GetBytesAsync(1024 * 1024); yield return new WaitUntil(() => task.IsCompleted); if (task.IsFaulted) { DebugLog(task.Exception.ToString()); } else { fileContents = Encoding.UTF8.GetString(task.Result); DebugLog("Finished downloading..."); DebugLog("Contents=" + fileContents); } }

I got the same error too.

I only added the extra path in
if (firebaseStorageLocation == null) { firebaseStorageLocation = MyStorageBucket + "path/test.txt"; }

If I remove the path here it works for me.
Thanks.

from quickstart-unity.

kobechenyang avatar kobechenyang commented on May 28, 2024

Cool. Thank you.

from quickstart-unity.

umresh avatar umresh commented on May 28, 2024

I'm facing the same issue did you guys fixed it?

from quickstart-unity.

benwulfe avatar benwulfe commented on May 28, 2024

from quickstart-unity.

etatsu avatar etatsu commented on May 28, 2024

Same here, for some additional info that might (maybe) help you. I am so far getting this on the Unity Editor as well as on an Android device. I am running Unity 5.6.0b3

The Android device is additionally displaying this:

01-09 13:19:05.528 11001 11054 D Unity : UnityWebRequest: reponseCodeCallback with code=400 url=https://firebasestorage.googleapis.com/v0/b/********.appspot.com/o/packages/********?alt=media

The full log being

01-09 13:19:04.740 11001 11054 D Unity : UnityWebRequest: created with method=GET; url=https://firebasestorage.googleapis.com/v0/b/********.appspot.com/o/packages/********?alt=media
01-09 13:19:04.740 11001 11054 D Unity : UnityWebRequest: run
01-09 13:19:04.741 11001 11054 D Unity : UnityWebRequest: headers={X-Firebase-Storage-Version=DotNet/1.0, X-Unity-Version=5.6.0b3, Authorization=Firebase TOKEN}
01-09 13:19:05.526 11001 11054 D Unity : UnityWebRequest: reponseCodeCallback with code=400 url=https://firebasestorage.googleapis.com/v0/b/********.appspot.com/o/packages/********?alt=media
01-09 13:19:05.527 11001 11054 D Unity : UnityWebRequest: headers set
01-09 13:19:05.528 11001 11054 D Unity : UnityWebRequest: contentLengthCallback with length=84
01-09 13:19:05.528 11001 11054 D Unity : UnityWebRequest: reponseCodeCallback with code=400 url=https://firebasestorage.googleapis.com/v0/b/********.appspot.com/o/packages/********?alt=media
01-09 13:19:05.529 11001 11054 D Unity : UnityWebRequest: downloaded
01-09 13:19:05.622 11001 11229 W Unity : gs://.appspot.com/packages/ Exception occurred calling doInBackground.:System.IO.IOException: Could not open resulting stream.
01-09 13:19:05.622 11001 11229 W Unity : at Firebase.Storage.StreamDownloadTask.CreateDownloadStream () [0x00000] in :0
01-09 13:19:05.622 11001 11229 W Unity : at Firebase.Storage.StreamDownloadTask+Callable160.Call () [0x00000] in :0
01-09 13:19:05.622 11001 11229 W Unity : at Firebase.Storage.StreamDownloadTask+StreamProgressWrapper.CheckStream () [0x00000] in :0
01-09 13:19:05.622 11001 11229 W Unity : Stacktrace is not supported on this platform.
01-09 13:19:05.622 11001 11229 W Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
01-09 13:19:05.622 11001 11229 W Unity :
01-09 13:19:05.708 11001 11024 I Unity : System.AggregateException: Exception of type 'System.AggregateException' was thrown.
01-09 13:19:05.708 11001 11024 I Unity : -----------------
01-09 13:19:05.708 11001 11024 I Unity : Firebase.Storage.StorageException: An unknown error occurred, please check the HTTP result code and inner exception for server response. ---> System.IO.IOException: Could not open resulting stream.
01-09 13:19:05.708 11001 11024 I Unity : at Firebase.Storage.StreamDownloadTask.CreateDownloadStream () [0x00000] in :0
01-09 13:19:05.708 11001 11024 I Unity : at Firebase.Storage.StreamDownloadTask+Callable160.Call () [0x00000] in :0
01-09 13:19:05.708 11001 11024 I Unity : at Firebase.Storage.StreamDownloadTask+StreamProgressWrapper.CheckStream () [0x00000] in :0
01-09 13:19:05.708 11001 11024 I Unity : --- End of inner exception stack trace ---
01-09 13:19:05.708 11001 11024 I Unity :
01-09 13:19:05.708 11001 11024 I Unity : Stacktrace is not supported on this platform.
01-09 13:19:05.708 11001 11024 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
01-09 13:19:05.708 11001 11024 I Unity :

from quickstart-unity.

stewartmiles avatar stewartmiles commented on May 28, 2024

I believe we have fixed this issue in 1.1.1

https://firebase.google.com/support/release-notes/unity#1.1.1

Could folks confirm?

from quickstart-unity.

kobechenyang avatar kobechenyang commented on May 28, 2024

Does this fix requires Unity 5.6?
Thank you

from quickstart-unity.

benwulfe avatar benwulfe commented on May 28, 2024

from quickstart-unity.

kobechenyang avatar kobechenyang commented on May 28, 2024

Hmm. I am getting this error after directly update both firebase database and firebase storage:

EntryPointNotFoundException: Firebase_App_CSharp_AppGetLogLevel
Firebase.AppUtil.AppGetLogLevel ()
Firebase.FirebaseApp+FirebaseHandler.LogMessage (LogLevel logLevel, System.String message)
Firebase.Internal.InstallRootCerts.InstallDefaultCRLs (System.String resource_name, System.String directory)
Firebase.Internal.InstallRootCerts.Process (Firebase.FirebaseApp app)
Firebase.FirebaseApp.CreateAndTrack (Firebase.CreateDelegate createDelegate)
Firebase.FirebaseApp.Create ()
Firebase.FirebaseApp.get_DefaultInstance ()

Should I delete all the plugins first and do fresh install ?

from quickstart-unity.

benwulfe avatar benwulfe commented on May 28, 2024

from quickstart-unity.

kobechenyang avatar kobechenyang commented on May 28, 2024

Hello,

This error
EntryPointNotFoundException: Firebase_App_CSharp_AppGetLogLevel

is gone after I restarted Unity.

And I can verify that the files are successfully download from firebase subfolder in Editor.
I haven't try on device yet.

Good job. Thank you guys.

from quickstart-unity.

bilelmnasser avatar bilelmnasser commented on May 28, 2024

capture

Try This Finally got it working !!

from quickstart-unity.

stewartmiles avatar stewartmiles commented on May 28, 2024

To clarify, @bilelmnasser you're seeing problems when using the 1.1.1 version of the SDK? We would love to root cause and fix this issue if you could describe the problem you're running into.

from quickstart-unity.

bilelmnasser avatar bilelmnasser commented on May 28, 2024

@stewartmiles i see this error with SDK v 1.1.1, and unity3d 5.5, the problem only occurs when i use Stripping Level.

from quickstart-unity.

stewartmiles avatar stewartmiles commented on May 28, 2024

We had some issues with the Storage API in 1.1.2 with various .NET SDK revisions and platforms due to the network stack implementation in Unity. We've moved everything over to WWW in 3.0.0 which should resolve your issues, see https://firebase.google.com/support/release-notes/unity#3.0.0 for the complete release notes.

from quickstart-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.