Open henning opened 2 years ago
Hint: also, I tried to find any place with some logs, but wasn't successful.
This might be similar or related to #11 - but I am running with tornado 4.3 (as the requirements fils of mod ui suggests)
This message is thrown by modsdk.js (mod-sdk/html/js) line 83.
alert("Error: Can't generate thumbnail. Is your server running? Check the logs.")
I've commented it out it here, as it is false.
To reload the page after a screenshot is created I add a new function to the modsdk.js
function reloadPage() {
window.location.reload()
}
which I call with a timeout in the $('#screenshot').click(function()
function.
setTimeout( function() { reloadPage(); }, 6000)
timeout is set to 60ms because the screenshot.js introduced a timeout of 50ms
The only way I got it to work on a raspberry pi , is by running the server as sudo ./development_server.py from a terminal session with graphical desktop
phantomjs is needed for those. also, mod-sdk no longer works with the latest tornado, I added a requirements.txt which you activate through pip and virtualenv, that should work in theory.
see https://github.com/moddevices/mod-panel/blob/master/source/mod-sdk.sh for an example
When I hit the button "Generate Images", I get the message "Error: Can't generate thumbnail. Is your server running? Check the logs."
I checked the make_screenshot.py to see if I need ti change the port there when I changed it before in settings.py because I had something running on 9000 already. But the port there is not the same as the one in settings, as I understand it's an own webserver instance just for the screenshot.
I start the mod-sdk via the mod-panel app(assuming this is "the right way" to do it), and I see no output in the console that would point on the cause of this error. (actually I see no output at all in the SDK Tab of mod-panel... but that might be another issue in another repository).