RafaelGorski / VagrantChefHubot

Vagrant configuration using Chef Solo to bootstrap a Hubot using Skype as client.
http://bit.ly/1gLHVLE
6 stars 0 forks source link

ERROR Lost connection with Skype... Exiting #3

Open chrise86 opened 11 years ago

chrise86 commented 11 years ago

When running hubot -a skype &:

ERROR   File "/usr/local/lib/node_modules/hubot/node_modules/hubot-skype/src/skype.py", line 28, in <module>
    s = Skype4Py.Skype(Transport=os.environ.get('HUBOT_SKYPE_TRANSPORT', 'x11'))
  File "/usr/local/lib/python2.7/dist-packages/Skype4Py-1.0.35-py2.7.egg/Skype4Py/skype.py", line 250, in __init__
    self._Api = SkypeAPI(Options)
  File "/usr/local/lib/python2.7/dist-packages/Skype4Py-1.0.35-py2.7.egg/Skype4Py/api/posix.py", line 40, in SkypeAPI
    return SkypeAPI(opts)
  File "/usr/local/lib/python2.7/dist-packages/Skype4Py-1.0.35-py2.7.egg/Skype4Py/api/posix_x11.py", line 254, in __init__
    raise SkypeAPIError('Could not open XDisplay')
Skype4Py.errors.SkypeAPIError: Could not open XDisplay

[Thu Sep 05 2013 11:19:54 GMT+0000 (UTC)] ERROR Lost connection with Skype... Exiting
chrise86 commented 11 years ago

Looking at https://github.com/awahlig/skype4py#crashing-on-a-startup-on-ubuntu-server, but this still doesn't fix it...

RafaelGorski commented 11 years ago

I update the procedures, please give a try: $ vagrant up $ ssh -Y vagrant@10.0.1.20 $ passwd: vagrant $ skype &

login to a skype account

$ cd hubot $ hubot -a skype &

the "cd hubot" moves you thru a link to /usr/local/lib... where is hubot installed.

chrise86 commented 11 years ago

Changing into hubot dir takes you to: /home/vagrant/hubot.

Running hubot -a skype & or bin/hubot -a skype & gives same problem. It seems to be a config issue with XDisplay...

RafaelGorski commented 11 years ago

@chrise86 , I will review all steps and give you a feedback asap with improvements, I managed to work yesterday vey late, so maybe I miss some step! I will run in windows machine too to verify. Cheers! @GorskiRafael

chrise86 commented 11 years ago

I notice you've updated the readme with instructions to login to skype before running hubot - I thought you are asked to login the first time you run hubot with the skype adapter?

RafaelGorski commented 11 years ago

@chrise86, thanks for testing it!

I did just the following from scratch.

Steps overview: 1) clone repo 2) update the cookbooks 3) run vagrant up 4) login using ssh -Y 5) cd /home/vagrant/hubot 6) run Skype & 7) login to skype account 8) run bin/hubot -a Skype 9) accept the python Skype4py from Skype GUI 10) from my other skype account call my hubot skype and type hubot ping 11) reply PONG

Log:

$ ./login.sh vagrant@10.0.1.20's password: Linux hubot.local 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012 i686 GNU/Linux Ubuntu 10.04.4 LTS

Welcome to Ubuntu!

69 packages can be updated. 57 updates are security updates.

New release 'precise' available. Run 'do-release-upgrade' to upgrade to it.

Welcome to your Vagrant-built virtual machine. Last login: Thu Jun 7 01:56:53 2012 from 10.0.2.2 /usr/bin/xauth: creating new authority file /home/vagrant/.Xauthority vagrant@hubot:~$ cd hubot vagrant@hubot:~/hubot$ skype & [1] 21595 vagrant@hubot:~/hubot$ process 21595: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory See the manual page for dbus-uuidgen to correct this issue.

vagrant@hubot:~/hubot$ bin/hubot -a skype [Fri Sep 06 2013 02:42:48 GMT+0200 (CEST)] WARNING The HUBOT_AUTH_ADMIN environment variable not set

So if this thing not work I will screencast a hangout with the steps.

chrise86 commented 11 years ago

It's step 7) login to skype account - is there a gui supposed to show at this point? The next command causes an XDisplay error which I'm guessing should handle that part?

RafaelGorski commented 11 years ago

@chrise86, yes! :) When you run step 6 the skype gui must show up, what OS are you using? what versions of vmbox, vagrant?

chrise86 commented 11 years ago

Using the lucid32 box, Vagrant version 1.2.6, VirtualBox 4.2.16 r86992

RafaelGorski commented 11 years ago

@chrise86 your host machine OS is windows, mac or linux?

chrise86 commented 11 years ago

Sorry, its OSX Mountain Lion

RafaelGorski commented 11 years ago

@chrise86 , if you are using this ssh command to login to the vagrant the gui should popup in your screen, take some seconds to render it, its odd :) command that I recommend: ssh -Y vagrant@10.0.1.20

I think I will hangout a video with what happen here :)

RafaelGorski commented 11 years ago

@chrise86 , One thought, do you have this installed in your mac?: http://xquartz.macosforge.org/landing/

I think need this x11! it was previously installed in my machine.

RafaelGorski commented 11 years ago

@chrise86 I just update the README with this pre-requisite, now it works on windows too. Let me know if you manage to see the skype gui using xquartz . Thank you again!