question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening processor manual fails on Ubuntu 22.04 w/default snap installed Firefox due to snap sandboxing

See original GitHub issue

Describe the bug On Ubuntu 22.04, using the default snap based Firefox install, opening processor manuals via CodeBrowser Listing’s right-click menu fails.

Firefox opens but displays the following error:


Firefox can’t find the file at /tmp/pdfView12297125562363118529.html.

    Check the file name for capitalization or other typing errors.
    Check to see if the file was moved, renamed or deleted.

The HTML file is being created as expected in /tmp. However due to the way snap applications are sandboxed Firefox can’t open it from that file path. On Ubuntu 22.04 Firefox maintains it’s own separate tmp directory under the user’s homedir at ~/Downloads/firefox.tmp because that’s a path snap sandboxing is permitted to access.

I realize this is less of a Ghidra issue and more of a snap / Firefox making breaking changes issue but I thought it was worth raising here for visibility. If you disagree feel free to close.

To Reproduce Steps to reproduce the behavior:

  1. Install Ubuntu 22.04
  2. Install Ghidra
  3. Download and any processor manual PDF and move it to the correct directory under Ghidra/Processors/processor_name/data/manuals/
  4. Import a binary of the same architecture as the manual into Ghidra and open it in the CodeBrowser
  5. In the CodeBrowser’s Listing view right-click anywhere and select Processor Manual…

Expected behavior Listing View > right-click > Processor Manual… should successfully open available processor manual when using a browser installed from a snap

Screenshots

Screenshot from 2022-06-02 21-24-14

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Java Version: openjdk 11.0.15
  • Ghidra Version: 10.1.3
  • Ghidra Origin: official ghidra-sre.org distro

Additional context

snapd bug discussing no access to /tmp files https://bugs.launchpad.net/snapd/+bug/1972762

Firefox bug discussing the firefox.tmp dir in home dir https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1958813

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
oldmanluddcommented, Jun 19, 2022

I just discovered the Edit > Tool Options > Processor Manuals options. And specifically the File Format option in there.

Setting File Format to ${FILE_URL} from the drop-down list rather than the default ${HTTP_URL} resolves this issue for me.

With ${FILE_URL} I can successfully open the manuals from the Listing View’s right-click menu.

Note however that I do have Ghidra installed in a subdir of my user’s homedir so the processor manual files themselves are also under my homedir with the Ghidra install. If my Ghidra install were external to my homedir (along with the manual files) I suspect I’d still hit the snap file access sandboxing even with this option set to ${FILE_URL}

1reaction
ryanmkurtzcommented, Jun 22, 2022

Thanks for the workaround info. We are going to consider this a firefox issue and close it. It shall continue to serve as a valuable reference though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ubuntu 22.04 Firefox Snap breaks KeePassXC integration ...
Run KeePassXC and enable browser integration (menu Tools -> Settings -> Browser Integration, tick "Enable browser integration" and "Firefox").
Read more >
Known issues with Firefox Snap? - Desktop - Ubuntu Discourse
It seems that I cannot use Firefox on Ubuntu 22.04 (snap version) on devices where ... In 1662552, snapd fails for nfs mounted...
Read more >
Firefox on Ubuntu 22.04 from .deb (not from snap)
snaps are one of a number of reasons why I'm moving away from an xubuntu based desktop to simply a base debian amd64...
Read more >
Ubuntu Devs Finally Fix Frustrating Firefox Snap Flaw
Run sudo apt install xdg-desktop-portal , which will print the version number in its “you already have this” error). If you've got the...
Read more >
Firefox now only available via snap : r/Ubuntu - Reddit
I have firefox installed via tar.gz and when I dist-upgraded then it automatically installed firefox snap. Also my .desktop file was overwritten ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found