The error message "No space left on device (os error 28)" is pretty straightforward.
The messaage indicates that the /tmp
directory does not have enough space left. Selenium uses the /tmp directory to create temporary profiles when it runs tests, as indicated in the error message (os error 28) at path "/tmp/rust_mozprofileO0WZJN"
.
Carry out command df -h
to see the disk usage of your file systems and check the usage of the /tmp
directory. If this is indeed teh case, see if you can free up some space.
There is another alternative, as you are using a Firefox browser, you can set the options
property to make Selenium use a different path.
The question does not indicate what Selenium language you are using, but below is an illustration for Chrome & Firefox, using Java or Python
Chrome - Java
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class Main {
public static void main(String[] args) {
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=/path/to/your/directory");
ChromeDriver driver = new ChromeDriver(options);
}
}
Chrome Python
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("user-data-dir=/path/to/your/directory")
driver = webdriver.Chrome(options=options)
Firefox Java
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
public class Main {
public static void main(String[] args) {
FirefoxOptions options = new FirefoxOptions();
options.addPreference("browser.download.dir", "/path/to/your/directory");
FirefoxDriver driver = new FirefoxDriver(options);
}
}
Firefox Python
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.profile = "/path/to/your/directory"
driver = webdriver.Firefox(options=options)
The above examples should redirect Selenium to store it's temporary profiles to the path specified other than /tmp
N.B.
Make sure that the directory specified exists and that Selenium has the necessary permissions to write to it.