Closed wazzeps closed 1 year ago
Since java-client 8.4.0 getConnection() method from HasNetworkConnection interface throws NPE.
setConnection() doesn't work too as it uses getConnection().
driver.getConnection();
java.lang.NullPointerException at io.appium.java_client.android.connection.HasNetworkConnection.getConnection(HasNetworkConnection.java:73)
[HTTP] {"script":"mobile: getConnectivity","args":[]} [debug] [AndroidUiautomator2Driver@3e00 (99b37702)] Calling AppiumDriver.execute() with args: ["mobile: getConnectivity",[],"99b37702-f100-49c5-99da-ab0155789b55"] [AndroidUiautomator2Driver@3e00 (99b37702)] Executing native command 'mobile: getConnectivity' [debug] [AndroidUiautomator2Driver@3e00 (99b37702)] Responding to client with driver.execute() result: {} [HTTP] <-- POST /session/99b37702-f100-49c5-99da-ab0155789b55/execute/sync 200 2 ms - 12
This must be a bug in the driver itself. Please update it to the most recent version and try again
driver uiautomator2 updated: 2.24.0 => 2.24.1
Now it's working. Thanks!
Description
Since java-client 8.4.0 getConnection() method from HasNetworkConnection interface throws NPE.
setConnection() doesn't work too as it uses getConnection().
Environment
Code To Reproduce Issue [ Good To Have ]
driver.getConnection();
Exception Stacktraces
java.lang.NullPointerException at io.appium.java_client.android.connection.HasNetworkConnection.getConnection(HasNetworkConnection.java:73)
Link To Appium Logs
[HTTP] {"script":"mobile: getConnectivity","args":[]} [debug] [AndroidUiautomator2Driver@3e00 (99b37702)] Calling AppiumDriver.execute() with args: ["mobile: getConnectivity",[],"99b37702-f100-49c5-99da-ab0155789b55"] [AndroidUiautomator2Driver@3e00 (99b37702)] Executing native command 'mobile: getConnectivity' [debug] [AndroidUiautomator2Driver@3e00 (99b37702)] Responding to client with driver.execute() result: {} [HTTP] <-- POST /session/99b37702-f100-49c5-99da-ab0155789b55/execute/sync 200 2 ms - 12