btcpayserver / app

MIT License
5 stars 1 forks source link

Refresh the state when creating a new store #42

Closed pavlenex closed 1 month ago

pavlenex commented 2 months ago

When a new store is created on the app, we don't refresh the state, we do generate keypad, etc. But user manually needs to refresh the page

Before the manual refresh

Screenshot 2024-06-19 at 12 39 42

After the manual refresh

Screenshot 2024-06-19 at 12 40 52

Problem is a manual action is required to start using the app.

dennisreimann commented 1 month ago

I think we can close this now.

pavlenex commented 1 month ago

I did everythign on the app, created a store, registered the user, and then saw this one I logged in.

Screenshot 2024-07-12 at 16 34 07

@dennisreimann This is still the issue for me on https://github.com/btcpayserver/app/commit/85643b8b2ecb22126bf83eff7f0f195e5d755126

pavlenex commented 1 month ago

Ok I figured it out and I can pretty confidently replicate it, when entire db is nuked, and when there's that welcome page, you click continue, create a user and a store and then the state is not refreshed.

There's also something else though, but a separate issue, but in same scenario when there's no admin on the server side and user registers we get

Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.
 ---> System.Security.Cryptography.CryptographicException: The key {fcf6f5b8-ed38-4694-a36b-835d29e56aca} was not found in the key ring. For more information go to https://aka.ms/aspnet/dataprotectionwarning
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)
info: PayServer:      New user test@test.com registered
info: PayServer:      User test@test.com logged in
info: BTCPayServer.Controllers.BTCPayAppHub: Getting best block
info: BTCPayServer.Controllers.BTCPayAppHub: Getting best block done
dennisreimann commented 1 month ago

Hmm, I cannot replicate this. Can you check what this section in the settings contains for you when you run into this?

grafik