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

SSL/TLS socket write JIT-ted on iOS

Discussion in 'iOS and tvOS' started by r618, Aug 15, 2013.

  1. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,272
    Hi folks, just wanna to bump / share info with this issue -

    As the title says, secure socket write is currently a no go on iOS; so if you're e.g. trying to authenticate against any REST service via secure layer, the request cannot be made and you're out of luck :(

    More specifically, judging from Unity github sources, a property of a Mono's internal class is reflected ( so no compile time enforcing is possible ) - which should resolved / worked around in current Mono, but unfortunately the Unity fork lags few years behind and still contains the JIT buggy implementation ;/

    for the curious:
    Unity implementation -
    https://github.com/Unity-Technologi...lass/System/System.Net/WebConnection.cs#L1086
    current Mono -
    https://github.com/mono/mono/blob/master/mcs/class/System/System.Net/WebConnection.cs#L1166


    This case is reported as #555589 10 days ago, but unfortunately no reply from QA so far (non zero days of summer-)

    So hopefully this helps someone should he/she bump into something similar
     
  2. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
  3. Paul Clark

    Paul Clark

    Joined:
    Jul 12, 2012
    Posts:
    3
  4. ProgrammerJens

    ProgrammerJens

    Joined:
    Jun 3, 2013
    Posts:
    12
    I have exactly the same issue as r618 and it is a showstopper.

    Did any of you guys receive any news on Unity doing anything about this?
     
  5. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
  6. ProgrammerJens

    ProgrammerJens

    Joined:
    Jun 3, 2013
    Posts:
    12
    Bummer :|
     
  7. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Ask them?
     
  8. ProgrammerJens

    ProgrammerJens

    Joined:
    Jun 3, 2013
    Posts:
    12
  9. dragonmaster193

    dragonmaster193

    Joined:
    Apr 30, 2014
    Posts:
    5
    A HttpWebRequest over HTTPS works for me on iOS, but only if I have the API Compatibility Level set to .NET 2.0 Subset. If I have it set to .NET 2.0 then I get the JIT compile error in the original post. I've submitted a bug report (#616387).
     
  10. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,272
    thanks for the info

    ( IIRC unfortunately Spring.Social framework which I've tried to use wouldn't compile with subset :/ )
     
  11. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,272
    it's reproduced and confirmed ( sorry for the delay ))
     
  12. Auzzanti

    Auzzanti

    Joined:
    Jun 9, 2015
    Posts:
    6
    Yo,

    We are experiencing a connection issue with SSL as well and was wondering if there have been any developments on this thread.
     
  13. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,272
    I think this call passed using IL2cpp, but I'm not sure; it's worth a try though
     
  14. Auzzanti

    Auzzanti

    Joined:
    Jun 9, 2015
    Posts:
    6
    This is happening in the editor as well as on device. The first SSL attempt we make fails and times out. Then we automatically retry connection and it succeeds the second time. We experience this around a third of the time we start the app. After it succeeds it always succeeds but the first attempt usually fails.

    Thanks,