We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corelibs-foundation's URLSession backed by libcurl fails to communicate with ChromeDriver's HTTP server.
$ curl -LO https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.78/linux64/chromedriver-linux64.zip $ unzip chromedriver-linux64.zip $ ./chromedriver-linux64/chromedriver-p 9515 $ swiftc main.swift && ./main Error: Error Domain=NSURLErrorDomain Code=-1 "(null)" Failed writing header
// File: main.swift import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif do { var request = URLRequest(url: URL(string: "http://127.0.0.1:9515/session")!) request.httpMethod = "POST" let _: (Data, URLResponse) = try await withCheckedThrowingContinuation { continuation in let task = URLSession.shared.dataTask(with: request) { (data, response, error) in guard let data = data, let response = response else { let error = error ?? URLError(.badServerResponse) return continuation.resume(throwing: error) } continuation.resume(returning: (data, response)) } task.resume() } } catch { print("Error: \(error)") print(error.localizedDescription) exit(1) }
Note that the above script works on macOS and corresponding curl CLI command (curl -X POST http://127.0.0.1:9515/session) returns a response well.
curl -X POST http://127.0.0.1:9515/session
Ubuntu 22.04 (This should be reproducible on all platforms with corelisb-foundation in theory)
DEVELOPMENT-SNAPSHOT-2024-05-15-a Swift version 6.0-dev (LLVM cef183591317ec7, Swift 66e311074bff491) Target: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered:
No branches or pull requests
corelibs-foundation's URLSession backed by libcurl fails to communicate with ChromeDriver's HTTP server.
Reproducer
Note that the above script works on macOS and corresponding curl CLI command (
curl -X POST http://127.0.0.1:9515/session
) returns a response well.Platform
Ubuntu 22.04 (This should be reproducible on all platforms with corelisb-foundation in theory)
Toolchain version
DEVELOPMENT-SNAPSHOT-2024-05-15-a
Swift version 6.0-dev (LLVM cef183591317ec7, Swift 66e311074bff491)
Target: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: