1.5.2 windows binary fails on Windows 10 Home #71

Closed
opened 2 years ago by duke · 8 comments
duke commented 2 years ago
Owner

64 bit, 16GB of RAM
Version 21H1

@shitoshi gets an error popup when clicking "Create new wallet" but it immediately closes. We are trying to get more info about the bug

64 bit, 16GB of RAM Version 21H1 @shitoshi gets an error popup when clicking "Create new wallet" but it immediately closes. We are trying to get more info about the bug
Collaborator

This was related to selected lite server being down and is reproducible by entering a non-existent lite server URL. Would be nice to check server status and cycle through available servers to use a working one as fallback.

As a work-around, users can manually change to a different server by canceling/closing the new wallet wizard screen, closing any other error windows, and then going to Edit > Settings to select a different server. They can then fully close and re-open the wallet to go through new wallet wizard again. A working lite server will give them a seed phrase and start syncing after verification.

This was related to selected lite server being down and is reproducible by entering a non-existent lite server URL. Would be nice to check server status and cycle through available servers to use a working one as fallback. As a work-around, users can manually change to a different server by canceling/closing the new wallet wizard screen, closing any other error windows, and then going to `Edit` > `Settings` to select a different server. They can then fully close and re-open the wallet to go through new wallet wizard again. A working lite server will give them a seed phrase and start syncing after verification.
Collaborator

For some reason a random reconnect to another server once one is invalid wasn't properly working on a Windows machine, I personally never had any problems. Nevertheless, the option provided above will work.

For some reason a random reconnect to another server once one is invalid wasn't properly working on a Windows machine, I personally never had any problems. Nevertheless, the option provided above will work.
Poster
Owner

@fekt in reply to your comment "This was related to selected lite server being down and is reproducible by entering a non-existent lite server URL. Would be nice to check server status and cycle through available servers to use a working one as fallback."

We do actually have code to do that, but some kinds of "server is down" are not handled correctly because different exceptions are thrown, and the code doesn't do what we want. It also may be the case that different kinds of exceptions for different scenarios are thrown on Windows which are not handled correctly.

To correctly identify the bug we need to know exactly what kind of "server is down" triggers this:

  • DNS entry doesn't exist
  • IP address of DNS entry does not have port open
  • Incorrect web server configuration (i.e 5xx error from a backend being down)
  • Incorrect TLS/SSL cert
  • HTTP 1.1 not supported (needed for websockets to work correctly)

Most of the above scenarios will be detected correctly on Linux and a different server will be tried. From my experience, an incorrect TLS/SSL cert situation is not handled correctly. This happened recently when lite.hush.is was using a TLS cert for lite.hush.land .

The function that needs to change is getRandomServer() and specifically this line: https://git.hush.is/hush/SilentDragonLite/src/branch/master/src/settings.cpp#L324 and the next line:

        char* resp = litelib_initialize_existing(false, server.toStdString().c_str());
        QString response = litelib_process_response(resp);

We need to check for an exception in either of those 2 lines of code and if we do, keep trying other servers.

@fekt in reply to your comment "This was related to selected lite server being down and is reproducible by entering a non-existent lite server URL. Would be nice to check server status and cycle through available servers to use a working one as fallback." We do actually have code to do that, but some kinds of "server is down" are not handled correctly because different exceptions are thrown, and the code doesn't do what we want. It also may be the case that different kinds of exceptions for different scenarios are thrown on Windows which are not handled correctly. To correctly identify the bug we need to know exactly what kind of "server is down" triggers this: * DNS entry doesn't exist * IP address of DNS entry does not have port open * Incorrect web server configuration (i.e 5xx error from a backend being down) * Incorrect TLS/SSL cert * HTTP 1.1 not supported (needed for websockets to work correctly) Most of the above scenarios will be detected correctly on Linux and a different server will be tried. From my experience, an incorrect TLS/SSL cert situation is not handled correctly. This happened recently when lite.hush.is was using a TLS cert for lite.hush.land . The function that needs to change is getRandomServer() and specifically this line: https://git.hush.is/hush/SilentDragonLite/src/branch/master/src/settings.cpp#L324 and the next line: ``` char* resp = litelib_initialize_existing(false, server.toStdString().c_str()); QString response = litelib_process_response(resp); ``` We need to check for an exception in either of those 2 lines of code and if we do, keep trying other servers.
Poster
Owner

@fekt @onryo I just realized that the code change I mentioned above has already been done on the dev branch, we wrap things in a try/catch. Can anybody test if things work better on the dev branch?

@fekt @onryo I just realized that the code change I mentioned above has already been done on the `dev` branch, we wrap things in a try/catch. Can anybody test if things work better on the dev branch?
Collaborator

@duke I can try testing dev branch on Windows later and report back.

@duke I can try testing dev branch on Windows later and report back.
Collaborator

@duke Took me some time to get enviroment setup for building, but was able to get dev to build. I get these errors. Wallet will just close after and keeps using same selected server.

Received this error when using https://lite.nyami.org or any random domain not running a light server.

Error creating a wallet
Error: No such host is known. (os error 11001)

Received this error when using https://poop.granitefone.me:9067

Error creating a wallet
Error: transport error: error trying to connect: received corrupt message

This is testing https://lite.hushpool.is with

nginx stopped

Error creating a wallet
Error: transport error: error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061)

hushd stopped

Error creating a wallet
Error: grpc-status: Unknown, grpc-message: "error requesting block: Post \"http://127.0.0.1:18031\": dial tcp 127.0.0.1:18031: connect: connection refused"

lightwalletd stopped

Error creating a wallet
Error: grpc-status: Internal, grpc-message: "Unexpected compression flag: 60"
@duke Took me some time to get enviroment setup for building, but was able to get dev to build. I get these errors. Wallet will just close after and keeps using same selected server. Received this error when using https://lite.nyami.org or any random domain not running a light server. ``` Error creating a wallet Error: No such host is known. (os error 11001) ``` Received this error when using https://poop.granitefone.me:9067 ``` Error creating a wallet Error: transport error: error trying to connect: received corrupt message ``` This is testing https://lite.hushpool.is with nginx stopped ``` Error creating a wallet Error: transport error: error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061) ``` hushd stopped ``` Error creating a wallet Error: grpc-status: Unknown, grpc-message: "error requesting block: Post \"http://127.0.0.1:18031\": dial tcp 127.0.0.1:18031: connect: connection refused" ``` lightwalletd stopped ``` Error creating a wallet Error: grpc-status: Internal, grpc-message: "Unexpected compression flag: 60" ```
Poster
Owner

@fekt thanks for all this data. It seems that our exception catching doesn't work correctly on Windows or we need to add it to more places

@fekt thanks for all this data. It seems that our exception catching doesn't work correctly on Windows or we need to add it to more places
duke commented 1 year ago
Poster
Owner

This bug is very related to #119 that @onryo and me are working on and this issue was created when the code was drastically different (both SDL and lightwalletd) so closing this so we can make new issues related to the latest code

This bug is very related to #119 that @onryo and me are working on and this issue was created when the code was drastically different (both SDL and lightwalletd) so closing this so we can make new issues related to the latest code
duke closed this issue 1 year ago
onryo added the
windows
label 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.