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

Commands send from the Printer Control Terminal Double Wrapped Array #240

Closed
MTrab opened this issue Jan 29, 2021 · 16 comments
Closed

Commands send from the Printer Control Terminal Double Wrapped Array #240

MTrab opened this issue Jan 29, 2021 · 16 comments
Assignees
Labels
bug Something isn't working / good issue report fixed on dev This issue has been fixed and is on its way

Comments

@MTrab
Copy link

MTrab commented Jan 29, 2021

To better help the developer understand your issue, please fill in the information below. Failing to do so will waste the developer and your own time in sorting the issue. Thanks!

Describe the bug
When sending a command from Octofarm, it looks like the string is formattet in some strange way, resulting in Octoprint responding with an error

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Printer'
  2. Write G or M command in text field
  3. Press send
  4. See error

Expected behavior
M or G codes being sent correctly, as entered in the text field.

Screenshots
image

Versions (please complete the following information):

  • NodeJS Version [e.g. 13] 12.16.3-0017
  • OctoFarm Version [e.g. 1.5.5.7] 1.1.9-dev5
  • OctoPrint Version [e.g. 1.4.1] 1.5.3
  • OctoPrint Plugins [e.g. bed visualiser, octoklipper, printtimegenius] Enclosure Plugin

Additional context

@MTrab MTrab added the bug Something isn't working / good issue report label Jan 29, 2021
@NotExpectedYet
Copy link
Member

Could you screenshot the console output please? Think something else is going on here as I can't reproduce with your command.

image

@MTrab
Copy link
Author

MTrab commented Jan 30, 2021

Console gives absolutely no output on this

@NotExpectedYet
Copy link
Member

I'll need to repro to figure it out as it's client side and that's all compiled for the user.

When typing in the command for me it sends fine, even with mutli-lined sends. Same for enter fire, and Button press fire.

@NotExpectedYet NotExpectedYet added question cant-reproduce Couldn't reproduce bug, more information requested labels Feb 2, 2021
@MTrab
Copy link
Author

MTrab commented Feb 3, 2021

Issue is the same in all browser and on both printers.
Just a tought - could this be some kind of language interpretation?
My system language is Danish, so is my input locale.

@NotExpectedYet
Copy link
Member

Issue is the same in all browser and on both printers.
Just a tought - could this be some kind of language interpretation?
My system language is Danish, so is my input locale.

That's a good thought. I gather nothing comes up in the console when you send it apart from the octoprint error?

I will have a search and see if there's any issues with language parsing from an input. If that is the case it's probably my new line interpretation or that's my guess.

I presumed it would be fine now a days. I'll put some more console outputs in a push tomorrow for you to try if you'd have time?

Just trying to cover all basis for now, not sure which one of the above would be most fruitful.

@NotExpectedYet
Copy link
Member

What's confusing is theres that little u before the array quotes which I've never seen before.

@MTrab
Copy link
Author

MTrab commented Feb 3, 2021

I'll fire up my work laptop later today, it's with EN-US localization - the we can see if that makes a difference.

@NotExpectedYet
Copy link
Member

NotExpectedYet commented Feb 3, 2021

It's all sent and managed client side at the minute so fingers crossed. I'll see about putting some UTF-8 encoding on the field should resolve it.

@MTrab
Copy link
Author

MTrab commented Feb 3, 2021

Nope - still doesn't work on the laptop.
But now the terminal windows actually are not showing anything anymore :/

I can see on the Octoprint terminal pane that the error are the same.

@NotExpectedYet
Copy link
Member

It's something else then. I wonder if it's related to the profile bug. Could you fire me through your state and API logs please?

@MTrab
Copy link
Author

MTrab commented Feb 3, 2021

@NotExpectedYet NotExpectedYet moved this from To Do to Awaiting Feedback in 1.1.9 - I don't drink but I sure code like I do! Feb 6, 2021
NotExpectedYet added a commit that referenced this issue Feb 6, 2021
Fixed #240

Signed-off-by: notexpectedyet <online@notexpectedyet.com>
1.1.9 - I don't drink but I sure code like I do! automation moved this from Awaiting Feedback to Done Feb 6, 2021
@MTrab
Copy link
Author

MTrab commented Feb 6, 2021

Unfortunately still an issue :(

From console
192.168.1.9-1612643408065.log

@NotExpectedYet NotExpectedYet reopened this Feb 6, 2021
@NotExpectedYet
Copy link
Member

Well this one's a PIA, even worse the array is there formatted perfect in the error output :/

@NotExpectedYet
Copy link
Member

Right so I've double checked everything on this side of things, the function, the log... it for all intensive purposes is sending the correct array, and that's even outputted in your log you sent. I see the individual key press G, 2, 8 and then the array created on the input ["G28"].

I put another set of logging in to see what's getting fired.

image

You should have something like the above.

If that is showing correctly, then I'd say this was something to do with OctoPrint specifically.

@davidzwa davidzwa changed the title [BUG] Sending commands from Octofarm seems malformed Sending commands from OctoFarm seems malformed Feb 21, 2021
@davidzwa davidzwa removed the question label Feb 21, 2021
@MTrab
Copy link
Author

MTrab commented Feb 21, 2021

This is what I see in 1.1.11-dev12

image

@NotExpectedYet
Copy link
Member

I've found a bug, somehow that Array is getting double quoted before sending but I can't understand why that is only not working on your system.

I'll update the title to reflect this and have a look.

@NotExpectedYet NotExpectedYet changed the title Sending commands from OctoFarm seems malformed Commands send from the Printer Control Terminal Double Wrapped Array Mar 5, 2021
@NotExpectedYet NotExpectedYet removed the cant-reproduce Couldn't reproduce bug, more information requested label Mar 5, 2021
@NotExpectedYet NotExpectedYet moved this from To do to In progress in 1.1.13 - Pushup Party Mar 17, 2021
@NotExpectedYet NotExpectedYet moved this from In progress to Done in 1.1.13 - Pushup Party Mar 17, 2021
davidzwa pushed a commit that referenced this issue Mar 17, 2021
davidzwa added a commit that referenced this issue Mar 17, 2021
* Fix send button not flashing on success/failure of command

* Fix the return to secondary class

* Fixed issue #240 - Commands sent from Printer Control Terminal double wrapped array

* updated to reflext changes

* compile client

* Remove console log, rebuild runners

Co-authored-by: David Zwart <davidzwa@gmail.com>
@davidzwa davidzwa added the fixed on dev This issue has been fixed and is on its way label Mar 17, 2021
NotExpectedYet added a commit that referenced this issue Apr 24, 2021
* Fix send button not flashing on success/failure of command

* Fix the return to secondary class

* Fixed issue #240 - Commands sent from Printer Control Terminal double wrapped array

* updated to reflext changes

* compile client

* Remove console log, rebuild runners

Co-authored-by: David Zwart <davidzwa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working / good issue report fixed on dev This issue has been fixed and is on its way
Development

No branches or pull requests

3 participants