iTwin / auth-clients

MIT License
6 stars 3 forks source link

`@itwin/oidc-signin-tool` password is not always filled in #224

Closed johnnyd710 closed 7 months ago

johnnyd710 commented 7 months ago

Sometimes (not all the time) in our MacOS Github Action, the password is not filled out in the sign-in form using @itwin/oidc-signin-tool with our Electron application. I was able to catch a video of it after a few attempts. In the third second of the video you will see "Please fill out this field." and the password is not filled in, I attached a screenshot of the moment.

image

https://github.com/iTwin/auth-clients/assets/19596966/a9dbd2c2-bbd0-44a4-853a-f349541cf578

Reach out to me if you have any questions.

MichaelBelousov commented 7 months ago

@johnnyd710 can you get an html dump before the password field is queried to be filled, if you can already get this screen recording?

johnnyd710 commented 7 months ago

I patched the oidc-signin-tools package to take a screenshot and dump the html to a file right before we enter the password. Problem is, I can't reproduce anymore after 4 attempts.

Its possible there is a race condition, and the time it takes to take the screenshot and dump the html to a file fixes the problem.

MichaelBelousov commented 7 months ago

4 attempts doesn't seem like enough based on what I know about our CI... but yes the HTML probably hurts the odds, perhaps significantly... can you make the CI try it on loop more times?

johnnyd710 commented 7 months ago

I think replacing the .type calls with .fill helped, my CI keeps failing for other reasons so its hard to be sure, but I haven't seen the error in a few runs with repeatEach set to 5