appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.2k stars 753 forks source link

Exception in thread "main" java.lang.AbstractMethodError: Receiver class... #2009

Closed RYenike closed 11 months ago

RYenike commented 11 months ago

Do I have the most recent component updates?

Is the component officially supported by the Appium team?

Is there an existing issue for this?

Current Behavior

Exception in thread "main" java.lang.AbstractMethodError: Receiver class io.appium.java_client.service.local.AppiumServiceBuilder does not define or inherit an implementation of the resolved method 'abstract void loadSystemProperties()' of abstract class org.openqa.selenium.remote.service.DriverService$Builder.

AppiumServiceBuilder builder = new AppiumServiceBuilder();

        builder

                .withAppiumJS(new File("C:\\Users\\hkakarla\\AppData\\Roaming\\npm\\node_modules\\appium\\build\\lib\\main.js"))

                .usingDriverExecutable(new File("C:\\Program Files\\nodejs\\node.exe"))

                .usingPort(4725)

// .withArgument(GeneralServerFlag.LOCAL_TIMEZONE)

// .withLogFile(new File("Appiumlog.txt"))

                .withIPAddress("127.0.0.1");

        server = AppiumDriverLocalService.buildService(builder);
           server.start()

Expected Behavior

AppiumServer should start programatically

Minimal Reproducible Example

AppiumServiceBuilder builder = new AppiumServiceBuilder();

        builder

                .withAppiumJS(new File("C:\\Users\\hkakarla\\AppData\\Roaming\\npm\\node_modules\\appium\\build\\lib\\main.js"))

                .usingDriverExecutable(new File("C:\\Program Files\\nodejs\\node.exe"))

                .usingPort(4725)

// .withArgument(GeneralServerFlag.LOCAL_TIMEZONE)

// .withLogFile(new File("Appiumlog.txt"))

                .withIPAddress("127.0.0.1");

        server = AppiumDriverLocalService.buildService(builder);
           server.start()

Environment

Link to Appium Logs

No response

Further Information

No response

RYenike commented 11 months ago

java_client - 8.5.1 Selenium - 4.12.1

valfirst commented 11 months ago

Duplicate of #1907