org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
It's probably because Firefox is default as a snap package on Ubuntu. I fixed mine by creating a symlink to the snap geckodriver to a directory in my $PATH. So for example: