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

[Bug]: QR Code Unscannable in dark mode on Samsung Internet browser #5860

Open
1 task done
leesalminen opened this issue Mar 23, 2024 · 3 comments
Open
1 task done
Assignees
Milestone

Comments

@leesalminen
Copy link
Contributor

leesalminen commented Mar 23, 2024

What is your BTCPay version?

v1.13.0
1fe766c

How did you deploy BTCPay Server?

Manual

What happened?

When attempting to pay an invoice using Checkout V2 using Samsung Internet browser with dark mode enabled, the SVG QR code is modified by the browser and becomes unscannable.

Screenshot:
Screenshot_20240323_080611_Samsung Internet

How did you encounter this bug?

  1. Create an Invoice
  2. Attempt to pay invoice with Checkout V2 enabled
  3. Cannot scan QR code with any other device

Relevant log output

No response

What browser do you use?

  • Samsung A54 5G (SM-A546E/DS)
  • Android 14
  • One UI 6.0
  • Samsung Internet v23.0.1.1
  • Dark Mode Enabled

Additional information

I found this post on Samsung forums: https://forum.developer.samsung.com/t/websites-dark-mode-gets-overridden-by-samsung-internets-dark-mode/22937/27 . The most recent comment is interesting:

Hello,

I am pleased to share with everyone that from Samsung Internet v24.0.6.15 you can specify the supported color schemes for the page via the color-scheme meta tag or CSS property:
<meta name=”color-scheme” content=”light dark”>

Please check out this [blog 3](https://medium.com/samsung-internet-dev/dark-mode-in-samsung-internet-7d6e974ba09e) for more information.

Additionally, the Samsung Internet team is improving their algorithm to adaptively “respect” the Web developers’ dark colors if defined like above, as per [CSS Color Adjustment Module Level 1 (w3.org) 2](https://www.w3.org/TR/css-color-adjust-1/#color-scheme-prop),
and if not defined, apply the browser’s algorithm. Hopefully, this will provide an enhanced experience to users and also give more options to the developers.

This is a “work in progress” under the same experimental flag, for upcoming versions like 25.0, 26.0, or above to be released later this year.

Sincerely,
Samiul Hossain
Samsung Developer Relations

I tried adding <meta name=”color-scheme” content=”light dark”> to the <head> of Checkout V2, but it did not have any impact on the issue. This is because the latest version of Samsung Internet available for my device is v23.

Are you sure this is a bug report?

  • I confirm this is a bug report
@dennisreimann dennisreimann self-assigned this Mar 25, 2024
@pavlenex pavlenex added this to the 1.13.x milestone Mar 25, 2024
@dennisreimann
Copy link
Member

It's "interesting" how the Samsung Internet browser applies its own dark theme and even overrides the webpage's settings. You can temporarily circumvent this by switching to the Light mode in the browser's setting ­— you'll stiill be able to use our dark mode afterwards and also see the proper colors ;)

I will submit a PR that incorporates the color-scheme meta tag, however, I'm also not able to test itright now because the latest released version of the browser on Android is still v23.

dennisreimann added a commit to dennisreimann/btcpayserver that referenced this issue Mar 25, 2024
@dennisreimann
Copy link
Member

I am pleased to share with everyone that from Samsung Internet v24.0.6.15 you can specify the supported color schemes for the page via the color-scheme meta tag or CSS property:

Checked with v24.0.7.1 and this doesn't seem to be fixed.

dennisreimann added a commit to dennisreimann/btcpayserver that referenced this issue Apr 4, 2024
dennisreimann added a commit to dennisreimann/btcpayserver that referenced this issue Apr 23, 2024
@dennisreimann
Copy link
Member

It still behaved the weird way even with v25 of the browser. According to the ongoing discussion on the forum, Samsung seems to be convinced that managing these preferences manually via the settings if you don't want their proprietary default seems to be the way to go. We cannot help with that.

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