Show UI when the profile folder is not writable

NEW
Unassigned

Status

()

Toolkit
OS.File
4 years ago
2 years ago

People

(Reporter: André Jaenisch, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: .?)

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141113143407

Steps to reproduce:

As long as there is no dedicated ID component I'm filling those against Mozilla Services:General (c.f. bug #1097811 - Bugzilla claims, that there is no content service component).

1. Create a new profile
2. Install Interest Dashboard from addons.mozilla.org
3. Launch it via icon.


Actual results:

The loading image freezes.
JavaScript console yields (I'm trying it from university with limited disk quota).
$HOME is expanded to full path. Values in [] are aligned right.

content is null [tab-events.js:40]
1416318480876	Services.HealthReport.HealthReporter	WARN	Saved state file does not exist.
1416318480877	Services.HealthReport.HealthReporter	WARN	No prefs data found.
Tastenereignis ist in manchen Tastaturlayouts nicht verfügbar: Taste="c" Modifikatoren="accel,alt" [browser.xul]
getPreventDefault() sollte nicht mehr verwendet werden. Verwenden Sie stattdessen defaultPrevented. [dialog.js:2]
gmp-gmpopenh264 (isValid: true, isInstalled: false, isOpenH264: true, hashFunction: sha512, hashValue: 737e49f25aace93d470f1a781c69c3cdd0c9db21afe62221fb171d38a31d8a2b55af01a69cd00e7352e7a34aa450b6b85729509f81582379394785b37997a423, size: 385889) could not be installed. Enable media.gmp-manager.log for details! [GMPInstallManager.jsm:362]
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Tue Nov 18 2014 14:48:02 GMT+0100 (CET)
Full Message: undefined
"Could not write session state file " Object { operation: "open", path: "$HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp", unixErrno: 122, stack: "", fileName: "", lineNumber: 0 } "" [SessionFile.jsm:307]
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Tue Nov 18 2014 14:48:04 GMT+0100 (CET)
Full Message: Unix error 122 during operation open on file $HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp (Disk quota exceeded)
content is null [tab-events.js:40]
"Could not write session state file " Object { operation: "open", path: "$HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp", unixErrno: 122, stack: "", fileName: "", lineNumber: 0 } "" [SessionFile.jsm:307]
content is null [tab-events.js:40]
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Tue Nov 18 2014 14:48:19 GMT+0100 (CET)
Full Message: Unix error 122 during operation open on file $HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp (Disk quota exceeded)
"Could not write session state file " Object { operation: "open", path: "$HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp", unixErrno: 122, stack: "", fileName: "", lineNumber: 0 } "" [SessionFile.jsm:307]
content is null [tab-events.js:40]
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Tue Nov 18 2014 14:48:39 GMT+0100 (CET)
Full Message: Unix error 122 during operation open on file $HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp (Disk quota exceeded)
"Could not write session state file " Object { operation: "open", path: "$HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp", unixErrno: 122, stack: "", fileName: "", lineNumber: 0 } "" [SessionFile.jsm:307]
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create d3.v3.min.js:3
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Tue Nov 18 2014 14:48:54 GMT+0100 (CET)
Full Message: Unix error 122 during operation open on file $HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp (Disk quota exceeded)
"Could not write session state file " Object { operation: "open", path: "$HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp", unixErrno: 122, stack: "", fileName: "", lineNumber: 0 } ""


Expected results:

I expected some toast informing that something unexpected happened.

Updated

4 years ago
Component: General → Interest Dashboard
Product: Mozilla Services → Content Services

Updated

4 years ago
Assignee: nobody → msamuel
QA Contact: kghim

Updated

4 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi Andre, thanks for filing this bug.

Since you're using a new profile, there is no history to show up on your dashboard, which is likely why it looks broken. We're currently working on a better presentation for users with an empty profile.

The errors you're seeing look more like an inability for session restore to function, perhaps because there is either no write permission in your profile directory or you've exceeded your write quota.

Is Firefox still functional after you've installed the addon? Would you be able to share a screenshot of the frozen loading image?

Thanks!
Flags: needinfo?(andre.jaenisch)
Also, would you be able to check if these same errors show up on a fresh profile that doesn't have the Interest Dashboard installed? Thanks!

Updated

4 years ago
Summary: [Interest Dashboard] falls silently on running out of disk space → Fails silently on running out of disk space
(Reporter)

Comment 3

4 years ago
(In reply to Marina Samuel [:emtwo] from comment #1)
> Hi Andre, thanks for filing this bug.
> 
> Since you're using a new profile, there is no history to show up on your
> dashboard, which is likely why it looks broken. We're currently working on a
> better presentation for users with an empty profile.
> 
> The errors you're seeing look more like an inability for session restore to
> function, perhaps because there is either no write permission in your
> profile directory or you've exceeded your write quota.
> 
> Is Firefox still functional after you've installed the addon? Would you be
> able to share a screenshot of the frozen loading image?
> 
> Thanks!

I've exceeded disk quota, see "Full Message: Unix error 122 during operation open on file $HOME/.mozilla/firefox/z8hjc2hu.Entwicklung/sessionstore-backups/recovery.js.tmp (Disk quota exceeded)"

I can browse further, but no longer save anything or download something. Cookies work. Screenshots in next comments.
Flags: needinfo?(andre.jaenisch)
(Reporter)

Comment 4

4 years ago
Created attachment 8525276 [details]
Disk-Quota-Exceeded-from-2014-11-19_console-dump.txt

A console dump for a new profile with disk quota exceeded but without Interest Dashboard installed.
(Reporter)

Comment 5

4 years ago
Created attachment 8525278 [details]
Working-ID-Screenshot-from-2014-11-19_12:50:02GMT+1.png

A one days old profile showing some data.
(Reporter)

Comment 6

4 years ago
Created attachment 8525280 [details]
Failing-ID-Screenshot-from-2014-11-19_13:00:45GMT+1.png

Failing first start of Interest Dashboard.
Probably because of disk quota exceeded.
Hi Mike, I'm wondering if you've ever come across a bug "disk quota exceeded" when running Firefox. See attachment in comment 4. Initially it looked like it might be Interest Dashboard related, but sounds like Andre is seeing this even without the dashboard.

Any idea if this is a bug or expected behaviour? Thanks!
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(mconley)
So, just to summarize my understanding here - Andre's profile directory is on a machine for which he has a fixed limit on how much he can store, and it sounds like he's hit that limit.

Yeah, that's going to be a bad time - we don't have a lot of great error handling for that case; at least, we don't expose any UI to help get the user out of this situation. It's pretty uncommon.

Most software, including your operating system, is going to start acting strangely when it can no longer write to disk. Andre, I recommend clearing out some space in your $HOME directory.

Assuming your on a UNIX-like system (and the $HOME directory suggests you are), try this command:

du -h $HOME | sort -n

That's going to spew out a list of files and folders and attempt to order them by size (I hope it's intelligent enough to realize that GB > MB, but I'm not entirely sure - it might be strictly alphabetic sorting - sorry about that).

Find the big culprits and see if there's anything you can get rid of. Once you clear some of your quota and have some disk-writing headroom, things should probably start working properly again.
Flags: needinfo?(mconley)
(Reporter)

Comment 9

4 years ago
Hello, Mike,

yes, it's a Debian. I can reproduce the error on intention.

Don't worry, I can easily get rid of caches etc.

To improve your command, do this:

$ du -h $HOME | sort -h

Difference according to manpage:
-h, --human-numeric-sort
   compare human readable numbers (e.g., 2K 1G)
-n, --numeric-sort
   compare according to string numerical value

I thought, I just report the error, since it may happen in other parts of the world to run out of space.
Ah, ok, I understand. Yes, perhaps we should surface some UI in the event that the profile folder is simply no longer writable. That'd probably be better than just silently failing at a bunch of things.

Marina, since this is not an Interest Dashboard bug, but actually a Toolkit bug, I'm going to switch components and de-assign you. Hope that's alright.
Assignee: msamuel → nobody
Component: Interest Dashboard → Notifications and Alerts
Product: Content Services → Toolkit
QA Contact: kghim
Re-jigging the summary / description of this bug:

It might be worth displaying some message to the user if / when the profile directory is not writable.
Summary: Fails silently on running out of disk space → Show UI when the profile folder is not writable
Status: UNCONFIRMED → NEW
Ever confirmed: true
That's perfect, thanks for your help, Mike :)
This isn't related to Notifications or Alerts backend. It seems like this is just about adding a new one so it belongs in the component of the code that would add the UI. Maybe OS.File in this case?
Component: Notifications and Alerts → OS.File
Ah yeah, sorry, my bad - I thought that Notifications or Alerts was for implementing such things, and not the backend. OS.File sounds like a good place for now.
I think that detecting the issue is not too hard. I'll need some UX guidance, though.

Updated

3 years ago
Whiteboard: .?
You need to log in before you can comment on or make changes to this bug.