OctoPrint-PrintTimeGenius
OctoPrint-PrintTimeGenius copied to clipboard
Error when fetching print history in `self.onBeforeBinding`
Before reporting, check if your problem is here: https://github.com/eyal0/OctoPrint-PrintTimeGenius/wiki/Common-problems
Describe the bug Looks like PTG is hitting a null reference error when fetching print history on my Octoprint instance. (I've used PTG successfully on other instances, but this is a fresh install!)
It's failing to analyze (either automatically on uploads or when selecting files manually in the plugin settings), and there's almost nothing in the log, presumably because logging is being interrupted by the NPE.
Running the same command from the Chrome console causes the same error, and printing the value passed to Octoprint.get().done()
shows that the response is null
.
I've included PTG and Octoprint logs, as well as a screenshot of my current PTG settings, though no amount of settings-tweaking fixed the issue.
Uninstall + clean didn't fix the issue either.
To Reproduce Steps to reproduce the behavior:
- Refresh page with PTG installed -- the error happens immediately on Octoprint page load.
Expected behavior PTG doesn't throw an error, and can analyze files. Secondarily, PTG should write to its log when it fails to fetch print history.
OctoPrint Version: OctoPrint: 1.5.3 (stable)
PrintTimeGenius Version (if you know): 2.2.7 (according to Plugin Manager)
If relevant, upload the PrintTimeGenius log and any problematic gcode files (you might need to rename the files). This is really important. I probably can't help you without this.
Seems like maybe PTG is assuming that the print history has already been initialized -- maybe it behaves weirdly if you install it while a print job is actually running and it's failing to do its initial setup, or something like that?
That sounds plausible, yeah. How to fix it... Hm...
Print just finished, so while the printer was idle, I tried:
- Uninstall PTG (with the "clean" button)
- Restart Octoprint
- Install PTG
- Restart Octoprint
Still no luck -- error immediately shows up again.
I think that means either my guess is wrong (i.e. installing while printing isn't the culprit) or whatever bad state I'm in isn't actually cleaned up when the plugin is uninstalled + cleaned.
Is there a way I can manually populate the print history, or maybe try a previous version of the plugin?
Still can't get this to work. Any suggestions? :)
I could re-install Octoprint and try installing PTG as the first (and only) plugin, maybe?
Want to try installing this and see if it is better?
https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/refs/heads/print_history_error.zip
Nope, still getting the same error. :(
On Wed, Apr 14, 2021 at 3:47 PM Eyal @.***> wrote:
Want to try installing this and see if it is better?
https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/refs/heads/print_history_error.zip
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eyal0/OctoPrint-PrintTimeGenius/issues/249#issuecomment-819786674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA627LD5FRKRFM4JB4Y47XTTIXWMHANCNFSM42XFFHCQ .