Ajaxy / telegram-tt

Telegram Web A, GPL v3
https://web.telegram.org/a
GNU General Public License v3.0
2.21k stars 467 forks source link

Not staying logged in on Firefox #13

Closed cbix closed 3 years ago

cbix commented 3 years ago

I'm trying to use https://webz.telegram.org/ with Firefox 88.0 on Arch Linux, but whenever the page is refreshed (or restarting the browser), I get logged out and need to enter the login manually again. This issue doesn't occur on Chromium.

elvus commented 3 years ago

Firefox disables storages in private mode, that's why session "expires", application can't save it. If you even reload the page, result will be the same. You can get the same behavior just by turning off the "Keep me signed in" on login.

cbix commented 3 years ago

Thanks for the hint. This is not happening in private mode, also I turned off Tracking Protection and uBlock for webz.telegram.org, but it didn't help.

Or is it using a different domain for session cookies/storage?

Ajaxy commented 3 years ago

This is not happening in private mode

@cbix Do you mean that the browser does save the session in private mode, but does not in regular mode?

cbix commented 3 years ago

No, I mean that I'm not using private mode.

Ajaxy commented 3 years ago

Then the issue seems to be specific to Linux/Firefox. I will try to test it out there.

cbix commented 3 years ago

Btw, I'm getting these exceptions in the browser console, might be related:

Exception { name: "NS_ERROR_FILE_NO_DEVICE_SPACE", message: "", result: 2152857616, filename: "", lineNumber: 0, columnNumber: 0, data: null, stack: "" }
​
columnNumber: 0
​
data: null
​
filename: ""
​
lineNumber: 0
​
message: ""
​
name: "NS_ERROR_FILE_NO_DEVICE_SPACE"
​
result: 2152857616
​
stack: ""
​
<prototype>: ExceptionPrototype { toString: toString(), name: Getter, message: Getter, … }
cacheApi.ts:51:4
[Exception... "File error: No device space"  nsresult: "0x80520010 (NS_ERROR_FILE_NO_DEVICE_SPACE)"  location: "<unknown>"  data: no] 2 0ae3a01bd82a83b2fcd8.worker.js:2:2371
Failed to update session in storage 0ae3a01bd82a83b2fcd8.worker.js:2:154346
QuotaExceededError: The current transaction exceeded its quota limitations. 0ae3a01bd82a83b2fcd8.worker.js:2:154398
Exception { name: "NS_ERROR_FILE_NO_DEVICE_SPACE", message: "", result: 2152857616, filename: "", lineNumber: 0, columnNumber: 0, data: null, stack: "" }
cacheApi.ts:51:4
Ajaxy commented 3 years ago

@cbix Can you please make a screenshot of a console with these errors?

cbix commented 3 years ago

Screenshot from 2021-05-05 18-23-43

cbix commented 3 years ago

Ok, this warning led me to clearing site storage in Firefox for some other domains (the old web.telegram.org still used up 2 GB of data) and after a browser restart this problem went away so now I'm staying logged in.

Weird though that I haven't noticed any problems with other sites using localstorage since ... Closing this for now, maybe telegram-tt could handle these Exceptions in a more user-friendly way, but it's an edge case nonetheless.

Ajaxy commented 3 years ago

Ok, this warning led me to clearing site storage in Firefox for some other domains (the old web.telegram.org still used up 2 GB of data) and after a browser restart this problem went away so now I'm staying logged in.

Weird though that I haven't noticed any problems with other sites using localstorage since ... Closing this for now, maybe telegram-tt could handle these Exceptions in a more user-friendly way, but it's an edge case nonetheless.

This sounds great! Thanks a lot for the information. Yes, we will think about a more user-friendly way to handle that, definitely.