Search Unity

Bug Sudden jsonSerialization error in webgl build

Discussion in 'Web' started by yamyam124, Mar 7, 2023.

  1. yamyam124

    yamyam124

    Joined:
    Jul 31, 2020
    Posts:
    1
    Hi everyone,
    I have been building my project to webgl for a while now and suddenly I am receiving the following error in the console when running the game:

    JsonSerializationException: Cannot create and populate list type System.Collections.Generic.Queue`1[System.Int32]. Path 'BetsQueue', line 1, position 305.
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, System.Boolean& createdFromNonDefaultCreator) [0x00000] in <00000000000000000000000000000000>:0

    In my project, I am receiving Json from a remote server using Unity Web Request and serializing it using Newtonsoft.Json.
    I am receiving this error only on the build itself and not in the editor. I tried playing around with the Build Settings and using Newtonsoft.Json Unity fork but nothing works
    Did anyone encounter a similar issue?

    Here is the full error:

    JsonSerializationException: Cannot create and populate list type System.Collections.Generic.Queue`1[System.Int32]. Path 'BetsQueue', line 1, position 306.
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, System.Boolean& createdFromNonDefaultCreator) [0x00000] in <00000000000000000000000000000000>:0


    _JS_Log_Dump @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    $func5986 @ 06fe965e:0x3643f9
    $func60896 @ 06fe965e:0x18ecadd
    $func23804 @ 06fe965e:0xfcf557
    $func463 @ 06fe965e:0x473a9
    $func6792 @ 06fe965e:0x3ed916
    $func1429 @ 06fe965e:0xb5857
    $func737 @ 06fe965e:0x5f0cc
    $func9052 @ 06fe965e:0x559dcb
    $func13541 @ 06fe965e:0x8c0a13
    $func13554 @ 06fe965e:0x8c3418
    $func34486 @ 06fe965e:0x1214e9f
    $func34384 @ 06fe965e:0x120f590
    $func23896 @ 06fe965e:0xfde751
    $func24593 @ 06fe965e:0xff9f0e
    $func13574 @ 06fe965e:0x8c502a
    $func13574 @ 06fe965e:0x8c5099
    $func13344 @ 06fe965e:0x889948
    $Hh @ 06fe965e:0x10aa745
    browserIterationFunc @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    callUserCallback @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    runIter @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    requestAnimationFrame (async)
    requestAnimationFrame @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_scheduler_rAF @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10
    Browser_mainLoop_runner @ 111e4b28-ca6d-4f24-96fa-ec65c10e5f15:10