Skip to content

Conversation

bznein
Copy link
Collaborator

@bznein bznein commented Sep 29, 2025

To avoid spurious failures when the servewallet takes more times to be ready, we increase the timeout but also we log how long a successful connection took, in order to help keep track of it.

Looking at one execution, we were very close to the timeout limit so it does make sense that we had intermittent failures.

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

@bznein bznein requested a review from thisconnect September 29, 2025 09:15
await page.goto(`http://${host}:${frontendPort}`);
const elapsed = Date.now() - start;
console.log(`Connected to servewallet on ${host}:${servewalletPort} after ${elapsed} ms`);
;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually added it on purpose :) I think keeping track of it can help us make sure that the value we use is "reasonable". WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(unless you meant the extra ; that I mistakenly added and removed now :D)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha yes I meant only the extra ;


}
}
throw new Error(`Timeout exceeded waiting for servewallet on ${host}:${servewalletPort}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timeout in the CI errored on this line, I wonder if we shouldn't put the timeout elapsed message before this line instead of in the while loop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean, in the while we look a successful connection, here we return an error. What do you suggest we change here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oups I didn't read it properly sorry, I looked at the new message that contains elapsed time, but expected it to be a fail error message.

all good from my side 😇

@bznein bznein requested a review from thisconnect September 29, 2025 09:51
To avoid spurious failures when the servewallet takes more times to be
ready, we increase the timeout but also we log how long a successful
connection took, in order to help keep track of it.
Copy link
Collaborator

@thisconnect thisconnect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untested LGTM

@bznein bznein merged commit ffd7b86 into BitBoxSwiss:master Sep 29, 2025
11 checks passed
@bznein bznein deleted the servewalletTimeout branch September 29, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants