'Firefox suddenly fails to open on wsl2: "TRACE failed to open /tmp/rust_mozprofilecarMRI/MarionetteActivePort"

Firefox has suddenly decided to stop working on my wsl2 console running on Windows 10. It was working fine yesterday night and I'm at a loss as to why this might be happening.

I tried rebooting wsl2 to clear out the /tmp directory by restarting the Lxssmanager service in services.msc, and I'm getting the same error with the same log output, just with a different file in /tmp/rust_mozprofilewhatever.

Here are my geckodriver logs:

1652298630837   geckodriver INFO    Listening on 127.0.0.1:45131
1652298631337   geckodriver::capabilities   DEBUG   Trying to read firefox version from ini files
1652298631340   geckodriver::capabilities   DEBUG   Found version 99.0
1652298631340   geckodriver::browser    DEBUG   Backing up prefs to "/tmp/rust_mozprofilecarMRI/user.geckodriver_backup"
1652298631342   mozrunner::runner   INFO    Running command: "/usr/bin/firefox" "--marionette" "--remote-debugging-port" "41843" "-no-remote" "-profile" "/tmp/rust_mozprofilecarMRI"
1652298631342   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1
1652298631342   geckodriver::browser    TRACE   Failed to open /tmp/rust_mozprofilecarMRI/MarionetteActivePort
1652298631343   geckodriver::marionette TRACE   Retrying in 100ms
1652298631443   geckodriver::browser    TRACE   Failed to open /tmp/rust_mozprofilecarMRI/MarionetteActivePort
1652298631443   geckodriver::marionette TRACE   Retrying in 100ms
1652298631544   geckodriver::browser    TRACE   Failed to open /tmp/rust_mozprofilecarMRI/MarionetteActivePort
1652298631544   geckodriver::marionette TRACE   Retrying in 100ms
1652298631645   geckodriver::browser    TRACE   Failed to open /tmp/rust_mozprofilecarMRI/MarionetteActivePort
1652298631645   geckodriver::marionette TRACE   Retrying in 100ms
1652298631746   geckodriver::browser    TRACE   Failed to open /tmp/rust_mozprofilecarMRI/MarionetteActivePort

I should also mention that before rebooting, I checked the directory /tmp/rust_mozprofileGgwhatever and the MarionetteActivePort file didn't exist. How do I fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source