0

Trying to run istanbul cover but getting the following set of errors and can't seem to fix them. This is a simple code coverage test. Actual command is:

istanbul cover --dir ../artifacts --report html -- ./node_modules/mocha/bin/_mocha tests/unit/* --recursive --reporter spec

My errors are as below:

    (istanbul:10869): GConf-WARNING **: Client failed to connect to the D- BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Traceback (most recent call last):
  File "/usr/bin/istanbul", line 24, in <module>
    from istanbul.main import main
  File "/usr/lib/pymodules/python2.7/istanbul/main/main.py", line 37, in <module>
    from istanbul.main.tray_icon import TrayIcon
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 30, in <module>
    class TrayIcon:
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 34, in TrayIcon
    popup_menu = TrayPopupMenu()
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 38, in __init__
    self._setup_popup_menu()
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 47, in _setup_popup_menu
    self._setup_record_3d()
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 102, in _setup_record_3d
    new_widget = Widget(record_3d)
  File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 36, in __init__
    self.associate_preference()
  File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 39, in associate_preference
    preferences = Preferences()
  File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 134, in __init__
    new_pref = Preference(setting, setting_v[0], setting_v[1], setting_v[2])
  File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 38, in __init__
    self.gconf = IstanbulGConf()
  File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 78, in __init__
    GConfClient.__init__(self, '/apps/istanbul')
  File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 27, in __init__
    self.client.add_dir (directory, gconf.CLIENT_PRELOAD_NONE)
glib.GError: No D-BUS daemon running




    /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:37: Warning: invalid (NULL) pointer instance
  self.tooltips = gtk.Tooltips()
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:37: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  self.tooltips = gtk.Tooltips()
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:43: Warning: invalid (NULL) pointer instance
  self.popupmenu = gtk.Menu()
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:43: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  self.popupmenu = gtk.Menu()
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:54: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  self.popupmenu_aboutitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:54: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  self.popupmenu_aboutitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:54: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  self.popupmenu_aboutitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:73: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  _("_Select Area to Record"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:73: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  _("_Select Area to Record"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:73: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  _("_Select Area to Record"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:86: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  _("Select _Window to Record"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:86: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  _("Select _Window to Record"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:86: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  _("Select _Window to Record"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:98: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  record_3d = gtk.CheckMenuItem(_("Record _3D"))
    /usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:98: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  record_3d = gtk.CheckMenuItem(_("Record _3D"))

    (istanbul:10897): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Traceback (most recent call last):
  File "/usr/bin/istanbul", line 24, in <module>
    from istanbul.main import main
  File "/usr/lib/pymodules/python2.7/istanbul/main/main.py", line 37, in <module>
    from istanbul.main.tray_icon import TrayIcon
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 30, in <module>
    class TrayIcon:
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 34, in TrayIcon
    popup_menu = TrayPopupMenu()
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 38, in __init__
    self._setup_popup_menu()
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 47, in _setup_popup_menu
    self._setup_record_3d()
  File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 102, in _setup_record_3d
    new_widget = Widget(record_3d)
  File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 36, in __init__
    self.associate_preference()
  File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 39, in associate_preference
    preferences = Preferences()
  File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 134, in __init__
    new_pref = Preference(setting, setting_v[0], setting_v[1], setting_v[2])
  File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 38, in __init__
    self.gconf = IstanbulGConf()
  File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 78, in __init__
    GConfClient.__init__(self, '/apps/istanbul')
  File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 27, in __init__
    self.client.add_dir (directory, gconf.CLIENT_PRELOAD_NONE)
glib.GError: No D-BUS daemon running
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Dup Step
  • 218
  • 1
  • 6

1 Answers1

0

if application is GUI based and if you already have attached display still the application is not able to open display try this...

You need to export its address. generally it will be 0.0 So your command will be like "export DISPLAY=:0.0" if doesn't work try changing 0.0 to 0 then it can find the display.

Chirag Acharya
  • 126
  • 1
  • 12
  • The problem was in Ubuntu and how it deciphers node vs nodejs. There was several files that had to be corrected to see nodejs as opposed to none. Quick fix was to just move to centos. No problems there. – Dup Step Aug 26 '15 at 20:34