Skip to content

@capacitor/network reports "connected" as true when the device is offline. It happens when there is a VPN client running. #1917

Description

@kpturner

Plugin(s)

@capacitor/network

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 5.5.1
  @capacitor/core: 5.5.1
  @capacitor/android: 5.5.1
  @capacitor/ios: 5.5.1

Installed Dependencies:

  @capacitor/cli: 5.5.0
  @capacitor/core: 5.5.0
  @capacitor/android: 5.5.0
  @capacitor/ios: 5.5.0

Platform(s)

Android
IOS

Current Behavior

We have a weird situation where, on Android, the getStatus() method flip-flops between "connected=true" and "connected=false" randomly despite the device being completely offline (airplane mode). When it reports "connected=true" it states that the connection type is "unknown". It turns out that this is being caused by having a VPN client (in this case, NordLayer) installed and active. Although the device is offline, there is something about the VPN client that causes the plugin to think it is online - well it actually continuously toggles between online/offline.

Expected Behavior

Should not think its connected/online when it is not - even with a VPN client.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions