Firebase Storage does not work with Unity 2017.1 Beta

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+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:m__0(Object)
Firebase.Unity.c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Are there any recommendations to fix that issue?

Thanks in advance!

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 #?

  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!

3090837–233131–FirebaseUpload.cs (2.01 KB)

Could you please use the editor’s bug reporter? You can find more details about how to report bugs here:

I have sent it via bug reporter! Thanks for the advice!

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.

The case number is: 917097

I will do it in the future! Thanks!