"No D-BUS daemon running" when running phpunit test

312 views Asked by At

When I run my "selenium" tests, firefox displays the following window:

enter image description here

Should I ignore it? Is there a way to fix it? I'm running firefox-38.0.5 and selenium-2.46.0. selenium starts firefox this way:

/usr/bin/firefox -profile /tmp/customProfileDire84f0e898d9c43d39dededa75b0dea22

UPD

dbus       413     1  0 Jun20 ?        00:00:05 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
yuri      3994     1  0 Jun21 tty1     00:00:00 dbus-launch --sh-syntax --exit-with-session
yuri      3995     1  0 Jun21 ?        00:00:01 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
yuri      6639  6636  0 Jun21 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
yuri     13082  5986  0 22:16 pts/4    00:00:00 /bin/bash -c ps -ef | grep dbus
yuri     13084 13082  0 22:16 pts/4    00:00:00 grep dbus

UPD I've just found out that this happens when I run tests under tmux. Additionally, I set SSH_AUTH_SOCK to ~/.ssh/ssh_auth_sock, so that I could make tmux communicate with other ssh-agent without restarting tmux. And the related issue is that svn can't access GNOME keyring, asks for password every time under tmux.

1

There are 1 answers

0
x-yuri On BEST ANSWER

As it turns out, the issues has to do with tmux not updating environment variables (not that it can). They manifest itself after restarting windows manager (exiting and starting it again) and leaving tmux running. As a result, DBUS_SESSION_BUS_ADDRESS changes its value, but processes running inside tmux has still the old value of the variable. One option would probably be to create a symlink to the file, however I can't see it (e.g., unix:abstract=/tmp/dbus-JVndBgLlIC,guid=f9f24c9f9cdbd6648f38035e5598b880). The other is to update the variable manually for each process needing it. Additionally, one can add the variable to tmux's update-environment option, so that new windows get the right value.

The same thing causes svn unable to communicate to GNOME Keyring.

Link to the forum discussion, just in case.