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

[Self hosted] When i scan the code nothing happens #22

Closed
VozDeOuro opened this issue Nov 30, 2022 · 22 comments · Fixed by #27
Closed

[Self hosted] When i scan the code nothing happens #22

VozDeOuro opened this issue Nov 30, 2022 · 22 comments · Fixed by #27

Comments

@VozDeOuro
Copy link

No description provided.

@guyzyl
Copy link
Owner

guyzyl commented Nov 30, 2022

Can you provide more context on the issue? Do you see any errors in the console?

@VozDeOuro
Copy link
Author

sorry my fault
the only thing that appears on the terminal is this
image
i just remove some tokens

@guyzyl
Copy link
Owner

guyzyl commented Nov 30, 2022

I think I know what the issue is.
There's an issue where in some cases the web socket gets reconnected, and then your WhatsApp session in the backend isn't linked to the correct WS.
I was planning on deprecating the WS approach as it contains a lot of bugs, and replacing it with web hooks.
I'll try to get around to it soon and fix the underlying issue.

In the meantime, usually clearing browser cache and refreshing the page will solve the issue.

@VozDeOuro
Copy link
Author

ok thx
i tried with 3 different browsers none of them work :|
on the mobile its keep trying read the QR code with no success

@guyzyl
Copy link
Owner

guyzyl commented Nov 30, 2022

That sucks, I'll try to get it fixed during the weekend.

@VozDeOuro
Copy link
Author

thx :)

@VozDeOuro
Copy link
Author

hey :)
did you manage to take a look ?

@guyzyl
Copy link
Owner

guyzyl commented Dec 6, 2022

Sorry, but not yet (but haven't forgotten about it).
Hopefully sometime this week/end.

@guyzyl
Copy link
Owner

guyzyl commented Dec 9, 2022

@VozDeOuro I just merged a PR (#27) which should fix this bug, can you confirm it works for you now?

@guyzyl guyzyl reopened this Dec 9, 2022
@VozDeOuro
Copy link
Author

hey :)
the problems keep happening here is a screenshot from the cellphone perspective, i try to scan it but nothing happens
the qrcode was blurry by myself
image

@Sarveshmrao
Copy link

I had this issue just now, and I solved it by just changing the background colour of the page. It worked!
image
To some colour like above.

@guyzyl
Copy link
Owner

guyzyl commented Dec 11, 2022

@Sarveshmrao can you elaborate on what you did? To me it seems like something else caused it to function correctly.

@VozDeOuro Just so I'm sure I understood correctly, which one of these happened to you?:

  • You weren't able to scan the QR with WhatsApp - you opened the WhatsApp scanner and nothing happened
  • You were able to scan the QR with WhatsApp, and the app didn't continue to the next screen

@Sarveshmrao
Copy link

@Sarveshmrao can you elaborate on what you did? To me it seems like something else caused it to function correctly.

@VozDeOuro Just so I'm sure I understood correctly, which one of these happened to you?:

  • You weren't able to scan the QR with WhatsApp - you opened the WhatsApp scanner and nothing happened
  • You were able to scan the QR with WhatsApp, and the app didn't continue to the next screen

Hey @guyzyl
I was not able to scan the code in WhatsApp or a normal QR Code Scanner. Hence I changed the background and the next second it scanned and logged me in and took me to the Google Auth step.

I'm self hosting both Backend and Frontend FYI.

@VozDeOuro
Copy link
Author

@Sarveshmrao can you elaborate on what you did? To me it seems like something else caused it to function correctly.

@VozDeOuro Just so I'm sure I understood correctly, which one of these happened to you?:

  • You weren't able to scan the QR with WhatsApp - you opened the WhatsApp scanner and nothing happened
  • You were able to scan the QR with WhatsApp, and the app didn't continue to the next screen

I open the WhatsApp and it's look like I'm scanning nothing, because nothing happens

I will try that trick to change the background color

@guyzyl
Copy link
Owner

guyzyl commented Dec 11, 2022

@Sarveshmrao that's a very interesting solution!

Can one of you please test if adding a border to the QR fixes the issue? I'm not able to replicate it with my phone.
You can do it by adding the following block:

canvas {
    border-width: 10px;
    border-color: white;
}

@Sarveshmrao
Copy link

@Sarveshmrao that's a very interesting solution!

Can one of you please test if adding a border to the QR fixes the issue? I'm not able to replicate it with my phone.
You can do it by adding the following block:

canvas {
    border-width: 10px;
    border-color: white;
}

Don't add a border white. Add anything else other than black and white, as those are the colors in which the QR is generated.

@guyzyl
Copy link
Owner

guyzyl commented Dec 11, 2022

@Sarveshmrao that's a very interesting solution!
Can one of you please test if adding a border to the QR fixes the issue? I'm not able to replicate it with my phone.
You can do it by adding the following block:

canvas {
    border-width: 10px;
    border-color: white;
}

Don't add a border white. Add anything else other than black and white, as those are the colors in which the QR is generated.

Good point.
Does adding a border colored at rgb(87, 13, 248) fix the issue? (that's the primary color of DaisyUI)
Try a width of 5px so it's not too overpowering.

@VozDeOuro
Copy link
Author

thats fixed it so the problem was with the border :)
you can close this issue if you want.

and thx for you help

@guyzyl guyzyl closed this as completed in bc319ef Dec 12, 2022
guyzyl added a commit that referenced this issue Dec 12, 2022
Add border to WA QR code, fixes #22
@guyzyl
Copy link
Owner

guyzyl commented Dec 12, 2022

@VozDeOuro Just merged the fix and closed the issue.
Thanks for reporting this bug and testing out the solution :)

@guyzyl
Copy link
Owner

guyzyl commented Dec 12, 2022

@VozDeOuro Sorry for bugging you, but do you mind checking the version that is now on main?
I tested the purple border with my phone and it didn't work.
I now changed the border color to white, and want to make sure it does the job for everyone.

@Sarveshmrao
Copy link

@VozDeOuro Sorry for bugging you, but do you mind checking the version that is now on main? I tested the purple border with my phone and it didn't work. I now changed the border color to white, and want to make sure it does the job for everyone.

Just checked out the new version. Yes, it works!

@guyzyl
Copy link
Owner

guyzyl commented Dec 12, 2022

@Sarveshmrao thanks!!!
We can leave this issue behind now :)

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 a pull request may close this issue.

3 participants