Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device linking reliability #100

Open
jeffgca opened this issue Dec 7, 2022 · 5 comments
Open

Device linking reliability #100

jeffgca opened this issue Dec 7, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@jeffgca
Copy link
Contributor

jeffgca commented Dec 7, 2022

I've done some testing of device linking and it is uh reliably unreliable; in numerous tests with various browsers / OS, device linking stalls:

  1. in browser A, open the devtools and network tab and filter by 'WS'. Notice there seems to be 2 connections? Click on one connection to view the messages
  2. in browser A, click on "connect an additional device", then copy the url
  3. in browser B, paste and go to the url, then open the devtools / network tab and filter by 'WS'.

What happens:

  • while the numeric code will likely appear in browser B, the code entry field never appears in browser A
  • If you look at the WS connection in browser A, you see binary messages being received that decode to something like this:
{
"iv":"aODILVs2hrs6aCaSEgbP+g==",
"msg":"Rss0HEgjpecVMPpbvUBu4rvsUetzSvCfDZNhzozXQpjBFkvBMEUYbx9OpRnPmsv0HrWGDxczg7U7FMJaH8bJSMdidj9t+Srt25jsq3R7n51xyMCi7pfQORzRZoP+SI63cP65J4/6ZNi4iBzQTedod6nw9An09VDOfzkoo1Nw26RaE7Iupepa6/LzaOU6O+cebD6wm3+SMwBVvgxnw3S3uokJwV2uVs0f7lsxkKhjGc9/7hyNx+HdnQOBkXJi7duq5ybRAMFvKa6TUBzYqDlxKrRU7eHOkh9oV6JvgXtn5tZfjUehtgHxbPX+5D0hxGSfgGZVs6rwHflGE5uXwhEd0SBpyb5ch8KpQgJW/SPsi2fPYE9klErz0iisDOCI92OvOL0P+0ta0RXhnmI4R7xOqiTqUyjD+Ogw/8zOEnMZkYiOOjvKe34eJ5DIU5TSQ6d3RlnRtxfJPsFyghIEFHtg2QBEmmG4XJeyH6btPECGNbjFIlrokCLFAPRJq0J5POOwqw011eOxYepOsFpjbu7IZMFUSzxbPllVxej+AVzfKgHc7GtK27B8Io++Y41fgRiIbqMh7CcuMfHCp8WaGdxqVqUwjqLweTWrjYZjI38="}

When the browsers are in this state, I have seen it start working after refreshing browser A, but this is not reliable.

In a successful device linking session I see WS messages being sent from browser A in response to browser B, but this never happens on the first attempt to link.

@jeffgca
Copy link
Contributor Author

jeffgca commented Dec 7, 2022

As a first step on this issue - we should deploy and test with versions of WAT etc and webnative 0.34, not the currently deployed version. No use in trying to fix a bug that's already fixed.

@icidasset
Copy link
Contributor

Andy fixed this issue in the 0.35 branch
The issue was indeed that the connection was opened multiple times.

@bgins
Copy link
Member

bgins commented Dec 12, 2022

I've attempted a reproduction in https://github.com/fission-codes/aol-demo/tree/upgrade-webnative-0.35.0 to gather more information from a second app.

The issue was not reproducible on a couple of attempts linking between desktop browsers including:

  • Chrome -> Safari
  • Chrome -> Firefox container

There were however issues linking from Desktop Firefox to Chrome on iOS. The symptoms are a bit different. Using chrome://inspect logging, the following is logged:

chrome-inspect

These messages are logged here: https://github.com/fission-codes/webnative/blob/3bd09cdd70d24d6df32cf9630d6565b9b2beff5b/src/components/auth/channel.ts#L53-L87

It seems like this should make more than just two attempts.

@bgins
Copy link
Member

bgins commented Dec 13, 2022

Safari iOS has a similar issue as Chrome on iOS.

Starting the linking process there while debugging in macOS Safari shows the following output:

safari

As with Chrome on iOS, we are only making two attempts.

@bgins
Copy link
Member

bgins commented Dec 14, 2022

The Chrome on iOS and Safari iOS issues with retries described above are fixed in oddsdk/ts-odd#446.

@jeffgca jeffgca added the bug Something isn't working label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants