exception on viewing source with external editor
Categories
(Toolkit :: View Source, defect)
Tracking
()
People
(Reporter: rpr.nospam, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Steps to reproduce:
In about:config I set the following preferences for viewing page source with external editor gvim (on Ubuntu 22.04):
view_source.editor.external true
view_source.editor.path /usr/bin/gvim
Then tried to view page source (Ctrl + U).
Actual results:
Firefox displayed page source in internal viewer.
Also, the following error appeared in the Firefox console:
[Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIProcess.init]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://global/content/viewSourceUtils.js :: getExternalViewSourceEditor :: line 318" data: no] viewSourceUtils.js:318:14
getExternalViewSourceEditor chrome://global/content/viewSourceUtils.js:318
openInExternalEditor chrome://global/content/viewSourceUtils.js:232
openInExternalEditor chrome://global/content/viewSourceUtils.js:213
BrowserViewSourceOfDocument chrome://browser/content/browser.js:3183
BrowserViewSource chrome://browser/content/browser.js:3259
oncommand chrome://browser/content/browser.xhtml
Expected results:
The page source should open in the specified external editor.
![]() |
||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
The error sort of says what went wrong, ie we couldn't find /usr/bin/gvim
. Does that file definitely exist, does the preference value definitely not have any lost spaces or other whitespace or something, and/or are you maybe using a snap
based build (check in about:support if you're not sure) that restricts arbitrary access to your filesystem which might also break things like this?
Reporter | ||
Comment 2•3 years ago
|
||
/usr/bin/gvim definitely exists on that Ubuntu 22.04 machine. It was installed via a deb package from regular Ubuntu repositories. There are no whitespaces in the setting.
On that machine I was able to view source with /usr/bin/gvim a couple of months ago (with the same settings in my Firefox profile). I'd say the issue started after Firefox was upgraded to some of the latest versions.
Reporter | ||
Comment 3•3 years ago
|
||
(In reply to :Gijs (he/him) from comment #1)
... and/or are you maybe using a
snap
based build (check in about:support if you're not sure) that restricts arbitrary access to your filesystem which might also break things like this?
I see now that you asked about snap based build of Firefox. Yes, Ubuntu 22.04 installs Firefox snap instead of Firefox deb package.
That's probably the cause of the problem. I'll report back here after removing the snap and installing Firefox from a deb repository.
Reporter | ||
Comment 4•3 years ago
|
||
I removed Firefox snap and installed Firefox from ppa:mozillateam/ppa which has current deb package for Ubuntu 22.04 (a guide for that is given at https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04). It solved the problem, i.e. an external editor can be started as expected.
Reporter | ||
Updated•3 years ago
|
Description
•