Search Issue Tracker

Fixed in 2021.2.X

Votes

0

Found in

2020.1

2020.1.9f1

2020.2

2021.1

2021.2

Issue ID

1296177

Regression

No

[android] HttpUtility Null reference exception on .net 4.x when performing HttpUtility.UrlEncode

Mono

-

How to reproduce:
1. Build and run the "Http test.zip" Project on an Android device
2. Check the logs once the Project fully loads

Expected Behavior: The method is executed without errors
Actual Behavior: Null reference or "called non-existent method System.String System.Web.HttpUtility" exception is thrown

Reproducible with: 2020.1.17f1, 2020.2.2f1, 2021.1.0b2, 2021.2.0a2

Reproducible with devices:
Xiaomi 9T (customer's device)
VLNQA00015, Samsung Galaxy Note8 (SM-N950W), Android 8.0.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00286, Meizu - (PRO 5), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760

Note:
- The customer had two different exceptions (added them in the case edits)
- Only reproducible on android

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed 2021.2.0a8

Comments (2)

  1. E301a322f4f8b9d2c3f018666b957d21?d=mm

    christianstamati

    Jul 16, 2021 07:57

    Ok I found a solution. I used WebUtility.UrlEncode instead of HttpUtility.UrlEncode and it works now!

  2. E301a322f4f8b9d2c3f018666b957d21?d=mm

    christianstamati

    Jul 15, 2021 16:33

    Hi is there a workaround for older versions? I'm using Unity 2021.1.15f and I can't upgrade my project. I noticed that in 2021.2.0b3 there isn't this error... Ho can I fix this without upgrading?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.