Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Understanding why SendUserReport results in success = false

Discussion in 'Unity Cloud Diagnostics' started by dgoyette, Mar 25, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    Today I was trying to adjust some of the properties of UnityUserReporting.CurrentClient, and I found that this resulted in my user report submission returning success = false. For example, I set CurrentClient.IsConnectedToLogger = true, and then tried to submit via the following:

    Code (CSharp):
    1. UnityUserReporting.CurrentClient.SendUserReport(this._userReport, progressCallback, completedCallback);
    My completedCallback looks like this:

    Code (CSharp):
    1. Action<bool, UserReport> onCompleteCallback = (success, userReport) =>
    2.                 {
    For some reason, success was false when I had IsConnectedToLogger set to true. But what I'm asking in general is whether there is any additional information to inform me about why success was false.

    It's also very much worth mentioning that the user report ended up being created, and I was able to view it under cloud diagnostics. In which case, maybe this is a false "error", but it gives the end user the impression that the submission didn't go through.

    Are there any other diagnostics to tell me why report submission failed?
     
  2. bretth_unity

    bretth_unity

    Unity Technologies

    Joined:
    Dec 1, 2016
    Posts:
    35
    The event log in the user report itself may contain the reason, but since this will have been logged after the current user report was created, you'll need to create a second user report.

    Let me know if this continues to happen and the user report doesn't contain any additional information.
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    Hi Brett,

    I'm still getting these false negatives most of the time I try to submit an issue. Looking at the log, this is all I see when it occurs:

    Code (CSharp):
    1. UnityUserReportingPlatform.Post: Failed to receive data
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:Log(LogType, Object)
    5. UnityEngine.Debug:Log(Object)
    6. Unity.Cloud.UserReporting.Plugin.UnityUserReportingPlatform:Update(UserReportingClient)
    7. Unity.Cloud.UserReporting.Client.UserReportingClient:Update()
    8. Unity.Cloud.UserReporting.Plugin.UnityUserReportingUpdater:MoveNext()
    9. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Coroutines.cs:17)
    10. UnityEngine.MonoBehaviour:StartCoroutineManaged2(IEnumerator)
    11. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) (at C:\buildslave\unity\build\Runtime\Export\MonoBehaviour.bindings.cs:91)
    12. GraviaSoftware.Gravia.Code.Controllers.UI.Dialog.SubmitFeedbackDialogController:Update() (at Assets\Code\Controllers\UI\Dialog\SubmitFeedbackDialogController.cs:582)
    But the issue ends up getting submitted as expected, and I see it in cloud diagnostics.

    Is there anything else I can look at to try to understand why it's giving me these errors?
     
  4. unleech

    unleech

    Joined:
    Jul 27, 2013
    Posts:
    11
    Same thing happened to me. Then upon sending a second report, i'm having a request timed out.
     
  5. ASluchT

    ASluchT

    Joined:
    Nov 27, 2018
    Posts:
    2
    We also began to receive success= false, but two week before, success state corretlly working.
     
  6. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    Just trying to make sure we're all talking about the same issue. Are you guys finding that even though success = 'false', the user report still shows up in Cloud Diagnostics? What I'm seeing is always a "false negative", where the API complained of failure, but the user report was actually submitted correctly.
     
    unleech likes this.
  7. ASluchT

    ASluchT

    Joined:
    Nov 27, 2018
    Posts:
    2
    Yes. success state always is false, even when they are unloaded and displayed in the panel.
    We also see, that old reports do not open in the admin panel.
    output browser console
    Code (JavaScript):
    1.  Deprecated - User request is being migrated, and "authenticated" status is only determined by a specific request to genesis Failed to load resource: the server responded with a status of 403 ()
    2.  
    3. vendor.js?v=e8838e1471d45a0ad63d6ac7edd8bc7c7b76a872:5 Error attempting to get multiplay whitelist:  Object
    4.  
    5. (anonymous) @ vendor.js?v=e8838e1471d45a0ad63d6ac7edd8bc7c7b76a872:5
    6. 19vendor.js?v=e8838e1471d45a0ad63d6ac7edd8bc7c7b76a872:5 Error attempting to get multiplay whitelist:  unauthorized
    7.  
    8. (anonymous) @ vendor.js?v=e8838e1471d45a0ad63d6ac7edd8bc7c7b76a872:5
    9. userreporting.cloud.unity3d.com/api/UserReporting/projects/***/stripped:1
    10.  
    11. Failed to load resource: the server responded with a status of 404 ()
    12. vendor.js?v=e8838e1471d45a0ad63d6ac7edd8bc7c7b76a872:5 Error attempting to get multiplay whitelist:  unauthorized
    13.  
    14. Failed to load resource: the server responded with a status of 403 ()
    UserReport correct opening after "Received 2/21/2019"
     
    Last edited: Apr 11, 2019
    unleech likes this.
  8. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    Maybe @bretth_unity can shed some light? Is there anything on the server side that might explain the success=false response?
     
    unleech likes this.
  9. bretth_unity

    bretth_unity

    Unity Technologies

    Joined:
    Dec 1, 2016
    Posts:
    35
    We're still looking into the root cause of this problem, which started recently. However, the new SDK, released a few days ago, will not report an error if a report has been sent successfully.
     
  10. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    I'm using 0.2.4-preview of Unity User Reporting in the Package Manager, released on April 4. That's the newest version I see. Is there something newer? Because I'm still getting these false negatives under 0.2.4.
     
  11. phuong_unity

    phuong_unity

    Unity Technologies

    Joined:
    Apr 25, 2018
    Posts:
    20
    @dgoyette I tried to reproduce the false-negative issue under 0.2.4-preview but was not successful. I couldn't reproduce the issue with CurrentClient.IsConnectedToLogger set to true or false.

    If you could file a bug report and include a sample project to reproduce the issue that would greatly help us find the cause of the issue.
     
  12. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    Hi @phuong_unity,

    I believe I understand the issue now, though it would be good to get some confirmation. Ultimately, I believe my "false negative" problems are resolved, because I now believe I wasn't using the 0.2.4-preview version of UserReporting at all. Let me explain the confusion, in case I'm still wrong about this, because getting this to work wasn't at all straightforward to me.

    First, I initially installed the UserReporting package via downloading the SDK from Unity. If you go to the Services tab in Unity, that's still what it tells you to do, rather than using the Package Manager:

    upload_2019-4-17_11-18-2.png

    So, it's confusing that I can both download the SDK from the Services tab, and I can install the package via the Package Manager.

    In trying to set up a repro project, all I did was install the package via the Package Manager. I quickly found that this didn't actually do much of anything, and none of the User Reporting classes would resolve in my code. Looking deeper into it, I examined exactly was contained in "PackageCache\com.unity.cloud.userreporting@0.2.4-preview", and found that it pretty much contains nothing other than the "UserReporting" package itself. This is very confusing. Because it seems that the only purpose for the UserReporting package in Package Manager is to download a Unity package that I then need to install manually via Assets -> Import Package?

    upload_2019-4-17_11-23-45.png

    So looking back, it seems to me that what I did was to add the package via Package Manager after having imported the package via the SDK download. But merely adding the package via the Package Manager doesn't do anything on its own. I needed to actually perform an Import Package on the package contained in the Packages\Unity User Reporting.

    It's worth noting that there's a README in Packages\Unity User Reporting, but it doesn't explain this fairly confusing approach.

    It also makes me wonder what happens when you push a new version via the Package Manager. I assume that merely updating to the new version in Package Manager won't actually do anything, and I'll need to remember to reimport the asset after doing so?


    So, in short:
    • Having installed the correct version of 0.2.4-preview in my project, I'm no longer getting false negatives. I submitted a dozen reports so far, all went through correctly, with no errors. So, thanks very much for that!
    • It's pretty unclear whether I should be downloading the package via the link in the Services tab, or using the Package Manager.
    • It's confusing that the Package Manager directory merely contains another package I need to install, which is different from every other package I use (which all contain the actual code.)
    Please let me know if I've just gotten something wrong in this process.
     
    phuong_unity likes this.
  13. phuong_unity

    phuong_unity

    Unity Technologies

    Joined:
    Apr 25, 2018
    Posts:
    20
    @dgoyette Thanks for letting us know that you believe you didn't have the 0.2.4-preview SDK installed and now you have verified that the "false negative" issue is fixed in 0.2.4-preview.

    You are correct, after installing the 0.2.4-preview from the Package Manager, you will still need to import the package. This is different from the other packages, and I can understand why this process is not intuitive. We've added a note in the Package Manager to help guide the user but it could be easily overlooked:

    Screen Shot 2019-04-17 at 4.36.25 PM.png
    Thanks for letting us know about the confusion when installing the User Reporting SDK (this is great feedback!), and I'm glad you were able to sort out the "false negative" issue.
     
  14. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,853
    Thanks. I also see that it's clearly documented on the Unity website as well. Seems I was just going fast and missed it.