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

"Change currency" in the donation page does not work #11400

Open
hhu94 opened this issue Aug 18, 2022 · 10 comments
Open

"Change currency" in the donation page does not work #11400

hhu94 opened this issue Aug 18, 2022 · 10 comments
Labels
bug can't reproduce Needs steps to reproduce

Comments

@hhu94
Copy link

hhu94 commented Aug 18, 2022

When I try to change the currency from DKK to USD it does not work, it stays as DKK.

image

@benediktwerner
Copy link
Member

Does the page reload once you select USD? It should contain currency=USD in the URL after you select it. Do you see any errors in the browser console? (usually F12 to open) Which browser and OS?

@yafred
Copy link
Contributor

yafred commented Aug 20, 2022

I saw the problem when @hhu94 reported it, but now it's working ...

I don't see any commits to the code though ... 🤔

@hhu94
Copy link
Author

hhu94 commented Aug 21, 2022

I'm using Windows 11 OS Build 22000.856 and Microsoft Edge version 104.0.1293.63.

It still does not work for me. The page does reload but the URL never contains currency=USD.

The console shows the below errors:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
lichess.min.js:36 Lichess is open source! https://lichess.org/source
js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2 
        
       Refused to execute inline script because it violates the following Content Security Policy directive: "script-src https://*.paypal.com https://*.stripe.com 'nonce-4rIgC1CN5AbHi9odhqV9P452' 'self' lichess1.org". Either the 'unsafe-inline' keyword, a hash ('sha256-YPQEktmczDdInuprG6bexCvqCMOlpn8BfJrMgjZRNLY='), or a nonce ('nonce-...') is required to enable inline execution.

Pn @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
e.try @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
Ue @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&currency=DKK&locale=en_US:2
js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2 
        
       Refused to execute inline script because it violates the following Content Security Policy directive: "script-src https://*.paypal.com https://*.stripe.com 'nonce-4rIgC1CN5AbHi9odhqV9P452' 'self' lichess1.org". Either the 'unsafe-inline' keyword, a hash ('sha256-YPQEktmczDdInuprG6bexCvqCMOlpn8BfJrMgjZRNLY='), or a nonce ('nonce-...') is required to enable inline execution.

Pn @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
e.try @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
Ue @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.dispatch @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
n.resolve @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
(anonymous) @ js?client-id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=true&intent=subscription&currency=DKK&locale=en_US:2
pptm.js?id=lichess.org&t=xo&v=5.0.330&source=payments_sdk&client_id=AbvqvIWE9Cl9TuGtedhujmHoFOFJi70Ri9diXF0g7COcCZKzQ4IJ8E7wqq83tqLWa0uqzrM8uy3aYAok&vault=false:1 
        
       Refused to load the script 'https://www.paypalobjects.com/muse/muse.js' because it violates the following Content Security Policy directive: "script-src https://*.paypal.com https://*.stripe.com 'nonce-4rIgC1CN5AbHi9odhqV9P452' 'self' lichess1.org". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

@benediktwerner
Copy link
Member

Can't reproduce. Those errors above are expected. It's just PayPal analytics getting blocked. One person that had the same issue reported it was fixed in incognito mode so chances are it's an extension causing this. Make sure it still doesn't work in incognito, a fresh browser, or when disabling all extensions.

@almunteanu
Copy link

almunteanu commented Aug 25, 2022

Update: for me, it reproduces even with a new, up-to-date, clean instance of Chrome in incognito mode.
It looks like when selecting a different currency (EUR in my case), it's making a GET request to /list?currency=EUR&freq=monthly&dest=me, receives a status code 303 with the redirect location being /patron, does the redirect, but doesn't update the currency.

@yafred
Copy link
Contributor

yafred commented Aug 25, 2022

@almunteanu can you open the Chrome developer view - network activity (only doc) before you try to change the currency.

Here is what I see when I am on https://lichess.org/patron (my default currency is Euro) and I change the currency to British Pounds

patron network

The result is that I am redirected to https://lichess.org/patron/list?currency=GBP&freq=monthly&dest=me and the amounts are now shown in British Pounds

When this issue was open I tried on Firefox and I did see the behaviour you describe. If I remember well the network view was showing that both /patron and list?currency=GBP&freq=monthly&dest=me were fetched with a Race Cache With Network.

@almunteanu
Copy link

almunteanu commented Aug 26, 2022

@yafred This is what I get:
image

The first item is different from yours. Tried to spend some time to investigate why, but to no avail.


Edit: I managed to get it working. I clicked on the 'Credit Card' button, which redirected me to the Stripe checkout, then went back to lichess and tried again to select a value from the dropdown, and this time it worked, the currency was updated.

Edit 2: Further attempts are also successful. Looks like accessing the checkout once solves the problem once and for all.

@niklasf niklasf added the bug label Aug 31, 2022
@adsche
Copy link

adsche commented Dec 9, 2022

Since this has a not-reproducible label: I am hitting the same issue with Firefox 107.0.1 on macOS 13.0.1. Attached the screenshot of the network requests after selecting the new currency.With the correct query parameters, I am also getting the 303 redirect to patron without query parameters. I disabled cache for this.

Anything I can further do to help debug this? I have not yet tried the workaround (going to checkout first) in case I can help better like this.

Screenshot 2022-12-09 at 09 14 08

@HaonRekcef
Copy link

I had the same problem, changing currency does not work. However once you pressed the donate button once and go to checkout and return it appears to be working. Tested on the Version 120.0.1 of Firefox and Version 120.0.xxx of Chrome

@rodtell
Copy link

rodtell commented Jan 21, 2024

I am having the same problem.
Steps:

  1. Login
  2. Go to Donation page
  3. Click on change currency (in my case BRL)
  4. It does not work

What it should do:
Change currency
What happens:
It looks like it is in a loop that keeps reset into default USD.

Tested in Firefox 121.0.1 Fedora Linux 39. I have all extensions disabled, and set Normal protection into tracking and also standard setup DNS over HTTPS. No results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug can't reproduce Needs steps to reproduce
Projects
None yet
Development

No branches or pull requests

8 participants