Search Unity

Uniy 2018.2 Https webrequest failes on latest Hololens OS udpate

Discussion in 'Windows Mixed Reality' started by Alexees, Sep 4, 2018.

  1. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    This is kind of a bad coincidence.
    With 2018.2 Unity decided to support proper certificate validation, while Microsoft Updated their Hololens so with the latest OS version the local certificate store is broken, outdated, I don't know...

    The result is: a https request fails as if you were on a different target platform and just returned false in the certificate handler.

    Does anyone know how to force a Hololens to Update it's certificate store?
    Or how to bypass the check in Unity? Overriding the Webrequest certificate handler is not supported on UWP...

    I opened up case 1076758 last week , but I have not yet received an answer to this. It's probably completely on microsofts side...
     
  2. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    330
    Hey @Alexees just writing to let you know we see your bug report, thank you for taking the time to file that. I will get this report of yours over to Microsoft and hopefully a fix will come shortly. Have you reported it on their forums yet?
     
  3. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    @JasonCostanza yes, I also filed it here since that was where I was directed to from where they stated their knowledge about the bug. That's what they've written:

    This is a tough one for our application. Would you mind updating me as soon as you know when this will be fixed or at least how to disable the check within Unity?
     
  4. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    @JasonCostanza can you give me any update on the matter? Anyone I can contact too? Unfortunately this is a real breaker for my project.
     
  5. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    330
    I messaged your issue to some engineers I know over there, waiting for a response still. We unfortunately don't get any special treatment in terms of prioritization, so I can only make them aware of something.
     
  6. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    @JasonCostanza I still appreciate the effort, thanks for doing it.
     
    JasonCostanza likes this.
  7. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,247
    Are you using UnityWebRequest of the one from System.Net?
    Are you saying the you do attach certificate handler and return true, but it still doesn't work?
     
  8. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    @Aurimas-Cernius thanks for asking this. I realized that it is possible to override the certificate handler on UWP when you do not use the encryption namespace. So I did that and just returned true. Despite the fact that this threw a NotImplementedException, the https request just worked.
    This monday, it just started working again and I have not the slightest idea why.
     
  9. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    @Aurimas-Cernius The error came back. I am loading an Image from our Website in our Unity app, which works on Desktop, Oculus Go and Mixed Reality Portal. It does not on the Hololens.
    I have found no way to dig deeper into what certificates are allowed on the Hololens, how it's local certificate store looks like, if I could manually add certificates.... it just does not work.
    Any news from the Devs you were talking about?

    For recap:
    I could override the Certificate handler to always return true, but that's not really secure now is it? I cannot add my certificate manually as the corresponding namespace is not available.
    Edit: On Hololens I can not as the use of a certificate handler is not implemented.
     
    Last edited: Dec 5, 2018
  10. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    @Aurimas-Cernius I found a workaround I would like to avoid.
    When I visit each page in Microsoft's Edge browser, the certificates seem to get downloaded and I can use my app.
    I'd rather do this within Unity. Is that possible?
     
  11. royvaneijndhoven

    royvaneijndhoven

    Joined:
    Jun 1, 2017
    Posts:
    59
    Would be nice if Unity did this by default, I haven't found a way to do this from within Unity. Did you?
     
  12. Vander-Does

    Vander-Does

    Joined:
    Dec 22, 2015
    Posts:
    14
    We're facing a similar issue. We need to visit our site in Edge to get things working. Are there any updates on this?
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,432
    We're in the process of working with Microsoft to get this resolved.
     
  14. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    188
    You are? That's nice to know. Will the final solution, whatever it will be, be posted here?
     
  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,432
    Of course. I also understand that it is very frustrating that this is taking a long time to resolve. Trust me, I share your frustration with you.
     
  16. unity_7JXjLrCJX1I68w

    unity_7JXjLrCJX1I68w

    Joined:
    Sep 13, 2018
    Posts:
    1
    Is there any update on this? I'm also currently facing this issue while deploying to a HoloLens.
     
  17. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,432
    Yeah. The fix landed to Unity 2020.1.0a4. I have pull requests out for review for 2019.3, 2019.2 and 2018.4.
     
  18. raggnic

    raggnic

    Joined:
    Sep 27, 2017
    Posts:
    5
    Hi there
    Is it available in Unity 2019?
     
  19. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,432
    The fix also landed to 2019.3.0b4 and 2019.2.10f1. It's still on its way to 2018.4.
     
    Alexees likes this.