wiomoc / whatsappweb-rs

WhatsApp Web client for Rust
MIT License
121 stars 36 forks source link

i dont can compilling, i update Cargo.toml ring version and untrusted. #14

Open bottookku opened 5 years ago

bottookku commented 5 years ago

ring = "0.14.6" untrusted = "0.6.2"

but i recieve errors and not finishing compilling

ubuntu@ip-172-31-31-153:~/whatsappweb-rs$ cargo build
   Compiling whatsappweb v0.0.2 (/home/ubuntu/whatsappweb-rs)
warning: use of deprecated item 'ws::util::Timeout': use mio-extras instead
  --> src/connection.rs:18:23
   |
18 | use ws::util::{Token, Timeout};
   |                       ^^^^^^^
   |
   = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'ws::util::Timeout': use mio-extras instead
   --> src/connection.rs:691:57
    |
691 |     fn on_new_timeout(&mut self, event: Token, timeout: Timeout) -> ws::Result<()> {
    |                                                         ^^^^^^^

error[E0599]: no method named `public_key_len` found for type `ring::agreement::EphemeralPrivateKey` in the current scope
  --> src/crypto.rs:19:54
   |
19 |     let mut my_public_key = vec![0u8; my_private_key.public_key_len()];
   |                                                      ^^^^^^^^^^^^^^

error[E0061]: this function takes 0 parameters but 1 parameter was supplied
  --> src/crypto.rs:20:20
   |
20 |     my_private_key.compute_public_key(&mut my_public_key).unwrap();
   |                    ^^^^^^^^^^^^^^^^^^ expected 0 parameters

error: aborting due to 2 previous errors

Some errors occurred: E0061, E0599.
For more information about an error, try `rustc --explain E0061`.
error: Could not compile `whatsappweb`.

To learn more, run the command again with --verbose.
eeeeeta commented 5 years ago

I fixed this issue in my own fork with this commit: https://github.com/eeeeeta/whatsappweb-rs/commit/65816614d14173031d3e85e983f7172277b05657 - if you wanted, you could probably just cherry-pick that to get it to compile?

stephen1331 commented 5 years ago
warning: use of deprecated item 'ws::util::Timeout': use mio-extras instead --> src/connection.rs:18:23 18 use ws::util::{Token, Timeout}; ^^^^^^^

= note: #[warn(deprecated)] on by default

warning: use of deprecated item 'ws::util::Timeout': use mio-extras instead --> src/connection.rs:691:57 | 691 | fn on_new_timeout(&mut self, event: Token, timeout: Timeout) -> ws::Result<()> { | ^^^^^^^

error[E0599]: no method named public_key_len found for type ring::agreement::EphemeralPrivateKey in the current scope --> src/crypto.rs:19:54 | 19 | let mut my_public_key = vec![0u8; my_private_key.public_key_len()]; | ^^^^^^^^^^^^^^

error[E0061]: this function takes 0 parameters but 1 parameter was supplied --> src/crypto.rs:20:20 | 20 | my_private_key.compute_public_key(&mut my_public_key).unwrap(); | ^^^^^^^^^^^^^^^^^^ expected 0 parameters

warning: use of deprecated item 'std::error::Error::cause': replaced by Error::source, which can support downcasting --> src/errors.rs:10:1 10 / error_chain! { 11 foreign_links { 12 Io(io::Error); 13 Websocket(ws::Error); ... 31 } 32 } _^

= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors

eeeeeta commented 5 years ago

Hi @stephen1331,

You might just want to use my fork at https://git.theta.eu.org/whatsappweb-rs.git/ (mirrored on GH as https://github.com/eeeeeta/whatsappweb-rs) until the issue here is resolved; I can confirm that my code does indeed compile, last time I checked.

Quoting stephen1331 (2019-05-23 05:29:19)

warning: use of deprecated item 'ws::util::Timeout': use mio-extras instead --> src/connection.rs:18:23 18 use ws::util::{Token, Timeout}; ^^^^^^^

= note: #[warn(deprecated)] on by default

warning: use of deprecated item 'ws::util::Timeout': use mio-extras instead --> src/connection.rs:691:57 | 691 | fn on_new_timeout(&mut self, event: Token, timeout: Timeout) -> ws::Result<()> { | ^^^^^^^

error[E0599]: no method named public_key_len found for type ring::agreement::EphemeralPrivateKey in the current scope --> src/crypto.rs:19:54 | 19 | let mut my_public_key = vec![0u8; my_private_key.public_key_len()]; | ^^^^^^^^^^^^^^

error[E0061]: this function takes 0 parameters but 1 parameter was supplied --> src/crypto.rs:20:20 | 20 | my_private_key.compute_public_key(&mut my_public_key).unwrap(); | ^^^^^^^^^^^^^^^^^^ expected 0 parameters

warning: use of deprecated item 'std::error::Error::cause': replaced by Error::source, which can support downcasting --> src/errors.rs:10:1 10 / error_chain! { 11 foreign_links { 12 Io(io::Error); 13 Websocket(ws::Error); ... 31 } 32 } _^

= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors

— You are receiving this because you commented. Reply to this email directly, [1]view it on GitHub, or [2]mute the thread.

References

Visible links

  1. https://github.com/wiomoc/whatsappweb-rs/issues/14?email_source=notifications&email_token=ACHXT5Q4AOU4UWFUPI7YTE3PWYMR7A5CNFSM4GZ2EWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBA67Y#issuecomment-495062911
  2. https://github.com/notifications/unsubscribe-auth/ACHXT5VTKFLR3U3EKLQ6AXTPWYMR7ANCNFSM4GZ2EWMQ
stephen1331 commented 5 years ago

Hey i checked it out what do i do after this?