Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug NullReferenceException in Unity.Services.Core.Telemetry.Internal.UnityWebRequestSender

Discussion in 'Unity Analytics' started by emrys90, Dec 6, 2022.

  1. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Nothing has changed on my end. I randomly started getting these errors both in the editor when not in play mode, and in builds outside of the editor. Any ideas what is causing this and how to fix it?
    Code (CSharp):
    1. NullReferenceException Object reference not set to an instance of an object.
    2.     <00000000000000000000000000000000> Unity.Services.Core.Telemetry.Internal.UnityWebRequestSender+<>c__DisplayClass0_0.<SendRequest>g__OnSendingRequestCompleted|0(UnityEngine.AsyncOperation operation)
    3.     <00000000000000000000000000000000> System.Action`1[T].Invoke(T obj)
    4.     <00000000000000000000000000000000> UnityEngine.AsyncOperation.InvokeCompletionEvent()
     
  2. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    Hi,

    Thanks for reaching out about this error.

    I raised this with the development team and they're looking into it.

    I would like to clarify the situation with you to understand the impact of the error; aside from the inconvenience of the error appearing in your logs is this causing any blocking issues in your project (either in builds of the project, Play Mode or using the Editor)?

    Either way the team is actively working to resolve the issue. I'll keep you posted if there's any news.

    Cheers,
     
    Last edited: Dec 6, 2022
  3. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    As far as I am aware, the error appears to be harmless. However, I don't know what its used for to be able to know that it has no impact on analytics or anything else.
     
  4. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    The error is regarding telemetry from UGS SDK installs for Unity's internal analysis to support development of the SDKs. It's not related to the analytics your project is sending to your UGS Analytics Dashboard.

    The backend service that this SDK telemetry goes to here internally is undergoing some maintenance so it's likely that the error is occurring as a result of the service not being reachable.

    From discussions with the development team it's my understanding that if the error isn't affecting your project it should be safe to ignore and once the maintenance is complete on the SDK telemetry backend services the error should stop occurring.

    Please let us know if you do notice any impact caused by this error and I'll raise that with the developers.
     
  5. Naomi-DevOps

    Naomi-DevOps

    Joined:
    Apr 14, 2021
    Posts:
    11
    fyi: same error in our app -> no effect on app fcionality (at least not visible yet), but is there any information, when maintenance will be completed?
     
  6. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    My Analytics have stopped working altogether as of today. Could this be related?
     
  7. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    @emrys90 Can you elaborate on the symptoms you're seeing? Any errors (aside from the one mentioned above)? Any events showing up in the Invalid Data tab of your Dashboard's Event Browser?

    Did you change anything else in your project's Analytics code recently?

    There really shouldn't be any connection between the error above and UGS Analytics sending it's own event data.
     
  8. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    @emrys90 Ahh, I see your Analytics issue may already be resolved in the other thread where you've been discussing with my colleague Seb.
     
  9. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    @Naomi-DevOps Thanks for your feedback regarding the issue & impact.

    Regarding ETA for the backend service to be back online I don't have any details on that unfortunately.

    If I get any news I'll update this thread.
     
  10. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Yes, its been resolved. Thank you.
     
  11. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Any news on this? The error might be harmless, but it leads to bad habits. I've started developing a bad habit of ignoring errors in the console because I expect it to be this error.
     
  12. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    @PhilG-Unity Any news on this error? It's been over two months since this first started happening. Please get it fixed.
     
  13. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    Hi @emrys90

    I'm enquiring with the developer about this.
     
  14. PhilG-Unity

    PhilG-Unity

    Unity Technologies

    Joined:
    Mar 17, 2022
    Posts:
    26
    This issue was fixed in version 1.7.1 of the com.unity.services.core package in January.

    This is a package that is pulled in as a dependency for all the UGS SDKs.

    In order to update it:
    1. Open your Package Manager. In the drop-down list in the upper-left, select 'In Project'
    2. Click the little gear icon in the upper-right of Package Manager next to the search box > Advanced Project Settings
    3. Tick the box for Show Dependencies
    4. Return to Package Manager. In the drop-down select "In Project"
    5. You should now see a package called Services Core
    6. Select it in the list in the left pane of the Package Manager
    7. Click 'Upgrade to 1.7.1' in the bottom right of the right pane
     
  15. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    @PhilG-Unity Thanks for looking into that. However, attempting to update to that is causing an issue for me. Version 1.7.1 now uses a class called "AotHelper" from json.net. This is breaking my project due to that I use the asset store version of json.net. When I attempted to update from the asset store version to your Unity package of json I get all kinds of issues around missing serialization data types that does not happen in the asset store version.

    So I cannot update to 1.7.1 without either being able to fix the AotHelper reference or figuring out how to using the Unity json package without serialization data types being lost (without having to manually use the AotHelper for all data types).