Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Firebase Storage does not work with Unity 2017.1 Beta

Discussion in '2017.1 Beta' started by Deleted User, May 31, 2017.

  1. Deleted User

    Deleted User

    Guest

    Hello there,

    I have a problem with the Firebase Storage integration in combination with Unity 2017. When I try to upload files I always receive the following error. I have tried it with Unity 5.6 and it works fine but with Unity 2017.1 beta unfortunately not.

    ERROR MESSAGE:
    InvalidOperationException: Cannot override system-specified headers
    UnityEngine.Networking.UnityWebRequest.SetRequestHeader (System.String name, System.String value) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/modules/UnityWebRequest/WebRequestBindings.gen.cs:471)
    UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Generic.Dictionary`2 headers) (at /Users/builduser/buildslave/unity/build/Runtime/WebRequestWWW/UWRWWW.cs:62)
    Firebase.Unity.WWWHttpRequest+<SendUnityRequest>c__Iterator0.MoveNext ()
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    Firebase.Unity.UnitySynchronizationContext:<PostCoroutine>m__0(Object)
    Firebase.Unity.<Start>c__Iterator0:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    Are there any recommendations to fix that issue?

    Thanks in advance!
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi innerspace,
    Thank you for reporting this issue. Could you please file a bug report for this with a minimal reproduction case and reply in here with the case #?
     
  3. Deleted User

    Deleted User

    Guest

    1) Import Firebase Storage from Firebase SDK
    2) Put this file (FirebaseUpload.cs) on a gameobject
    3) Create a project in Firebase and copy the storage URL in the placeholder (make sure there is no auth required for the storage endpoint)
    4) Run the project

    CASE UNITY 5.6: It should upload the txt file to the storage endpoint
    CASE UNITY 2017: It should log the bug as mentioned above

    Thanks in advance for your help!
     

    Attached Files:

  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
  5. Deleted User

    Deleted User

    Guest

  6. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Can you give a case number?
    In the future please do post case numbers when asked for bug reports by Unity people, we'll try to put those bugs on fast track.
     
  7. Deleted User

    Deleted User

    Guest

    The case number is: 917097

    I will do it in the future! Thanks!