Comments (7)
A quick Google search brought me to this post: https://stackoverflow.com/a/62171642/12975006
Could you ensure that your security rules in the emulator are sufficiently permissive to allow the writes?
from firebase-unity-sdk.
I've logged b/202835732 (for Googlers) to see what we can do to improve the error message produced when a Firestore operation is rejected by security rules.
from firebase-unity-sdk.
Hi @dex3r. The Firestore emulator is working fine for me. I'm going to need some more information to help out.
- Can you enable debug logging in Firestore? To do this, call
FirebaseFirestore.LogLevel = LogLevel.Debug;
before doing anything else. - What version of the Unity SDK are you using (please use the latest, 8.3.0)?
- What OS are you running the Unity Editor on (e.g. Mac, Linux, Windows)?
- What OS are you running the code on? (e.g. Android, iOS, via play button in Unity Editor)?
- What command line did you run to start the Firestore emulator?
- Do you have the latest version of the Firestore emulator?
- Can you attach the full log output (e.g. Unity Editor log, Android logcat)?
- Can you show a larger code snippet of your code?
After answering these questions, could you create a minimal app that you use to reproduce the issue? Then I could clone it and try it out for myself to see if I can reproduce what you're seeing.
from firebase-unity-sdk.
Test code (empty scene with only this object):
using System.Collections.Generic;
using System.Threading.Tasks;
using Firebase;
using Firebase.Firestore;
using UnityEngine;
public class FirestoreEmulatorTest : MonoBehaviour
{
async void Start()
{
Debug.Log("TEST START");
FirebaseFirestore.DefaultInstance.Settings.Host = "localhost:8080";
FirebaseFirestore.DefaultInstance.Settings.SslEnabled = false;
FirebaseFirestore.DefaultInstance.Settings.PersistenceEnabled = false;
FirebaseFirestore.LogLevel = LogLevel.Debug;
await WriteToEmulator();
}
async Task WriteToEmulator()
{
var docRef = FirebaseFirestore.DefaultInstance.Document("testL/test");
var documentData = new Dictionary<string, object>();
await docRef.SetAsync(documentData);
Debug.Log("Write done");
}
}
- 8.3.0
- Windows 10
- Editor
firebase emulators:start
- Yes
- https://pastebin.com/P42AGzjb
- See above
from firebase-unity-sdk.
Hmm everything looks good. I have no idea what that error means. Since "permission denied" is in the message, is there a chance that your firewall (e.g. Windows Defender) is blocking the connection?
Also, could you try exiting the Unity Editor and deleting the local cache by running
rd /s /q %USERPROFILE%\AppData\Local\firestore
from firebase-unity-sdk.
I've turned off the windows firewall but the problem persists. Removing the cache also did not help.
from firebase-unity-sdk.
@dconeybe thank you, that was it. I would have never guessed it was this simple since the error message was non-existing on google :)
from firebase-unity-sdk.
Related Issues (20)
- [Bug] iOS crashes when Google sign in is not enabled HOT 2
- [Bug] SignIn With Facebook Exception: Bad access token: {"code":190,"message":"Invalid OAuth access token - Cannot parse access token"} HOT 2
- [Bug] SIGSEGV - Pure virtual function called! HOT 9
- [Bug] SIGSEGV - firebase::Mutex::Acquire() HOT 2
- [Bug] SIGSEGV - FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x<sanitized>) HOT 2
- [Bug] AppCheck fails in debug environment with Firebase 11.9.0 HOT 12
- [Bug] Undefined symbol errors with Firebase SDK v 11.9.0 HOT 1
- [Bug] FirebaseCore_Privacy.bundle not found HOT 14
- [Bug] Unity Editor crashes due to Firebase Core SDK in MacOS. HOT 3
- UnityEditor.AndroidManifest.SetFixedWindowSize Error on build when Firebase Messaging is added HOT 4
- [Bug] DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_8_1' HOT 5
- Firebase SDK Validation Failed in Unity (Break Symlinks) HOT 10
- [Bug] DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_8_1' occurs only on iOS builds HOT 4
- [Question] When is the release of the version incorporating firebase-ios-sdk v10.24.0 expected? HOT 3
- [Question] Firebase XCFrameworks are not codesigned HOT 5
- [Question] macOS version does't store player credentials after game quit. HOT 9
- [Bug] Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. HOT 7
- [Bug] AnalyticsFixPropertyRemover for Unity 2021 HOT 4
- [Bug] iOS Build crashing on second launch when made with Xcode 15.3 HOT 4
- [Question] Firestore throws "Cursor has too many values" exception when running an aggregate count query that starts at a specific document HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-unity-sdk.