walterww
-
Posts
5 -
Joined
-
Last visited
Content Type
Forums
Events
3D Prints
Posts posted by walterww
-
-
I've got a script running that pauses our Ultimakers when they print without authorization.
The new firmware seems to crash when the scripts tries to pause the printer while it is resuming from a prior pause.
The API command I'm using is PUT /print_job/state with payload {"target": "pause"} and I'm calling it without checking first if the printer is already paused or has just been unpaused and not resumed printing yet.
This worked flawlessly for years now, so I think this is due to a change in the last firmware update.
So in order to reproduce: Start a print. Pause the print. Resume and immediately send PUT /print_job/state with payload {"target": "pause"}
The print bed goes down and I think it crashes.
On the display there's an ERR999 and Reboot button
The Management Console says: Unhandled exception from ProcedureStep TEST_IF_NOT_PAUSED
And the log file says:
QuoteFeb 24 09:26:47.401979 ultimakersystem-xxx PrinterService[1611]: INF - printJobStateProperty:79 - New print job state: resuming -> pausing
Feb 24 09:26:47.407767 ultimakersystem-xxx PrinterService[1611]: INF - printerService:169 - Procedure start: PAUSE_PRINT: TEST_IF_NOT_PAUSED
Feb 24 09:26:47.420796 ultimakersystem-xxx PrinterService[1611]: INF - printerService:195 - Procedure next step: PAUSE_PRINT: TEST_IF_NOT_PAUSED
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: ERR - procedureStep:113 - Exception caught from step: TEST_IF_NOT_PAUSED
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: Traceback (most recent call last):
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: File "/usr/share/griffin/griffin/printer/procedures/procedureStep.py", line 89, in _run
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: outcome = self.run()
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: File "/usr/share/griffin/griffin/printer/procedures/print/testPausedStep.py", line 24, in run
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: raise ValueError("expected the system to be %s but is %s" % (toString(self._expected), toString(not self.
_expected)))
Feb 24 09:26:47.427072 ultimakersystem-xxx PrinterService[1611]: ValueError: expected the system to be running but is paused
Feb 24 09:26:47.494983 ultimakersystem-xxx MarvinService[956]: INF - marvinService:273 - Reporting fault <Fault: level=2 code=102 message='Unhandled exception from ProcedureS
tep TEST_IF_NOT_PAUSED' data='dbus.Dictionary({}, signature=dbus.Signature('sv'))'> to Sentry...
Feb 24 09:26:47.710087 ultimakersystem-xxx Okuda[2514]: INFO Okuda.DBus.PrinterServiceProxy Processing PrinterError(level: 2, code: 102, msg: 'Unhandled exception from Pr
ocedureStep TEST_IF_NOT_PAUSED')
Feb 24 09:26:47.710087 ultimakersystem-xxx Okuda[2514]: "149021.725 qml [bootup] ErrorDialog overlay: Code,Level,text= 102 2 An unexpected error has occurred. Restart the pri
nter, or go to ultimaker.com/ER999."
Feb 24 09:26:47.710087 ultimakersystem-xxx Okuda[2514]: INFO Okuda.Components.screen_saver modeChanged: Mode.Printing --> Mode.AttentionRequired
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - procedure:470 - PausePrintProcedure(key='PAUSE_PRINT', outcome=OutcomeBase.Error) transitioning from 'T
estPausedStep(key='TEST_IF_NOT_PAUSED')' > 'None'
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - printJobStateProperty:79 - New print job state: pausing -> resuming
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - procedure:355 - Message: 'ABORT' for procedure 'PrintProcedure(key='PRINT', outcome=None)'
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - printerService:174 - Procedure finished: PAUSE_PRINT
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - procedure:322 - PrintProcedure(key='PRINT', outcome=None) is going to be aborted (machine:False)
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - printerStateProperty:80 - State change: printing -> error
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - procedureStep:161 - Aborting step: PrintFileStep(key='PRINTING') (by_machine:False)
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: ERR - controller:906 - Halting ALL procedures
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - printFileStep:44 - Print procedure aborted
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - controller:616 - Setting paused state to: False
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - charonFileHandler:147 - File handler aborted.
Feb 24 09:26:47.713932 ultimakersystem-xxx PrinterService[1611]: INF - timeEstimator:119 - Warning print was aborted! -
@Josnoww Wow, this is really helpful! Thank you. I'm not afraid of a little SSH.
@tomnagel Yes I can explain that. Short version: I didn't know that and generate new API keys after every upgrade.
Yes that sounds stupid, but here's the long version:
We are a Maker Space where people are allowed to use our machines on their own. So in order to keep track of who does what, and also to limit the use to active users (i.e. paying customers) who attended the respective safety course, we use a management system (fabman.io) that uses NFC readers to authenticate users and activate machines. Many machines are simply switched on and off using a relay, but for the UltimakerS I was able to code a python script that runs ON THE PRINTER, watches printer status and checks if anyone has been authenticated when a job starts. If not, the job is paused. And it also logs how much material was used by whom, which saves us a lot of trouble. I love you for this! 😄
This script is purged from the printer's filesystem every time a new firmware version is installed; but that's OK for me, I wrote an installation script that copies the script to the printers and configures them to start it automatically as well.
I was not aware that the API keys are retained during a normal firmware upgrade, as my keys never leave the printers... my installation script creates a new key after every reinstall. I think @Josnoww just helped me getting rid of having to do that.
(I could run the script on a server in our network instead of on the printers, but a creative user could simply turn off a printer's WiFi or network and print for free. I'm quite sure we'd figure out who it was, but that costs time and none the less we try to make our authentication system as secure as possible.)
- 1
-
Hi Tom, thank you for your help!
We will probably downgrade to 7.1.3 and skip firmware 8.1.
Unless. is there perhaps another workaround?
Is there a config file or something similar I could modify in DEV mode/SSH console in order to enable an id/key pair?
-
Hello there,
we're controlling a few Ultimakers through the local API and depend heavily on this feature. It seems the new version 8.1 doesn't show the authentication method described in the API documentation does not work anymore:
[qutote]To get a valid username/password combination, the following process can/should be followed.
1) POST /auth/request with 'application' and 'user' as parameters. The application name and user name will be shown to the user on the printer. The reply body will contain a json reply with an 'id' and 'key' part.[/quote]
The request is not shown on the printer's display anymore (and the id/key pair can therefore not be allowed). Without this some API calls don't work.
Firmware 8.1 Bug? ERR999 on API "pause" call,
in Firmware
Posted
Thank you very much!
[quote]So adding the check would probably be a good idea anyway.[/quote]
Yes, I will do that!