firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
201 stars 34 forks source link

Internal task faulted #372

Closed querywilly closed 2 years ago

querywilly commented 4 years ago

Please fill in the following fields:

Unity editor version: Unity 2017 4.36 Firebase Unity SDK version: 6.10.0 framework 3.5 Firebase plugins in use (Auth, Database, etc.):Real time database Additional SDKs you are using (Facebook, AdMob, etc.): facebook admob Platform you are using the Unity editor on (Mac, Windows, or Linux): MacOs Platform you are targeting (iOS, Android, and/or desktop): Android Scripting Runtime (Mono, and/or IL2CPP):Mono

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.) DatabaseReference leaderBoardRef = mDatabaseRef.Child("userlist/"+auth.userid+"/coin");

leaderBoardRef.RunTransaction(mutableData => {
            if(mutableData.Value!=null){
                long A=long.Parse(mutableData.Value.ToString());
                mutableData.Value=(A+newvalue);
            }
            return TransactionResult.Success(mutableData);

                               }).ContinueWith(task =>
            {
                if (task.IsFaulted)
                {
                                   print(task.Exception.Message);   
                   AggregateException ex = task.Exception as AggregateException;
            if (ex != null) {

            DatabaseException inner = ex.InnerExceptions[0] as DatabaseException;
                            print(inner.Message.ToString());
                                  }

all error message "Exception of type 'System.AggregateException' was thrown." "Internal task faulted"

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? i tested latest version firebase realtime database. What's the issue repro rate? (eg 100%, 1/5 etc) %10 rate It's not happening everytime

querywilly commented 4 years ago

look a same issue https://github.com/firebase/quickstart-unity/issues/481 this issue continue 6.10.0

paulinon commented 4 years ago

Thanks for reporting this issue, @querywilly. Could you share a minimal, reproducible example of your project so I can help identify what's causing the issue?

chkuang-g commented 4 years ago

Hi @querywilly

Quick question, did this happen on Android device only or when you hit play in Unity Editor?

Thanks, Shawn

querywilly commented 4 years ago

Hi @chkuang-g and @paulinon just android device. it is difficult to reproduce this error. I think it happens to users with bad internet connection. I collect this error from user devices. if it fails, try sending again. every time succeded 1 atemps

chkuang-g commented 4 years ago

@querywilly

Thanks for reporting this. I think this issue is different from firebase/quickstart-unity#481 since that issue only happened in the editor, e.g. desktop implementation.

I would need to do some investigation about this. At the mean time, the best thing you can do is to retry if a transaction failed due to internal exception.

Sorry for the inconvenience.

Shawn

HermansJarno commented 3 years ago

Any updates on this?

chkuang-g commented 2 years ago

Hi all,

This has been awhile. The problem on Android may be fixed in the later version.

If this is still happening, please open a new issue and reference this one.