Skip to content
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

Screenshot functionality slightly broken #6

Open
praabjerg opened this issue Jul 28, 2014 · 2 comments
Open

Screenshot functionality slightly broken #6

praabjerg opened this issue Jul 28, 2014 · 2 comments

Comments

@praabjerg
Copy link
Owner

When using F3 to screenshot the slides, some of the screenshots appear to be of the same slide. This could be a problem with the SlyPres code, but I'm not certain.

Additionally, if you open Inspect Element in Chrome, the Python function will fail with:
HTTP Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 656, in respond response.body = self.handler() File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 188, in __call__ self.body = self.oldhandler(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 34, in __call__ return self.callable(*self.args, **self.kwargs) File "serve.py", line 88, in save_screenshot self.webdriver.get_screenshot_as_file(filename) File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 703, in get_screenshot_as_file png = self.execute(Command.SCREENSHOT)['value'] File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 156, in execute self.error_handler.check_response(response) File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 147, in check_response raise exception_class(message, screen, stacktrace) WebDriverException: Message: u"unknown error: Runtime.evaluate threw exception: TypeError: Cannot read property 'click' of null\n (Session info: chrome=36.0.1985.125)\n (Driver info: chromedriver=2.10.267518,platform=Linux 3.11.0-20-generic x86_64)"

As far as I can make out, this looks like an issue with ChromeDriver. Exactly why it happens, I'm not sure.

@arild-haugstad
Copy link

I've seen that happen whenever I try to take screenshots with the Chrome DevTools open, but not otherwise --- have you observed the same?

@praabjerg
Copy link
Owner Author

Yes, and it annoys me, because I wanted to take a closer look at why I get the same screenshot for two different slides, but that gets hard when the DevTools break the functionality completely somehow.

All of this may be related to the strange setup of this functionality: That I have the Javascript ask the Python-backend/chromedriver to take screenshots of itself. I found out when I implemented it that the JS calls had to be asynchronous with continuations, otherwise it would enter some kind of weird deadlock between the javascript and the backend chromedriver code. Even I don't understand completely why that is the case, and what exactly happens.

If I unwittingly end up summoning some kind of elder god with this contraption, I apologise to the rest of humanity. I did not actually intend to render us extinct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants