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

Getting log-out of sites after closing brave. #22494

Closed
KavyanshJain opened this issue Apr 22, 2022 · 17 comments
Closed

Getting log-out of sites after closing brave. #22494

KavyanshJain opened this issue Apr 22, 2022 · 17 comments

Comments

@KavyanshJain
Copy link

Description

Just 2 days ago I deleted my browser history (after 3 months) and I also deleted sites login data and cookies so I got logout as usual. But then I signed in back to them and they work perfectly but after I exit from the browser and reopen it the sites are again logout except google and facebook. All sites other than google and facebook are constantly loggin me out when I exit.

You can also check my settings
image

image

image

all essential settings are on for this but still the problem is there

Actual result:

The sites are continuing to logging out when I close the browser (except google and facebook)

Expected result:

They should be logged in when I reopen browser like they were supposed to usually.

Brave version (brave://version info)

Version 1.37.116 Chromium: 100.0.4896.127 (64-bit)

Version/Channel Information:

  • Can you reproduce this issue with the current release?
    Yes
  • Can you reproduce this issue with the beta channel?
    don't know
  • Can you reproduce this issue with the nightly channel?
    don't know
@rebron
Copy link
Collaborator

rebron commented Apr 22, 2022

cc: @goodov
duplicate of #22493?

@KavyanshJain
Copy link
Author

cc: @goodov duplicate of #22493?

In my case it is happening after closing the whole browser, and it is also happening for some sites like discord whatsapp etc.
And I have turned off the setting for deleting cookies on exiting browser.

@goodov
Copy link
Member

goodov commented Apr 22, 2022

cc: @goodov
duplicate of #22493?

It's possible, but I don't see that "Clear cookies and site data when you close all windows" is enabled.

@KavyanshJain can you check that you don't have anything stored in these sections?
image

Can you also check if disabling "Enable First Party Ephemeral Storage" on brave://flags fixes the issue? If yes, does it break again if you restore it into "Default" state?

@KavyanshJain
Copy link
Author

It's possible, but I don't see that "Clear cookies and site data when you close all windows" is enabled.

That setting is disable already from very long.

@KavyanshJain can you check that you don't have anything stored in these sections? image

You can see that is blank

image

Can you also check if disabling "Enable First Party Ephemeral Storage" on brave://flags fixes the issue? If yes, does it break again if you restore it into "Default" state?

I check enabling that flag but it dosn't help in the case.

@goodov
Copy link
Member

goodov commented Apr 22, 2022

I check enabling that flag but it dosn't help in the case.

what about disabling?

@KavyanshJain
Copy link
Author

what about disabling?

I tried it and not effective at all.

@goodov
Copy link
Member

goodov commented Apr 22, 2022

To help us debug the issue can you please try these things:

  1. Disable/check shields on websites that are logging-out, maybe there are some non-default options.
  2. Create new profile and check if it works.
  3. Reboot machine (if not yet). Will help rule-out OS-related issues.
  4. Add website-specific rule to "Sites that can always use cookies" and check if it helps.

Maybe we can figure out what's happening. Thanks!

@KavyanshJain
Copy link
Author

I have tried all the ways you tell here are the results

  1. Disable/check shields on websites that are logging-out, maybe there are some non-default options.

I disable the sheilds for the fews sites which having the problem and problem still exist.

  1. Reboot machine (if not yet). Will help rule-out OS-related issues.

I tried it earlier but it no solution came

  1. Add website-specific rule to "Sites that can always use cookies" and check if it helps.

The sites were automatically added to the list after turning sheild off and it was non effective.

  1. Create new profile and check if it works.

I make a new profile and login to the sites and bingo everything is working fine like they should be. I have exit and reopen browser completely many times and it is working.

So I think the problem is in my current profile, is there any way to repair my corrupt profile I don't want to remove it.

@goodov
Copy link
Member

goodov commented Apr 22, 2022

So I think the problem is in my current profile, is there any way to repair my corrupt profile I don't want to remove it.

You can try to reset Cookies and LocalStorage database files in the existing profile, but I cannot guarantee that it will help:

  1. Open brave://version/, locate Profile Path and open this folder in Explorer.
  2. Close browser.
  3. Remove Local Storage folder.
  4. Go to Network folder and remove Cookies file along with Cookies-journal if it exists.

This will effectively remove all Cookies and LocalStorage data, but you're doing this to fix these files in case they are corrupted.

@KavyanshJain
Copy link
Author

You can try to reset Cookies and LocalStorage database files in the existing profile, but I cannot guarantee that it will help:

  1. Open brave://version/, locate Profile Path and open this folder in Explorer.
  2. Close browser.
  3. Remove Local Storage folder.
  4. Go to Network folder and remove Cookies file along with Cookies-journal if it exists.

This will effectively remove all Cookies and LocalStorage data, but you're doing this to fix these files in case they are corrupted.

I would like give it a try but this will not going to crash anything or deleting my BAT, My wallet is not verified yet.

@goodov
Copy link
Member

goodov commented Apr 22, 2022

I would like give it a try but this will not going to crash anything or deleting my BAT, My wallet is not verified yet.

It shouldn't, but you can backup the whole Profile Path directory somewhere to be safe.

@KavyanshJain
Copy link
Author

Thanks a lot man you save my day. The problem is solved and everything is now fine as usual and BATs are also safe.

Thanks for this help @goodov

@KavyanshJain
Copy link
Author

I got the same problem again but the earlier solution just work fine and eveything is normal.

But I want to know how is my profile is corrupted again, I am curious about it so I can avoid it later if it can happen again

@goodov
Copy link
Member

goodov commented Oct 28, 2022

But I want to know how is my profile is corrupted again, I am curious about it so I can avoid it later if it can happen again

Most likely it's either file corruption or OSCrypt issues. OSCrypt issues are closely related to Windows updates and Windows password changes. For ex., if your OS password was changed remotely or from another local account, the browser may fail to decrypt the cookies database. These are some edge cases of OSCrypt that we cannot control.

I assume your profile works now, so if you hit this problem again, don't fix it right away. First please open brave://histograms, save it (Ctrl+S) and attach here. Maybe we'll find something interesting.

@KavyanshJain
Copy link
Author

Histograms.zip
This is the histograms file that you asked.

@goodov
Copy link
Member

goodov commented Oct 28, 2022

I see an OSCrypt decryption error:

- Histogram: OSCrypt.Win.Decrypt.Result recorded 2 samples, mean = 0.5 (flags = 0x41) [[#](chrome://histograms/#OSCrypt.Win.Decrypt.Result)]
// this line means there was 1 event with a failure.
0  -O                                                                        (1 = 50.0%)

This means Windows cannot decrypt the shared key that was previously encrypted by Windows. I wrote in the previous message why this can happen, but there might be another cases when it just fails to work for some reason.

It's possible to fully disable encryption, but this is dangerous as it will store cookies and passwords in a clear text on the disk. Please read carefully and try to understand the consequences this may lead to.

@KavyanshJain
Copy link
Author

So this makes sense for the failure in my profile. The decrypt process failure was the reason.
I also think disabling the encryption is also not a good idea like you told.
That's great at least I could find the reson for the profile corruption thanks once again man for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants