Search Unity

Bug System.Net.WebRequest.Create Failed at Unity 2021 LTS

Discussion in 'Scripting' started by heikun008, Jun 9, 2022.

  1. heikun008

    heikun008

    Joined:
    Dec 24, 2019
    Posts:
    3
    at System.Net.WebRequestPrefixElement..ctor (System.String P, System.Type creatorType) [0x00018] in <5017e4c186df4a78b7441939f7934083>:0 06-02 15:44:52.311 27304 27358 I Unity : at System.Net.WebRequest.PopulatePrefixList () [0x00040] in <5017e4c186df4a78b7441939f7934083>:0 06-02 15:44:52.311 27304 27358 I Unity : at System.Net.WebRequest.get_PrefixList () [0x00022] in <5017e4c186df4a78b7441939f7934083>:0 06-02 15:44:52.311 27304 27358 I Unity : at System.Net.WebRequest.Create (System.Uri requestUri, System.Boolean useUriBase)

    This is the error stack。。

    It work well at 2019LTS。

    Edit:This error happens on mono, and il2cpp works.
     
    Last edited: Jun 13, 2022
    Bshsf_9527 and bfl_unity192 like this.
  2. bfl_unity192

    bfl_unity192

    Joined:
    May 10, 2022
    Posts:
    1
    I had the same issue while building for Android (Oculus). Changing to IL2CPP fixed for me too
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
  4. SoumyaLG

    SoumyaLG

    Joined:
    Jul 24, 2023
    Posts:
    1
    Hello @JoshPeterson, I see that the issue is resolved. Could you please explain what was the fix. I need it for my project where wwe see same error in mono but for linux.
     
    Last edited: Jul 24, 2023
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I don't think you can fix it from your side, unfortunately. The problem had to do with how the machine.config file from Mono was used in the Unity build process internally.

    So it might be the case that this still happens on Linux, even though we corrected it for Android. Can you submit a new bug report?

    https://unity.com/releases/editor/qa/bug-reporting
     
    Bunny83 likes this.