Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Fetching Failure/Connection Error in Unity Editor #1217

Closed
Giovanni-Tapps opened this issue Mar 11, 2025 · 7 comments
Closed

[Bug] Fetching Failure/Connection Error in Unity Editor #1217

Giovanni-Tapps opened this issue Mar 11, 2025 · 7 comments
Labels

Comments

@Giovanni-Tapps
Copy link

Giovanni-Tapps commented Mar 11, 2025

Description

Multiple members of our team have been experiencing a consistent connection problem with Firebase in different Unity Projects. Services such as Remote and Storage are not working as they once were.

We have been having this issue since the end of February. The expected behaviour is, during startup, a connection should be established with Firebase so we can retrieve information from services such as RemoteConfig using Fetch.

What is happening is, during the startup, an error is thrown, as if we were offline.

Image

The first error seem to be the culprit, as a connection wasnt possible to be established.
The following errors are from our Wrapper which logs whatever it receives from Firebase. For example, the logs tagged with RemoteConfig are taking the Task received from Fetch and logging the Exception and InnerException (the last two erros about "DLC" can be ignored for this issue as they are a consequence of not being able to connect to the Storage).
All seem to be related to the fact that a connection is not capable of being established with Firebase.

What we have tried:

  • Clear Package Cache
  • Clear Unity Cache
  • Change Unity version (Tested on 2022.3.59f)
  • Updated Firebase SDK version to 12.7
  • Reinstalling Unity version
  • Change computers
  • Opening different Projects that uses the same SDK version
  • Disabled Firewall from Windows
  • Disabled Firewall from Router
  • Changed DNS servers to trusted ones like Google, CloudFare, ...
  • Connect the computer to a Mobile Hotspot using its Mobile Data (5G) and a VPN.
  • Toggled off IPV6 connections on Windows Network adapters
  • Creating an empty scene with only one simple script that doesnt use any of our wrappers. Using the SDK directly (Image of logs and snippet below)
public class Teste : MonoBehaviour
{
    private async void Start()
    {     
        DependencyStatus dependencyStatus = await FirebaseApp.CheckAndFixDependenciesAsync();
               
        await FirebaseRemoteConfig.DefaultInstance.FetchAsync(TimeSpan.Zero);
    }
}

Image

What we noticed:

  • This issue is only happening with team members that use Windows, members using Mac/iOS are not facing this problem.

Similar issues we found:
#1205

Reproducing the issue

We can easily reproduce the problem by:

  1. Creating a new scene
  2. Creating a new MonoBehaviour Script (script below)
  3. Attatching this newly created script to an object in scene (MainCamera to make it easier)
  4. Pressing Play
using System;
using System.IO;
using System.Net;
using System.Text;
using Firebase;
using Firebase.RemoteConfig;
using UnityEngine;

public class Teste : MonoBehaviour
{
    private async void Start()
    {
        DependencyStatus dependencyStatus = await FirebaseApp.CheckAndFixDependenciesAsync();
        
        await FirebaseRemoteConfig.DefaultInstance.FetchAsync(TimeSpan.Zero);
    }
}


Firebase Unity SDK Version

12.1.0

Unity editor version

2022.3.25f1

Installation Method

Unity Package Manager

Problematic Firebase Component(s)

Remote Config, Storage

Other Firebase Component(s) in use

Remote Config, Messaging, Storage, Analytics, Authentication, Crashlytics

Additional SDKs you are using

No response

Targeted Platform(s)

Desktop

Unity editor platform

Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

fetching failure: http code 0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:95)
Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)
Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)
Firebase.AppUtil:PollCallbacks () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4869)
Firebase.Platform.FirebaseAppUtils:PollCallbacks () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/FirebaseAppUtils.cs:33)
Firebase.Platform.FirebaseHandler:Update () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:208)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@Giovanni-Tapps
Copy link
Author

Updated the original post. I forgot to add the Unity Version we changed to in order to test and that we also tried updating the Firebase SDK to the latest version

@brenofurlanpixo
Copy link

Hey there @Giovanni-Tapps! Sad that you've got this issue :c
I'm adding this info to the original post as well, but in another scenario the DNS configuration was fine, the error was due to using IPV6 connections on the adapters settings.
As per the symptoms you are facing quite the exact same issue, so that may be a hint on how to fix it.

Hopefully this will help you, let me know 🙏

@Giovanni-Tapps
Copy link
Author

HiHi @brenofurlanpixo!

I also forgot to add to my original post. We tried turning off IPV6 connections but to no avail 😅

Thank you for the heads up, really appreciate it!

@argzdev
Copy link

argzdev commented Mar 19, 2025

Hey @Giovanni-Tapps, thanks for reaching out. It looks like a similar issue to #1191, where the network problem seems prominent to developers in Brazil. You could try some alternative solutions provided by other folks, while we're still investigating this issue.

You mentioned that this issue has been happening since February. Did you update from a prior version of the SDK before this started happening or did it start out of the blue.

@argzdev argzdev added type: bug needs-info Need information for the developer labels Mar 19, 2025
@Giovanni-Tapps
Copy link
Author

Giovanni-Tapps commented Mar 19, 2025

I bring great news!
Sometime last week members of our team (myself included) that were having this problem stopped having them as the new Windows Update rolled out.
Today I checked with the team and no one seems to be getting this problem anymore.
Talking amongst ourselves and with friends from other companies we suspect that some Windows 11 update around February introduced a connection problem that was affecting many places including Firebase. But as of last week an update was rolled out and it has been fixed.

Given we havent been having the problem anymore this issue can be closed. But the exact cause is still unknown.

@argzdev
Copy link

argzdev commented Mar 19, 2025

That's interesting, thank you for sharing this with us. I'll confirm this with the other folks and see if this is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants