[GH-ISSUE #1293] the trait bound &url::Url: IntoClientRequest is not satisfied #593

Closed
opened 2026-02-27 19:31:26 +03:00 by kerem · 3 comments
Owner

Originally created by @thedtvn on GitHub (Jun 8, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1293

bug from conmmit 8f9bec21d7

error[E0277]: the trait bound `&url::Url: IntoClientRequest` is not satisfied
   --> C:\Users\duong\.cargo\git\checkouts\librespot-06fda9f186b35c32\8f9bec2\core\src\dealer\mod.rs:412:66
    |
412 |     let (mut ws_tx, ws_rx) = tokio_tungstenite::client_async_tls(address, stream)
    |                              ----------------------------------- ^^^^^^^ the trait `IntoClientRequest` is not implemented for `&url::Url`
    |                              |
    |                              required by a bound introduced by this call
    |
    = help: the following other types implement trait `IntoClientRequest`:
              httparse::Request<'h, 'b>
              ClientRequestBuilder
              tokio_tungstenite::tungstenite::http::Request<()>
              tokio_tungstenite::tungstenite::http::Uri
              std::string::String
              &'a str
              &'a std::string::String
              &'a tokio_tungstenite::tungstenite::http::Uri
note: required by a bound in `client_async_tls`
   --> C:\Users\duong\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-tungstenite-0.23.0\src\tls.rs:161:8
    |
156 | pub async fn client_async_tls<R, S>(
    |              ---------------- required by a bound in this function
...
161 |     R: IntoClientRequest + Unpin,
    |        ^^^^^^^^^^^^^^^^^ required by this bound in `client_async_tls`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `librespot-core` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Originally created by @thedtvn on GitHub (Jun 8, 2024). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1293 bug from conmmit 8f9bec21d7a0d1e095039c1ff9ecd7c532d9e74e ``` error[E0277]: the trait bound `&url::Url: IntoClientRequest` is not satisfied --> C:\Users\duong\.cargo\git\checkouts\librespot-06fda9f186b35c32\8f9bec2\core\src\dealer\mod.rs:412:66 | 412 | let (mut ws_tx, ws_rx) = tokio_tungstenite::client_async_tls(address, stream) | ----------------------------------- ^^^^^^^ the trait `IntoClientRequest` is not implemented for `&url::Url` | | | required by a bound introduced by this call | = help: the following other types implement trait `IntoClientRequest`: httparse::Request<'h, 'b> ClientRequestBuilder tokio_tungstenite::tungstenite::http::Request<()> tokio_tungstenite::tungstenite::http::Uri std::string::String &'a str &'a std::string::String &'a tokio_tungstenite::tungstenite::http::Uri note: required by a bound in `client_async_tls` --> C:\Users\duong\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-tungstenite-0.23.0\src\tls.rs:161:8 | 156 | pub async fn client_async_tls<R, S>( | ---------------- required by a bound in this function ... 161 | R: IntoClientRequest + Unpin, | ^^^^^^^^^^^^^^^^^ required by this bound in `client_async_tls` For more information about this error, try `rustc --explain E0277`. error: could not compile `librespot-core` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... ```
kerem 2026-02-27 19:31:26 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@roderickvd commented on GitHub (Jun 8, 2024):

Weird, so it builds on the CI but not on your system?

<!-- gh-comment-id:2156152976 --> @roderickvd commented on GitHub (Jun 8, 2024): Weird, so it builds on the CI but not on your system?
Author
Owner

@tenortim commented on GitHub (Jun 8, 2024):

You're building with tokio-tungstenite v0.23.0, which is not the version in Cargo.lock (v0.21.0).
If I build with a clean checkout of the dev branch which is locked to tokio-tungstenite v0.21.0 it builds fine.
I then made a clone of the repo/build directory, ran cargo update tokio-tungstenite and, sure enough, it's now broken. So, it seems that tokio-tungstenite v0.23.0 is broken.

timw in 🌐 ubuntu-server in librespot on  dev is 📦 v0.5.0-dev via 🦀 v1.78.0
❯ cargo build --release
   Compiling libc v0.2.153
   Compiling autocfg v1.1.0
...
   Compiling webpki v0.22.4
   Compiling librespot v0.5.0-dev (/home/timw/git/other/librespot)
    Finished `release` profile [optimized] target(s) in 3m 57s

vs

timw in 🌐 ubuntu-server in librespot-tmp on  dev is 📦 v0.5.0-dev via 🦀 v1.78.0
❯ cargo update tokio-tungstenite

    Updating crates.io index
    Updating rustls v0.22.2 -> v0.23.7 (latest: v0.23.9)
    Updating tokio-rustls v0.25.0 -> v0.26.0
    Updating tokio-tungstenite v0.21.0 -> v0.23.0
    Updating tungstenite v0.21.0 -> v0.23.0
note: pass `--verbose` to see 217 unchanged dependencies behind latest

timw in 🌐 ubuntu-server in librespot-tmp on  dev [!] is 📦 v0.5.0-dev via 🦀 v1.78.0 took 2s
❯

timw in 🌐 ubuntu-server in librespot-tmp on  dev [!] is 📦 v0.5.0-dev via 🦀 v1.78.0
❯ cargo build --release
  Downloaded tokio-rustls v0.26.0
  Downloaded tungstenite v0.23.0
  Downloaded tokio-tungstenite v0.23.0
  Downloaded rustls v0.23.7
  Downloaded 4 crates (505.1 KB) in 0.50s
   Compiling rustls v0.23.7
   Compiling rustls-webpki v0.102.2
   Compiling tungstenite v0.23.0
   Compiling tokio-rustls v0.26.0
   Compiling tokio-tungstenite v0.23.0
   Compiling librespot-core v0.5.0-dev (/home/timw/git/other/librespot-tmp/core)
error[E0277]: the trait bound `&url::Url: IntoClientRequest` is not satisfied
   --> core/src/dealer/mod.rs:412:66
    |
412 | ...ws_rx) = tokio_tungstenite::client_async_tls(address, stream)
    |             ----------------------------------- ^^^^^^^ the trait `IntoClientRequest` is not implemented for `&url::Url`
    |             |
    |             required by a bound introduced by this call
...
<!-- gh-comment-id:2156176489 --> @tenortim commented on GitHub (Jun 8, 2024): You're building with tokio-tungstenite v0.23.0, which is not the version in Cargo.lock (v0.21.0). If I build with a clean checkout of the dev branch which is locked to tokio-tungstenite v0.21.0 it builds fine. I then made a clone of the repo/build directory, ran `cargo update tokio-tungstenite` and, sure enough, it's now broken. So, it seems that tokio-tungstenite v0.23.0 is broken. ``` timw in 🌐 ubuntu-server in librespot on  dev is 📦 v0.5.0-dev via 🦀 v1.78.0 ❯ cargo build --release Compiling libc v0.2.153 Compiling autocfg v1.1.0 ... Compiling webpki v0.22.4 Compiling librespot v0.5.0-dev (/home/timw/git/other/librespot) Finished `release` profile [optimized] target(s) in 3m 57s ``` vs ``` timw in 🌐 ubuntu-server in librespot-tmp on  dev is 📦 v0.5.0-dev via 🦀 v1.78.0 ❯ cargo update tokio-tungstenite Updating crates.io index Updating rustls v0.22.2 -> v0.23.7 (latest: v0.23.9) Updating tokio-rustls v0.25.0 -> v0.26.0 Updating tokio-tungstenite v0.21.0 -> v0.23.0 Updating tungstenite v0.21.0 -> v0.23.0 note: pass `--verbose` to see 217 unchanged dependencies behind latest timw in 🌐 ubuntu-server in librespot-tmp on  dev [!] is 📦 v0.5.0-dev via 🦀 v1.78.0 took 2s ❯ timw in 🌐 ubuntu-server in librespot-tmp on  dev [!] is 📦 v0.5.0-dev via 🦀 v1.78.0 ❯ cargo build --release Downloaded tokio-rustls v0.26.0 Downloaded tungstenite v0.23.0 Downloaded tokio-tungstenite v0.23.0 Downloaded rustls v0.23.7 Downloaded 4 crates (505.1 KB) in 0.50s Compiling rustls v0.23.7 Compiling rustls-webpki v0.102.2 Compiling tungstenite v0.23.0 Compiling tokio-rustls v0.26.0 Compiling tokio-tungstenite v0.23.0 Compiling librespot-core v0.5.0-dev (/home/timw/git/other/librespot-tmp/core) error[E0277]: the trait bound `&url::Url: IntoClientRequest` is not satisfied --> core/src/dealer/mod.rs:412:66 | 412 | ...ws_rx) = tokio_tungstenite::client_async_tls(address, stream) | ----------------------------------- ^^^^^^^ the trait `IntoClientRequest` is not implemented for `&url::Url` | | | required by a bound introduced by this call ... ```
Author
Owner

@tenortim commented on GitHub (Jun 8, 2024):

github.com/snapview/tokio-tungstenite@a53454b16d looks like the cause of the breakage.

<!-- gh-comment-id:2156180036 --> @tenortim commented on GitHub (Jun 8, 2024): https://github.com/snapview/tokio-tungstenite/commit/a53454b16d9eff3fbaa7445541c7fe1c6ccad4d7 looks like the cause of the breakage.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#593
No description provided.