On Arch, I have rustup installed and currently using rustc 1.64.0. I am able to build sdl-cli with this version, but when I try to use the application it will not work.
I used rustup to install 1.61.0, was able to build sdl-cli successfully, and was able to use sdl-cli successfully.
Not sure why rustc 1.64.0 is creating this issue, but wanted to document it.
@duke do you want to check if the sdl-cli you built with 1.65.0 works?
On Arch, I have rustup installed and currently using rustc 1.64.0. I am able to build sdl-cli with this version, but when I try to use the application it will not work.
Since we know it will compile and function with rustc 1.61.0 (on Ubuntu 20.04 per https://git.hush.is/hush/silentdragonlite-cli/issues/17), I went to test this version on Arch.
I used rustup to install 1.61.0, was able to build sdl-cli successfully, and was able to use sdl-cli successfully.
Not sure why rustc 1.64.0 is creating this issue, but wanted to document it.
@duke do you want to check if the sdl-cli you built with 1.65.0 works?
@jahway603 what exact command/server are you trying to talk to and what is the error?
with rustc 1.56.0 when I type the exact command from the README I get this error:
$ ./target/release/silentdragonlite-cli --server lite.hush.is
Error during startup:grpc-status: Unknown, grpc-message: "transport error: http2 error: protocol error: frame with invalid size"
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
But when I prefix the URL with https:// it works :
so we likely should update our docs. I will be able to test rust 1.65.0 soon
@jahway603 what exact command/server are you trying to talk to and what is the error?
with rustc 1.56.0 when I type the exact command from the README I get this error:
```
$ ./target/release/silentdragonlite-cli --server lite.hush.is
Error during startup:grpc-status: Unknown, grpc-message: "transport error: http2 error: protocol error: frame with invalid size"
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
```
But when I prefix the URL with https:// it works :
```
$ ./target/release/silentdragonlite-cli --server https://lite.hushpool.is
Reading wallet version 9
Lightclient connecting to https://lite.hushpool.is:443/
Syncing 1180001/11805788
{
"result": "success",
"latest_block": 1180578,
"downloaded_bytes": 35258965
}
Ready!
(main) Block:1180578 (type 'help') >>
```
so we likely should update our docs. I will be able to test rust 1.65.0 soon
@duke I'm using the exact same command in both tests, which is ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
I've tested with other lite servers to make sure that wasn't the issue.
On the sdl-cli compiled with rustc 1.61.0, it works as expected.
On the sdl-cli compiled with rustc 1.64.0, I get the following:
$ ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
@duke I'm using the exact same command in both tests, which is `./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is`
I've tested with other lite servers to make sure that wasn't the issue.
* On the sdl-cli compiled with rustc 1.61.0, it works as expected.
* On the sdl-cli compiled with rustc 1.64.0, I get the following:
```
$ ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
```
Seems like some backward incompatible change in Rust breaks stuff when it tries to actually make a TCP connection to the remote host
@jahway603 same error with Rust 1.65.0 . When using the command under strace, it seems that it hits an error when using the `connect` network syscall:
```
connect(6, {sa_family=0x1bb /* AF_??? */, sa_data="k\256F\373"}, 6) = -1 EINVAL (Invalid argument)
```
Seems like some backward incompatible change in Rust breaks stuff when it tries to actually make a TCP connection to the remote host
One idea is to use strace on a version of rust that works and compare that to strace output for a non-working version and see if that gives any clues
One idea is to use `strace` on a version of rust that works and compare that to `strace` output for a non-working version and see if that gives any clues
connect(6, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("IP")}, 16) = -1 EINPROGRESS (Operation now in progress)
@jahway603 so what it looks like is an invalid sa_family (and potentially other arguments) is being given to connect()
With rust 1.47 under strace :
```
connect(6, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("IP")}, 16) = -1 EINPROGRESS (Operation now in progress)
```
@jahway603 so what it looks like is an invalid `sa_family` (and potentially other arguments) is being given to `connect()`
To summarize, code works in at least rust 1.47 - 1.61 and then something changed in Rust that breaks the code and it fails to create a valid TCP connection
To summarize, code works in at least rust 1.47 - 1.61 and then something changed in Rust that breaks the code and it fails to create a valid TCP connection
Just throwing it out there but might be worth testing without https:// and with port 443 to see if any different. Unrelated to this, but I was having connection errors with Android if I specified https:// because it would automatically set it based on port.
0x1bb in decimal is 443 so seems the arg values may be out of order in newer version compared to old.
Just throwing it out there but might be worth testing without https:// and with port 443 to see if any different. Unrelated to this, but I was having connection errors with Android if I specified https:// because it would automatically set it based on port.
0x1bb in decimal is 443 so seems the arg values may be out of order in newer version compared to old.
@fekt 0x1bb in decimal being 443 is a very good hint. I think some dependency that silentdragonlite-cli uses is now incompatible with newer rust versions. Possibly related to arguments changing positions. So I think we litely need to update one of our dependencies to be compatible with newer rusts (which likely means being incompatible with older rusts)
I tried a few permutations of with/without https:// and :443 and nothing worked for me :
$ ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
$ ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is:443
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
$ ./silentdragonlite-cli --nosync --server wtfistheinternet.hush.is:443
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
@fekt 0x1bb in decimal being 443 is a very good hint. I think some dependency that silentdragonlite-cli uses is now incompatible with newer rust versions. Possibly related to arguments changing positions. So I think we litely need to update one of our dependencies to be compatible with newer rusts (which likely means being incompatible with older rusts)
I tried a few permutations of with/without https:// and :443 and nothing worked for me :
```
$ ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
$ ./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is:443
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
$ ./silentdragonlite-cli --nosync --server wtfistheinternet.hush.is:443
Error during startup:transport error: error trying to connect: tcp connect error: Invalid argument (os error 22)
If you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.
```
One option I just thought of is to create a build script to do the following:
download the correct version of rust using rustup
set default rustc to correct version
build sdl-cli
remove the version installed with rustup
Thoughts?
One option I just thought of is to create a build script to do the following:
1. download the correct version of rust using rustup
2. set default rustc to correct version
3. build sdl-cli
4. remove the version installed with rustup
Thoughts?
@jahway603 I think it's a good idea for the build system to download a known-good version of rust to compile everything with, just like hush3 does. It should be installed somewhere inside the current directory. I don't think we should delete it (#4) because if you change a single line of code and want to recompile, it will need to download rust again. We can make #4 happen if someone does "make clean" or similar
@jahway603 I think it's a good idea for the build system to download a known-good version of rust to compile everything with, just like hush3 does. It should be installed somewhere inside the current directory. I don't think we should delete it (#4) because if you change a single line of code and want to recompile, it will need to download rust again. We can make #4 happen if someone does "make clean" or similar
@duke lots of users will install rustc & cargo from their OS package manager & that will work for some. For everyone else, or those using newer versions that are borked, I was thinking we could do something similar to what the DietPi distro almost implemented when rust became a requirement for the Matrix Synapse server https://github.com/MichaIng/DietPi/pull/5778/files. This "funny" problem on ARM SBCs is what made me think of this possible solution.
@duke lots of users will install rustc & cargo from their OS package manager & that will work for some. For everyone else, or those using newer versions that are borked, I was thinking we could do something similar to what the DietPi distro almost implemented when rust became a requirement for the Matrix Synapse server https://github.com/MichaIng/DietPi/pull/5778/files. This "funny" problem on ARM SBCs is what made me think of this possible solution.
I just tested this build on the following versions of rustc:
Rustc Version
Rustup command
Status
1.62
rustup run 1.62 make build
it connects to light servers
1.63
rustup run 1.63 make build
it connects to light servers
Anything rustc 1.64+ still build, but won't connect.
I just tested this build on the following versions of rustc:
| Rustc Version | Rustup command | Status |
| -------- | -------- | ----------------- |
| 1.62 | rustup run 1.62 make build | it connects to light servers |
| 1.63 | rustup run 1.63 make build | it connects to light servers |
Anything rustc 1.64+ still build, but won't connect.
@duke did this work after being built with rust 1.65.0? The newest rustc is 1.66.0, but I haven't tested it yet.
@duke did [this work](https://git.hush.is/hush/silentdragonlite-cli/commit/2505c6eae685e3e665fcd789c82d2c85f08f1744) after being built with rust 1.65.0? The newest rustc is 1.66.0, but I haven't tested it yet.
On Arch, I have rustup installed and currently using rustc 1.64.0. I am able to build sdl-cli with this version, but when I try to use the application it will not work.
Since we know it will compile and function with rustc 1.61.0 (on Ubuntu 20.04 per https://git.hush.is/hush/silentdragonlite-cli/issues/17), I went to test this version on Arch.
I used rustup to install 1.61.0, was able to build sdl-cli successfully, and was able to use sdl-cli successfully.
Not sure why rustc 1.64.0 is creating this issue, but wanted to document it.
@duke do you want to check if the sdl-cli you built with 1.65.0 works?
@jahway603 what exact command/server are you trying to talk to and what is the error?
with rustc 1.56.0 when I type the exact command from the README I get this error:
But when I prefix the URL with https:// it works :
so we likely should update our docs. I will be able to test rust 1.65.0 soon
@duke I'm using the exact same command in both tests, which is
./silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
I've tested with other lite servers to make sure that wasn't the issue.
On the sdl-cli compiled with rustc 1.61.0, it works as expected.
On the sdl-cli compiled with rustc 1.64.0, I get the following:
@jahway603 anything useful in your nginx error logs ?
@jahway603 same error with Rust 1.65.0 . When using the command under strace, it seems that it hits an error when using the
connect
network syscall:Seems like some backward incompatible change in Rust breaks stuff when it tries to actually make a TCP connection to the remote host
for completeness
silentdragonlite-cli --nosync --server https://wtfistheinternet.hush.is
works fine with rust 1.47.0One idea is to use
strace
on a version of rust that works and compare that tostrace
output for a non-working version and see if that gives any cluesWith rust 1.47 under strace :
@jahway603 so what it looks like is an invalid
sa_family
(and potentially other arguments) is being given toconnect()
To summarize, code works in at least rust 1.47 - 1.61 and then something changed in Rust that breaks the code and it fails to create a valid TCP connection
Just throwing it out there but might be worth testing without https:// and with port 443 to see if any different. Unrelated to this, but I was having connection errors with Android if I specified https:// because it would automatically set it based on port.
0x1bb in decimal is 443 so seems the arg values may be out of order in newer version compared to old.
@fekt 0x1bb in decimal being 443 is a very good hint. I think some dependency that silentdragonlite-cli uses is now incompatible with newer rust versions. Possibly related to arguments changing positions. So I think we litely need to update one of our dependencies to be compatible with newer rusts (which likely means being incompatible with older rusts)
I tried a few permutations of with/without https:// and :443 and nothing worked for me :
One option I just thought of is to create a build script to do the following:
Thoughts?
@jahway603 I think it's a good idea for the build system to download a known-good version of rust to compile everything with, just like hush3 does. It should be installed somewhere inside the current directory. I don't think we should delete it (#4) because if you change a single line of code and want to recompile, it will need to download rust again. We can make #4 happen if someone does "make clean" or similar
@duke lots of users will install rustc & cargo from their OS package manager & that will work for some. For everyone else, or those using newer versions that are borked, I was thinking we could do something similar to what the DietPi distro almost implemented when rust became a requirement for the Matrix Synapse server https://github.com/MichaIng/DietPi/pull/5778/files. This "funny" problem on ARM SBCs is what made me think of this possible solution.
I just tested this build on the following versions of rustc:
Anything rustc 1.64+ still build, but won't connect.
@duke did this work after being built with rust 1.65.0? The newest rustc is 1.66.0, but I haven't tested it yet.
@jahway603 I think it will build with 1.65 but won't connect