Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Strange exception in WWW constructor

Discussion in 'WebGL' started by d12frosted, Jun 30, 2015.

  1. d12frosted

    d12frosted

    Joined:
    Feb 3, 2014
    Posts:
    43
    Hey guys,

    I cant' figure out what's wrong with following code.

    Code (CSharp):
    1. var form = new WWWForm();
    2. form.AddField("field1", value1);
    3. form.AddField("field2", value2);
    4. // ...
    5. form.AddField("fieldn", valuen);
    6. var req = new WWW(someValidUrl, form)
    It looks safe. But when I run it in Firefox I see following exception.

    "exception thrown: [Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :: https://url/SV.js :: _JS_WebRequest_Create :: line 9391" data: no],_JS_WebRequest_Create@https://url/SV.js:9391:1
    __ZN13EmscriptenWWWC2EPKcS1_iRKNSt3__13mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_NS2_4lessIS9_EENS7_INS2_4pairIKS9_S9_EEEEEEb7Hash128j@https://url/SV.js:4158878:6
    __ZN3WWW6CreateEPKcS1_iRKNSt3__13mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_NS2_4lessIS9_EENS7_INS2_4pairIKS9_S9_EEEEEEbb7Hash128j@https://url/SV.js:4239376:1
    __Z18WWW_CUSTOM_InitWWWP15ScriptingObjectP15ScriptingStringP14ScriptingArrayS4_@https://url/SV.js:3719256:24
    dynCall_viiii@https://url/SV.js:6374671:1
    invoke_viiii@https://url/SV.js:19018:2
    _WWW_InitWWW_m20909@https://url/SV.js:5495085:2
    dynCall_viiiii@https://url/SV.js:6365188:1
    invoke_viiiii@https://url/SV.js:19026:2
    _WWW__ctor_m14461@https://url/SV.js:4950725:7
    dynCall_viiii@https://url/SV.js:6374671:1
    invoke_viiii@https://url/SV.js:19018:2
    _U3CPostU3Ec__IteratorF_MoveNext_m1521@https://url/SV.js:655301:6

    So I checked once again what's inside of that Form, and it's

    hash=MQAwADAAOQAxADMAMAA1ADYANgAyADEANAA5ADAANgA0ADMANAAzAA%3d%3d&_guid=YQAxAGMAOAA3AGMANQA4AC0AMwBkADAAZQAtADQAMwBjAGMALQA4ADYAOQAzAC0ANgBlADcAZgA5ADUAZABmAGIAYwA4ADIA&_deviceId=dwAtAG4ALwBhAA%3d%3d&gameVersion=36&env=dev&registerDevice=1

    To get this value I did
    Code (CSharp):
    1. System.Text.Encoding.Default.GetString(form.data)
    .

    Any clues?
     
    Zaborius likes this.
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    What is inside the URL string ?
     
  3. Zaborius

    Zaborius

    Joined:
    Mar 15, 2013
    Posts:
    9
    Last edited: Oct 26, 2015