The network can corrupt packages or the printer can only send partial messages. Cura shouldn't break on that. It's just a warning. This warning says more than the original stack trace does, because the stack trace only said like 'unexpected comma there and there' while this message actually says what message contained the error.
The getSafeaAuthKey prints a key of the same length, but only the last 5 chars are real. The rest is blurred out with *
THis is a bit like how most payment services hide your credit card number.
There was the problem that you'd click on pre-heat, so locally it would display the time-out. Then a package came in with the out-dated print status saying that the printer is not pre-heating, so the pre-heat was cancelled on Cura's side. Then the next status update came in saying that the pre-heat is now busy, so the pre-heat is resumed on Cura's side. So the button was flicking back and forth once after pressing. This commit makes Cura ignore any status updates that come while the put-request is still going on, because they may be outdated. It'll appear nicer to the user, mostly.
Contributes to issue CURA-3360.
If multiple instances of Cura are running or Cura is restarted, it now properly syncs the remaining pre-heat time with the printer, so that all instances display the proper time.
There's still a bug in here that pressing cancel has no effect the first time since the remaining pre-heat time is updated immediately from the printer before the command to cancel got through remotely. I'll see what I can do to amend that. Also, cancelling is not yet synced.
Contributes to issue CURA-3360.
When the time passes normally it doesn't trigger this signal but just go on counting, but when the pre-heat starts or cancels it updates via this signal. This is handy for the future, when we want to update the remaining time from the printer information. However for now it is also nice because we can make the pre-heat timer dependent on this signal so we know when to have it running. This fixes the problem that the pre-heat seems to have been cancelled in the GUI when you switch away the tab, because the timer running is now dependent on the property rather than always false.
Contributes to issue CURA-3161.