Search Issue Tracker

Fixed in 2019.2

Fixed in 2019.3

Votes

24

Found in

2019.2

2019.2.0f1

Issue ID

1178696

Regression

Yes

[Android] Application.internetReachability returns NotReachable on certain devices even if internet is available

Android

-

To reproduce:
1. Open attached project "InternetReachability.zip"
2. Build and run on Android device
3. Observe the output on screen

Expected: "ReachableViaCarrierDataNetwork" or "ReachableViaLocalAreaNetwork" is returned
Actual: NotReachable is returned

Reproduced in: 2018.4.8f1, 2019.2.3f1, 2019.3.0b1, 2020.1.0a1

Reproduced on devices:
VLNQA00012, Samsung Galaxy S6 (SM-G920F), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00013, Samsung Galaxy S6 edge+ (SM-G928F), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00123, Google Pixel 2 XL (Pixel 2 XL), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540

Not reproduced on devices:
VLNQA00115, Sony Xperia Z3 (D6603), Android 6.0.1, CPU: Snapdragon 801 MSM8974AC, GPU: Adreno (TM) 330
VLNQA00017, Huawei Nexus 6P (Nexus 6P), Android 8.0.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430
VLNQA00057, Htc One M9+ (HTC_M9pw), Android 5.0.2, CPU: MediaTek Helio X10 MT6795T, GPU: PowerVR Rogue G6200
VLNQA00272, Samsung Galaxy S10+ (SM-G975U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00015, Samsung Galaxy Note8 (SM-N950W), Android 8.0.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540

Note: could not test on 2017.4 and 2019.1 due to broken components

  1. Response avatar

    Resolution Note (fix version 2019.2):

    First frame does really return "Unreachable", but the second frame is already good. Since the OS API is async and we don't want to wait for the callback on the main thread on the first frame, this is an expected behavior. Please wait for the second frame to get a reliable result.

Comments (13)

  1. F724308e1be55f39513e0ad22e9ae20b?d=mm

    lycoris102

    Sep 20, 2019 08:19

    I have the same problem.

    # Unity Version
    2019.2.4f1

    # Test Code
    public class DebugInternetReachability : MonoBehaviour
    {
    void Update()
    {
    Debug.Log(UnityEngine.Application.internetReachability);
    }
    }

    (Attach to a GameObject in first scene)

    # Device
    ZTE Axon7 (Android7.1.1)

    # Result
    09-20 16:52:25.636 18063 18091 I Unity : NotReachable

    09-20 16:55:22.876 18063 18091 I Unity : NotReachable

    (The state changed "ReachableViaLocalAreaNetwork" when waking from sleep)

  2. Ee7fa2c408be8714917f3903fa97ffdc?d=mm

    rchapman

    Sep 19, 2019 01:25

    Seeing this on Oculus Quest, the app seems to stay in a "not reachable" state regardless of connectivity.

  3. 465ca539808c833f1f55c76a34a693b1?d=mm

    robertsze

    Sep 12, 2019 09:50

    On our test devices Application.internetRechability always returns NotReachable, not only in the first frame (also after seconds or minutes). (Samsung Galaxy S5 for example). Works fine with every Unity version < 2019.2

    more: https://forum.unity.com/threads/2019-2-issue-with-application-internetreachability-for-android.726404/
    more: https://forum.unity.com/threads/unity-2019-2-0-internet-reachability-api-is-not-working-in-android-mobile.724343/

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.