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

Javascript error during to reload Octoprint #4

Open
xpix opened this issue May 16, 2018 · 4 comments
Open

Javascript error during to reload Octoprint #4

xpix opened this issue May 16, 2018 · 4 comments

Comments

@xpix
Copy link

xpix commented May 16, 2018

Hello,

i found a solutiuon to install OctoPNP on an RPI3. But if i reload my Octoprint then i run in this javascript error:

Uncaught TypeError: Cannot read property 'setAttribute' of null
    at new OctoPNPViewModel (packed_plugins.js?0afb2d09:584)
    at _createViewModelInstance (packed_core.js?f7d19c53:13069)
    at HTMLDocument.<anonymous> (packed_core.js?f7d19c53:13147)
    at fire (packed_libs.js?d8971830:3187)
    at Object.fireWith [as resolveWith] (packed_libs.js?d8971830:3317)
    at Function.ready (packed_libs.js?d8971830:3536)
    at HTMLDocument.completed (packed_libs.js?d8971830:3552)
OctoPNPViewModel @ packed_plugins.js?0afb2d09:584
_createViewModelInstance @ packed_core.js?f7d19c53:13069
(anonymous) @ packed_core.js?f7d19c53:13147
fire @ packed_libs.js?d8971830:3187
fireWith @ packed_libs.js?d8971830:3317
ready @ packed_libs.js?d8971830:3536
completed @ packed_libs.js?d8971830:3552

I checked this part and here is the code wher the error is happend:

        //white placeholder images
        document.getElementById('headCameraImage').setAttribute( 'src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wMRCQAfAmB4CgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAMSURBVAjXY/j//z8ABf4C/tzMWecAAAAASUVORK5CYII=');
        document.getElementById('bedCameraImage').setAttribute( 'src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wMRCQAfAmB4CgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAMSURBVAjXY/j//z8ABf4C/tzMWecAAAAASUVORK5CYII=');

Version: OctoPrint 1.3.6.dev37+gb161a1f (maintenance branch)

@xpix
Copy link
Author

xpix commented May 17, 2018

Hi, ok i found a solution for this problem above, let octopnp run on my windows pc via docker and this image: https://github.com/OctoPrint/docker

After that, install plugin over webinterface ... thats easy.

@platsch
Copy link
Owner

platsch commented May 17, 2018

Thanks for the investigation, do you have any clue why it runs on the Docker image?

@xpix
Copy link
Author

xpix commented May 17, 2018

@platsch I checked the logs, but can't find any hints. But the first time i try to install this on my RPI on raspbian, you know somebody run in python.opencv package problem (not exists in raspbian) ... maybe you can try to install ur plugin under raspbian?

Here you can try to start an own docker image with raspbian:
https://hub.docker.com/r/saraqian/raspbian_octopi/

@platsch
Copy link
Owner

platsch commented May 18, 2018

Yes, I should probably do so. I'm currently only using Odroids due to their better CPU and don't have a current RasPI at hand.
The code should be overhauled anyway since some of the OctoPrint plugin interfaces have changed and we are still using the deprecated APIs.

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