-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with Ubuntu 14 - firefox #8
Comments
Hi Phoebe, Could you let me know a couple of things:
Apart from the firefox problem (which looks like it might be an old version of firefox), I think the other issue is that python did not build properly. I used pyenv for building python, which has some suggestions here: |
Can you first try: Remove django-remindme/pyv2.7.10 directory Then try running the test again. |
firefox -V
Mozilla Firefox 40.0. uname -a
|
Am using the python versions that were installed on the server as default. Should I build them again? Am reinstalling now... |
No, no need to change the versions of python you have installed. It only uses the system python to bootstrap itself. Hitch installs its own version(s) of python in a directory called "~/.hitchpkg" and then creates a virtualenv from that to run your code with. It does this so that you can specify the exact version of python you want to test your code with instead of just using whatever the system happens to have installed. It also means that you can run the same tests against multiple versions of python (django-remindme-tests does this). Unfortunately there seems to be a problem with what it is doing currently. I suspect deleting the above 3 directories and running hitch test . again may solve the problem. It will download and build those python versions by itself if they are not there. If that doesn't work, I will dig deeper to see what else it could be. |
Can you also try just running firefox on the console? Does it run ok? |
I may have replicated issue on my machine. It appears to happen when the virtualenv (/home/django/django-remindme/pyv2.7.10) exists but the base python it is built upon - "~/.hitchpkg/python2.7.10/bin/python" does not exist or is not accessible. The question is how ~/.hitchpkg suddenly disappeared or stopped working for you. When you run a test it should take care of building both. |
That was exciting! Whole server upgraded and all shiny and new.
Tried also changing django-remindme-tests to have chmod 777, no change. Am now running with python 2.7.10 and 3.4.3 and the problem occurs with both. Thanks for your help on this, really would like to get this working as I'd much prefer to invest my testing time in writing hitch tests than low level selenium tests. |
It looks like some of your files still belong to root. Try going to your home directory and running this command: sudo chown -R hitcher:hitcher . You might want to delete the django-remindme directory and check it out again as well to make sure everything's clean: git clone --recursive https://github.com/hitchtest/django-remindme.git |
Thank you for using the software and reporting issues. I'm always happy to see your bug reports :) |
Doing a proper chown sorted the ownership, but now back to the firefox problem:
firefox -V
|
selenium==2.47.1 |
Possible related issue: SeleniumHQ/selenium#981 |
Does the browser launch? |
Try running the command: .hitch/virtualenv/bin/python -m hitchselenium.server In the django-remindme/django-remindme-tests directory. Does it say anything? I have the exact same version of firefox and selenium too and it works fine. Definitely not a version issue. |
|
How should I lauch firefox? Tried: (virtualenv)hitcher@jenkins:/home/django/django-remindme/django-remindme-tests$ firefox
(virtualenv)hitcher@jenkins:/home/django/django-remindme/django-remindme-tests$ firefox & |
Oh, you're running it on a server you ssh'ed into? Are you sshing in from a mac or another linux machine? |
yes |
do you want to open a skype session? might be quicker |
In any case, you will need to:
export DISPLAY=127.0.0.1:10.0 Then when you run firefox command on the terminal it should appear. If firefox appears then the hitch test should work. Alternatively you can run the following command: hitch test . --extra '{"xvfb":true}' That should run the test but it won't display the firefox window. If you are using a Mac you will need an X server installed. If you are using Linux it should just work. |
|
|
|
In summary, there were three main problems with my setup:
|
Having run hitch init as my hitch user I run hitch test simple_reminder.test and get these errors. Not sure if they are related. Same errors occurr for both python 2.7 and 3.
and then...
and later:
looking for the firefox log, I came across the stdout directory:
checking the contents of these files:
Havn't managed to find firefox log, if there is one. A bit of googling suggests maybe an incompatibility between the versions of firefox and selenium? Am happy to keep researching this but reporting it in case there is an easy solution.
The text was updated successfully, but these errors were encountered: