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

TabOrder plugin conflict prevents adding to queue (Knockout-Sortable library name collision) #14

Closed
L0rz opened this issue Mar 14, 2022 · 30 comments
Labels
bug Something isn't working

Comments

@L0rz
Copy link

L0rz commented Mar 14, 2022

i Can,t add annything to the Q after update from 1.3.1 to you version.
first i remove the old version and hold my setings,
after this teh Settings page has the right setting but the print q was empti, so i remove the plugin again whith remove of my settings restart and install it again.

But i still can´t add anything to the list.
2022-03-14 14_26_05-0% - (operational) - Vivaldi

@Tiri1i1
Copy link

Tiri1i1 commented Mar 14, 2022

Same issue observed on version 1.4.1, Print queue is always empty no matter my actions

@leveos
Copy link

leveos commented Mar 15, 2022

i can comfirm the same problem. it appears to be a visual bug for me though. if i click the plus sign to add a file to the queue nothing showes up but if i then press start managing it starts to print the file that i added. still not usable in this state but i hope that helps narrow it down

@smartin015
Copy link
Owner

smartin015 commented Mar 15, 2022

Hey all, thanks for the reports, and sorry this wasn't a flawless upgrade - I'm doing some development work to hopefully make updates a bit more smooth moving forward.

If any of you are using Chrome, can you:

  1. Use Ctrl+Shift+C keyboard shortcut to open the dev tools
  2. click on the "Console" tab,
  3. right-click and "Save As" to get a log file
  4. Upload it to a comment here?

(see also here for a visual)

Going by the comment from @leveos, there's probably something going on in the page itself that's causing failure to render the files. Listing out which particular browser you're using (Chrome? Firefox? Edge? etc) might also help narrow the problem down.

@smartin015 smartin015 added the bug Something isn't working label Mar 15, 2022
@smartin015
Copy link
Owner

Actually - just pushed some additional logging to try and make the problem more obvious. Can you please follow the .zip style instructions here to pull those changes, and try with that?

@leveos
Copy link

leveos commented Mar 15, 2022 via email

@Tiri1i1
Copy link

Tiri1i1 commented Mar 16, 2022

Same issue, I installed again the plugin using the .zip URL (https://github.com/smartin015/continuousprint/archive/master.zip) but it's tagged as Unknown and doesn't show up anymore.
I did test beforehand, and the Queue system does not work. Only the first part added is printed, but when it's finished it does not switch to the next part.

@smartin015
Copy link
Owner

smartin015 commented Mar 16, 2022

Just squashed the bug with installation - I verified in a test instance that I can install the plugin, reboot, and it shows up (after verifying that it showed up as unknown before). Try one more time? There should be additional console logs that I can use to help narrow things down.

@smartin015
Copy link
Owner

@leveos, I think your email reply ate your attachment. Can you post it to the github issue directly?

@leveos
Copy link

leveos commented Mar 16, 2022

@leveos, I think your email reply ate your attachment. Can you post it to the github issue directly?

here is the log file frome before. i will try the fresh install of the .zip now as well

printer2.local-1647380846568.log
e

@leveos
Copy link

leveos commented Mar 16, 2022

here is the console log fro the fresh install using the .zip
printer4.local-1647390376697.log

@smartin015
Copy link
Owner

smartin015 commented Mar 16, 2022

Thanks @leveos - that second zip is super helpful. Seems like octoprint is trying to load the tab before the plugin is initialized for some reason. I'm digging in now to see why that's happening.

Specifically:

packed_core.js?a56692ed:1281 Could not bind view model CPViewModel to target #tab_plugin_continuousprint : ReferenceError: Unable to process binding "sortable: function(){return {foreach:jobs,options:{handle:'.fa-grip-lines-vertical',onStart:$root.sortStart,onEnd:$root.sortEnd,onMove:$root.sortMove}} }"
Message: Unable to process binding "visible: function(){return queuesets().length > 0 }"
Message: queuesets is not defined
    at visible (eval at parseBindingsString (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:131:1741), <anonymous>:3:60)
    at update (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:133:12908)
    at a.$.l (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:132:379)
    at Function.yd (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:130:18286)
    at Function.zd (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:130:17972)
    at Function.ha (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:130:17808)
    at Object.a.o.a.$ (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:130:16560)
    at http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:132:366
    at Object.D (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:129:2126)
    at p (http://printer4.local/static/webassets/packed_libs.js?1fe9f29c:131:4001)
(anonymous) @ packed_core.js?a56692ed:1281
<elided>
packed_core.js?a56692ed:1283 ... binding done
packed_core.js?a56692ed:1283 Application startup complete
packed_plugins.js?0bc93001:7853 [octoprint.plugins.continuousprint] onTabChange - #tab_plugin_continuousprint == undefined vs #tab_plugin_continuousprint
packed_plugins.js?0bc93001:7686 [octoprint.plugins.continuousprint] loading state...

(EDIT: Binding also happens before receiving data on my end - so that's not actually the problem. It's like the default empty list on init is getting replaced by something else...)

@smartin015
Copy link
Owner

@leveos , can you confirm you're running OctoPrint v1.6.1 and a relatively recent version of your browser? (e.g. Chrome 99.0.4844.57)

@leveos
Copy link

leveos commented Mar 16, 2022

octoprint 1.7.3
chrome 99.0.4844.74

@smartin015
Copy link
Owner

Thanks - I still haven't been able to reproduce the errors you're seeing on my environment. It also looks like you're using a lot of additional plugins. Can you list what you have installed? Perhaps there's a conflict somewhere...

@leveos
Copy link

leveos commented Mar 16, 2022

yes extra stuff i use:
bed visualizer
consolidate temp control
continuous print
custom background
floating navbar
GCODE system commands
M73 progress
Navbar temprature plugin
PSU control
tab order
themeify

@leveos
Copy link

leveos commented Mar 16, 2022

i could take a backup of my octopi instance and send it to you if that will help. then you could use it to restore one of yours

@leveos
Copy link

leveos commented Mar 16, 2022

just a thought. i use PSU control, my pi stays on always and i power on my printer with a relay after that it connects to the printer. could the bug be caused by continuous print being loaded while the printer isnt connected?

@smartin015
Copy link
Owner

smartin015 commented Mar 16, 2022

Hah! It's the tab order plugin.

Normally (i.e. in a more "vanilla" flavored octoprint) the continuous print tab is hidden in a drop-down, and not displayed on page load. With TabOrder installed, it's loaded first-thing, which seems to tickle a particular initialization problem with KnockoutJS & the continuousprint plugin. I can now reproduce the problem with TabOrder installed. Whew. Now looking into a fix.

If it's not too much to ask, can you uninstall TabOrder on your instance and see if it loads? I'll work on a fix from my end, but I'd like to see if that at least mitigates the problem on your end.

@leveos
Copy link

leveos commented Mar 16, 2022

will do that right now. i also have continuous print as my very first tab on page load as its the first thing i need to get started for work

@leveos
Copy link

leveos commented Mar 16, 2022

ok with it uninstalled it still happens to be my first tab for some reason. maybe lingering settings. but it is allowing me to add files to the queue now. would still like to have tab order installed if possible in the future as i can use it to hide unwanted tabs. but this is good

@smartin015
Copy link
Owner

will do that right now. i also have continuous print as my very first tab on page load as its the first thing i need to get started for work

That's really convenient. I think I'll adopt that workflow for my own setup... thanks for the inadvertent tip :)

ok with it uninstalled it still happens to be my first tab for some reason. maybe lingering settings. but it is allowing me to add files to the queue now. would still like to have tab order installed if possible in the future as i can use it to hide unwanted tabs. but this is good

Wacky. Agreed this isn't a great solution, but at least we know how to mitigate the problem and I can start fixing it for real now that I can reproduce it. I'll take a look tomorrow as it's getting a bit late tonight and I haven't been able to land on a "quick fix" in just a few minutes. Thanks again for all your help!

@smartin015
Copy link
Owner

After some more debugging, it turns out there's two different projects called knockout-sortable, and that's causing the plugins to collide:

The TabOrder sortable implementation unfortunately doesn't support nesting, which is used now extensively in continuousprint to allow reordering of jobs and of their contained items. Otherwise, it'd be possible to just migrate to their dependency as a quick (but brittle) workaround.

I'm attempting to mutate the naming of the dependencies used in this plugin so that the naming differs, which should hopefully fix this.

@smartin015 smartin015 changed the title Not Possible to add Items to Q TabOrder plugin conflict prevents adding to queue (Knockout-Sortable library name collision) Mar 16, 2022
@smartin015
Copy link
Owner

Just merged in the rename, and I've experimentally verified it works with TabOrder also installed. @leveos - when you have a moment, please give it a try again (uninstall & reinstall 1.4.1) and let me know if it works for you.

@L0rz
Copy link
Author

L0rz commented Mar 16, 2022

for me it works! and i dont use the TabOrder plugin but many other!

Thx for the fast support

@leveos
Copy link

leveos commented Mar 16, 2022

Just merged in the rename, and I've experimentally verified it works with TabOrder also installed. @leveos - when you have a moment, please give it a try again (uninstall & reinstall 1.4.1) and let me know if it works for you.

@smartin015 I can confirm that it is working perfectly with tab order installed now. just set up a large queue i will update this if for some reason it doesn't move onto the second file but i see no issues as of now.

@leveos
Copy link

leveos commented Mar 17, 2022

i just want to update you that continuous print is working flawlessly with my setup now.

I also want to add that i really appreciate the optomizations you have done. the plugin is much more responsive now to adding and removing items from the queue and the gui is much more compact so i can see more items at a glance.

@Tiri1i1
Copy link

Tiri1i1 commented Mar 17, 2022

I am sadly still having issues with the queue going forward.
I am using this with Klipper on my CR-30, with the following G-Code between prints (same as before)
G28 X0 Y0 Z0
G91 ; Set relative for lift
G0 Z10 F200
G90 ;back to absolute positioning
G28 X0 Y0 Z0; home

The queue is showing up well on the Plugin tab, and it does start with the first model, however after it's finished it cannot continue to the 2nd one.

@smartin015
Copy link
Owner

i just want to update you that continuous print is working flawlessly with my setup now.

I also want to add that i really appreciate the optomizations you have done. the plugin is much more responsive now to adding and removing items from the queue and the gui is much more compact so i can see more items at a glance.

Thanks @leveos, that really means a lot and encourages me to do more :) I'm going to bump the version to 1.4.2 and close out this bug now that we have multiple fixes confirmed.

I am sadly still having issues with the queue going forward. I am using this with Klipper on my CR-30, with the following G-Code between prints (same as before) G28 X0 Y0 Z0 G91 ; Set relative for lift G0 Z10 F200 G90 ;back to absolute positioning G28 X0 Y0 Z0; home

The queue is showing up well on the Plugin tab, and it does start with the first model, however after it's finished it cannot continue to the 2nd one.

Sorry your setup is still misbehaving @Tiri1i1 - can you please open a new bug report and complete all the steps in the template?

It's not busywork - it actually helps me root-cause faster with the system bundle and logs attached, and what you're reporting sounds like a different issue vs this one. Thanks!

@leveos
Copy link

leveos commented Oct 11, 2022 via email

@smartin015
Copy link
Owner

smartin015 commented Oct 11, 2022

Hey @leveos - this should have been fixed long ago. We're on version 2.1.1 in the main branch. If you're still having trouble, please fully uninstall the plugin and then install it again from the plugin manager (i.e. don't try to install via zip file).

If there's still problems, please open a new issue as the cause would probably be different at this point. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants