Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

Đang mở
#1,941 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
android, java, kotlin
Lĩnh vực
mobile, testing-qa

Hướng nghiên cứu

Bắt đầu với reproducer trong LoginDomainTest.kt tại dòng 38 và các phiên bản Appium client, server, Node, Android Studio và thiết bị được liệt kê. Kiểm tra remote URL đã cấu hình cùng với stack trace về kết nối bị từ chối và thiết lập Appium server cục bộ. Công việc được xem là hoàn tất khi xác định được một lỗi có thể tái hiện ở client hoặc setup và ghi lại nguyên nhân đã được xác minh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

Hi everyone,
i'm getting 'SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'localhost', ip: '127.0.0.1' cuando quiero conectarme al servidor de appium local desde android studio(kotlin).

Environment

Below is my Environment:
Mac OS: Ventura 13.4
Android Studio: 2022.1.1
Appium.io : 8.5.1
Appium server: 2.0.0-beta.71
node: v20.3.0
device: Android Samsung A235M

Code To Reproduce Issue

`@get:Rule
val activityScenarioRule = ActivityScenarioRule(LaunchActivity::class.java)

private lateinit var driver: AndroidDriver

@Before
@Throws(MalformedURLException::class)
fun setUp() {
    val desiredCapabilities = DesiredCapabilities()
    desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "samsung SM-A235M")
    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "13")
    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "android")
    desiredCapabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "appium")
    //desiredCapabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome")
    val remoteUrl = URL("http://127.0.0.1:4723")
    driver = AndroidDriver(remoteUrl, desiredCapabilities)
}

@After
fun tearDown() {
    driver?.quit()
}

@Test
fun testButtonNavigationToBrowser() {
    onView(withId(R.id.single_single_on_btn)).perform(click())

    Thread.sleep(7000)
    
    val inputField = driver?.let {
        it.findElement(By.cssSelector("input[name='domain']"))
    }
    
    inputField?.let { it.sendKeys("fulcrum") }
}`

Link To Appium Logs

'
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'localhost', ip: '127.0.0.1'
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:561)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:274)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:157)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:89)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:101)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:113)
at com.spatialnetworks.fulcrum.app.LoginDomainTest.setUp(LoginDomainTest.kt:38)
... 33 trimmed
Caused by: org.openqa.selenium.WebDriverException: Connection refused
Build info: version: '4.9.1', revision: 'eb2032df7f'
System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '4.19.157-perf-25521380-abA235MUBU1BVL1', java.version: '0'
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor.lambda$execute$4(AppiumCommandExecutor.java:262)
at io.appium.java_client.remote.AppiumCommandExecutor$$ExternalSyntheticLambda3.get(Unknown Source:2)
at java.util.Optional.orElseGet(Optional.java:365)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:261)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
... 40 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:762)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:1012)'

Ngôn ngữ chính
Java
Star
1.3k
Fork
755
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của appium/java-client

Tất cả issue của appium/java-client

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.