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

Qr sync fails #72

Closed
2 tasks done
Groonir opened this issue Oct 27, 2023 · 9 comments
Closed
2 tasks done

Qr sync fails #72

Groonir opened this issue Oct 27, 2023 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Groonir
Copy link

Groonir commented Oct 27, 2023

Bug description

Get an error when hosting from desktop and having phone connect to its local hotspot. It happens as soon as the phone scans the QR code

Expected outcome

Passwords update

Steps to reproduce

Create desktop hotspot
Connect with phone
Host on desktop
Scan QR code with phone
Profit??

Error log

For desktop

Hosting... done. 
Listening... done.
Sending service info... done.
Receiving hello... done.
Client supports 2.0.0+ synchronization. Starting 2.0.0+ synchronization server... done.
Sending 2.0.0+ synchronization server address... 
Local exception has occurred: Remote disconnected unexpectedly.
Local exception has occurred: Synchronization requested to close while connected.

For phone

Connecting... done.
Receiving service info... done.
Host supports 2.0.0+ synchronization. Sending 2.0.0+ hello... done.
Receiving 2.0.0+ server address... done.
Connecting... done.
Receiving users list... done.
Processing next user... done.
Authenticating... done.
Failed to authenticate. Receiving shared entries... 
Local exception has occurred: Remote disconnected unexpectedly.
Local exception has occurred: 2.0.0+ synchronization host error:
{"error":{"type":"Stale auth","date":"2023-10-27T13:48:32.992307Z","description":"Packet took too long to reach its destination, please check your network conditions"}}

App version

v1.6.0 - Markdown Notes

Submission checklist

  • I have specified the problem in the issue title
  • I have provided a verbose description of the problem
@Groonir Groonir added the bug Something isn't working label Oct 27, 2023
@GleammerRay
Copy link
Collaborator

GleammerRay commented Oct 27, 2023

Hello @Groonir !

This isn't a problem related to hotspot connection, as it seems as though the client and host are able to communicate properly.

Stale auth means that either it took too long for the authentication packet to arrive or might also be caused by your device time being set to a wrong value. It is important to note that there must be a significant time difference (5 seconds) for this to occur.

Have you tried synchronizing without using hotspot? I would expect it doesn't work that way either. More importantly, do your phone and computer device times and time zones co-align? This might have an impact on the authentication process.

Thank you for your report.

@Groonir
Copy link
Author

Groonir commented Oct 27, 2023

Thanks for the swift reply!
I tried with using the wifi network but they just time out. Maybe this happens due to the computer being connected by an ethernet cable?
Time zones are the same on both devices

Edit: also, the time between the qr scan and error is less than a second

Edit 2: tried it on wifi and got the following error on my phone:

Connecting... 
Local exception has occurred: Failed to connect.
SocketException: Connection timed out, host: InternetAddress('10.3.18.31', IPv4), port: 51440
#0      _NativeSocket.connect.<anonymous closure>.<anonymous closure> (dart:io-patch/socket_patch.dart:975)
#1      _RootZone.run (dart:async/zone.dart:1655)
#2      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:882)
#3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18)
#4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398)
#5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429)
#6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)

@GleammerRay
Copy link
Collaborator

10.3.18.31 does not look like the actual network IP address, unless you are sure that it is. Looks like Passy might failing to access host's networking. Are you sure that your firewall rules allow Passy to communicate fully (both private and public networks)? If you're on Windows, please try this - https://www.minitool.com/news/how-to-allow-a-program-through-firewall-windows-10.html, and see if you can synchronize via Wi-Fi then, after restarting Passy.

@Groonir Groonir closed this as completed Oct 27, 2023
@Groonir Groonir reopened this Oct 27, 2023
@Groonir
Copy link
Author

Groonir commented Oct 27, 2023

^ misclick

I have followed the article and passy was allowed in public networks and not private ones. I allowed in private also and tried again and still i get this error on my tablet:

Connecting... 
Local exception has occurred: Failed to connect.
SocketException: Connection timed out, host: InternetAddress('10.7.18.174', IPv4), port: 53220
#0      _NativeSocket.connect.<anonymous closure>.<anonymous closure> (dart:io-patch/socket_patch.dart:975)
#1      _RootZone.run (dart:async/zone.dart:1655)
#2      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:882)
#3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18)
#4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398)
#5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429)
#6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)

btw i have a vpn on all my devices but i set it to bypass passy or disabled it when trying to sync even if i think it shouldnt interfere

@GleammerRay
Copy link
Collaborator

How odd. Still, 10.7.18.174 is not a traditional format of a local IP address. The VPN you are using might be creating a local network to route all connections through, which would explain it.

@GleammerRay
Copy link
Collaborator

I apologize for being unable to assist you with setting up synchronization for Passy. In the next release, Passy dedicated synchronization server will be included (already implemented on the dev branch). With that, you will be able to manually set the IP address on both server and client. If you are interested, I can notify you when this feature has been released.

@Groonir
Copy link
Author

Groonir commented Oct 27, 2023

Thank you for trying! There is no need for that as i get your app from f-droid but thanks for asking!

@Groonir
Copy link
Author

Groonir commented Oct 30, 2023

Found the solution!

My vpn disables lan traffic by default. Enabled it and everything started working!

@Groonir Groonir closed this as completed Oct 30, 2023
@GleammerRay
Copy link
Collaborator

Sweet! Hope you enjoy the password manager.

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

2 participants