1r0b1n0 / OctoPrint-Tempsgraph

Interactive temperature graph for octoprint
MIT License
18 stars 12 forks source link

Broken compatablilty with Octoprint 1.4.0 (temp graph not populating at all) #27

Closed hbh7 closed 4 years ago

hbh7 commented 4 years ago
Error calling fromHistoryData on view model TempsgraphViewModel : Error: indices must be valid indices for gd.data.
    at I (http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8520:2209043)
    at http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8520:2209992
    at R (http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8520:2210376)
    at Object.t [as extendTraces] (http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8520:2236557)
    at TempsgraphViewModel.self._processTemperatureData (http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8378:32)
    at TempsgraphViewModel.self._processTemperatureHistoryData (http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8298:46)
    at TempsgraphViewModel.self.fromHistoryData (http://10.20.30.149:5000/static/webassets/packed_plugins.js?cd54e9ec:8110:30)
    at callViewModelIf (http://10.20.30.149:5000/static/webassets/packed_core.js?f52b1299:16437:35)
    at http://10.20.30.149:5000/static/webassets/packed_core.js?f52b1299:16386:13
    at Pn (http://10.20.30.149:5000/static/webassets/packed_libs.js?3339d949:11208:530)

This error shows up in the console every few seconds, and the temp graph is blank with no lines of any kind. See https://f.hbh7.com/_53yphk.png

Mungbeanz commented 4 years ago

I am having the same issue. Same errors piling up inside browser. Tried 2x browsers and 2x computers. Disabled all 3rd party addons in octopi and disabled all browser addons. No luck yet.

tempsgraph

Jakeler commented 4 years ago

That is strange, i have just installed it on a fresh octoprint 1.4.0 virtualenv and it works completely fine, no errors in octoprint or browser log. Could it have something to do with settings?

Mungbeanz commented 4 years ago

I have a spare SD card that I will load a second install on and double check. I did this already but only went through limited troubleshooting.

Mungbeanz commented 4 years ago

okay that took way longer than I thought. Fresh install of 1.3.12: 1 3 12

Temps graph plugin working.

Fresh install of 1.3.12, then updated to 1.40 through web interface: 1 40

Temps graph plugin now not working.

Any logs etc you want me to provide to help single this one out?

Jakeler commented 4 years ago

Okay i have noticed that you have multiple extruders enabled, tested it with a virtual printer and can reproduce the issue now. It does does not happen with a single extruder config (like mine).

The plot then receives 6 values (2 per sensor, actual/target temperature) but is only configured for 4 (one extruder+bed) and therefore throws the error that the indices are invalid. So the root problem is actually here: https://github.com/1r0b1n0/OctoPrint-Tempsgraph/blob/master/octoprint_tempsgraph/static/js/tempsgraph.js#L89

currentProfileData.extruder.count()

Returns 1 but should be 2 (or however many extruders). But i am not sure how to fix that. Is that a octoprint bug?

Edit: Apparently the behavior of the callbacks changed, from onStartupComplete returns the wrong value (always 1), but it gets called again because of self.settingsViewModel.printerProfiles.currentProfileData.subscribe(function() ... with the correct data. It does not properly update the plot though. @1r0b1n0

Mungbeanz commented 4 years ago

Hi,

Thanks for looking into this. I indeed have dual extruders. I went to my current live setup with all plugins installed etc and configured it from 2 extruders down to 1 and it came back to life.

I then went and installed a fresh image of octopi which has 1.3.12 octoprint on it. This is working fine with 1 or 2 extruders. So something has changed with octoprint between 1.3.12 and 1.40 to break dual extruders?

new

1r0b1n0 commented 4 years ago

Hi, I released a new version for this plugin (0.3.6) that should fix this issue with octoprint 1.4.0. Could anyone with a dual extruder setup confirm this fixes the issue ?

@Jakeler indeed since octopi 1.4 the correct number of extruders is not yet valid on the "onStartupComplete" signal. I changed the plugin to wait to receive the correct configuration before initializing.

Mungbeanz commented 4 years ago

Tested on dual extruders. Working perfectly! (OctoPrint 1.4.0 , Tempsgraph Plugin (0.3.6) ) Thanks guys for looking into this and fixing this. My favourite plugin by a country mile! Capture 15