Closed JYOTIPRAKASH225 closed 11 months ago
Please refer to this bug. The issue with the log file.
Refer below code new AppiumServiceBuilder() .usingAnyFreePort() .usingDriverExecutable(new File("/usr/local/bin/node")) .withLogFile(new File(System.getProperty("user.dir")+"appium.log")) .withArgument(GeneralServerFlag.RELAXED_SECURITY) .build() .start();
Duplicate of #2004
Description
While creating Appium2.0 Session Programatically using AppiumDriverLocalService Getting NullPointerException
Environment
Details
While creating Appium2.0 Session Programatically using AppiumDriverLocalService Getting NullPointerException
java.lang.NullPointerException at java.base/java.io.FileOutputStream.(FileOutputStream.java:226)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:184)
at org.openqa.selenium.remote.service.DriverService$Builder.getLogOutput(DriverService.java:448)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:495)
at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:89)
at com.appium.appium2Session.getDriver(appium2Session.java:42)
at com.appium.appium2Session.main(appium2Session.java:29)
Code To Reproduce Issue [ Good To Have ]
Exception Stacktraces
(https://gist.github.com/JYOTIPRAKASH225/57d639519e62744800df3ef68300b915)
Link To Appium Logs
java.lang.NullPointerException at java.base/java.io.FileOutputStream.(FileOutputStream.java:226)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:184)
at org.openqa.selenium.remote.service.DriverService$Builder.getLogOutput(DriverService.java:448)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:495)
at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:89)
at com.appium.appium2Session.getDriver(appium2Session.java:42)
at com.appium.appium2Session.main(appium2Session.java:29)