question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Code working on Mac M1, but not in a Windows Computer (Same Project)

See original GitHub issue

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.15f1
  • Firebase Unity SDK version: 11.3.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Database (Firestore)
  • Other Firebase Components in use: Auth (Storage is called but not used)
  • Additional SDKs you are using: None
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: Mono
  • Pre-built SDK from the website or open-source from this repo: Website

[REQUIRED] Please describe the issue here:

I have a code to create a prefab foreach Document I find in a Database. Problem: When I run the code on Windows, it doesn’t work, but when I try the same project in apple (mac m1) it works fine. The project was created on Windows.

Steps to reproduce:

Copy my code and try it on Windows and Mac¿

Relevant Code:

Document Path: “/mailsUsuarios/VzQx7anQNSU0gjywF93FoS7ptiD2/inbox/Uh4CfvRfb3qxcLR5ZcqJ”

image image

db = FirebaseFirestore.DefaultInstance;
auth = FirebaseAuth.DefaultInstance;
string currentUserID = auth.CurrentUser.UserId;
Query mailsRef = db.Collection($"/mailsUsuarios").Document($"/{currentUserID}").Collection("/inbox");
await mailsRef.GetSnapshotAsync().ContinueWithOnMainThread(task => 
{
       QuerySnapshot snapshot = task.Result;
       Debug.Log(snapshot);
       Debug.Log("PREFOREACH");
       foreach (DocumentSnapshot documentSnapshot in snapshot.Documents)
       {
             Debug.Log(documentSnapshot.Id);
        }
        Debug.Log("POSTFOREACH");
        });
        Debug.Log("No more Documents");
}

Issue Analytics

  • State:closed
  • Created a month ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dconeybecommented, Aug 16, 2023

@Totoped157 Could you enable debug logging and attach the logs from both mac and Windows, so we can diff them?

To enable debug logging, set FirebaseFirestore.LogLevel = LogLevel.Debug

https://firebase.google.com/docs/reference/unity/class/firebase/firestore/firebase-firestore#loglevel

1reaction
dconeybecommented, Aug 16, 2023

Yikes that sounds like a race condition. If you see the issue again with debug logging enabled please send your logs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HttpClient fails on Mac M1
I have a blazor wasm app that I developed on a Windows PC in Visual Studio 2022. I've recently been trying out a...
Read more >
ERROR - Multiple code completion windows. Mac M1 Max
For this M1 laptop every time I type anything, a new window pops up and the previous window stays (please see screenshot). I...
Read more >
Unable to run .net 4.8 apps on IIS using Arm processor (M1 ...
I have a macbook pro with M1 max processor running windows 11 pro in Parallels using the most updated version as to writing...
Read more >
Mac Unity Build (from a PC) not opening on Mac
I made the Build for my project for both PC and Mac, however I had massive issues getting the Mac one to actually...
Read more >
Dev Diaries: .NET Development on a MacBook Pro M1
These days, I'm doing most of my work on a 2021 14" MacBook Pro M1 and I'd like to share my experience doing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found