-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve Error Handling #74
Comments
@niemalsnever, if you could grab an example of when the We will have a beta version later in 2023-April with better printing error handling, and a few minor enhancements.. |
@mgobat It took a while but today the
The error reads:
Hope that helps. |
Thank you, @niemalsnever. We will take a look. We've been looking into the "invalid deviceName" problem. The underlying framework we are using isn't trapping that particular error.; it appears to be a known defect in the framework. It also appears that a newer version of the framework may solve the problem. Unfortunately, a newer version of the framework breaks the ability to run the application as a Windows Service. |
@niemalsnever, please give the latest beta a try, if you like: https://github.com/ExLibrisGroup/alma-print-daemon/releases/tag/v2.2.0-beta-02 |
@mgobat After upgrading to v2.2.0-beta-02 the daemon it crashed again on the second print job. Screenshot is attached: |
@niemalsnever, yes, sorry. I should have indicated that this beta doesn't address that particular issue. Please see earlier comment about the difficulty of trapping the "invalid deviceName" error. This beta will hopefully address the "cannot read property 'letter' of undefined error". |
@mgobat Ah, yes, okay, sorry! I will pay attention whether the cannot read property 'letter'... error will show up again. Like I said it didn't occur for the past several weeks but today (before upgrading to the new beta version it occured twice. Please regard my last comment as an update for which part of the code throws the invalid deviceName exception. It's very unfortunate that the new version of the library breaks the "running the APD as a service" capability, I hope that can be addressed in the future. Best Regards |
No worries, @niemalsnever. My comment wasn't clear. Thanks for keeping a watch for the "cannot read property 'letter'" error. When errors occur, I'm hoping the new logging might help figure out the problem. We'll be looking to do some additional logging in another version. |
* Minor enhancements GitHub Issue #10 and simple implementation of #42. * Beta version with additional error handling, part 1 Some of GitHub issue #74. This check-in is for better printer error handling when running as an app. * Attempt at better error trapping/logging Work in progress... * Change error handling a bit GitHub Issue #74 * Write to log upon successful print * Remove try/catch in printing Electron printing doesn't catch "invalid deviceNmae" error. The try/catch/finally block did, but it caused a problem for printing when there were no printer issues. Remove try/catch/finally. Comment out some superfluous "WriteLog" statements. * More for issue #74 * Implement global configuration option Addresses GitHub issue #44 and parts of issue #76. * Trap errors writing to log file * Remove beta version number for 2.2 general release
Hello,
this will be a somewhat general issue, but it's about one of our biggest gripes with the Alma Print Daemon. We are running a single centralized instance of the Alma Print Daemon handling all print jobs for our main library and the other branches. As can be expected for a software calling itself a "Daemon", runtime errors should not stop the general execution of the program and require manual intervention to clear. Errors should be logged, to a proper service log, and may even show up in the GUI, but must never stop the software from running.
In case of our Alma Print Daemon (shortened to APD from here on out), we regularly have raw JavaScript exceptions show up, which completely halt the execution of the APD and therefore the retrieval and execution of new print jobs. When this occurs, the error message must be manually acknowledged and the APD application restarted. This in turn basically means we need to have someone logged in to the server at all times, being ready to click "OK" and restart APD.
One such error message occurs, when the network printer which is supposed to print the currently worked on print job is unavailable. My guess as to why this occurs is that the printers are actually mapped to the account running the Daemon through Windows Group Policies, which are re-evaluated in regular intervals. When this happens to coincide with the job retrieval interval defined in the APD, the following exception may be thrown:
To prevent this error, maybe the print job retrieval and printing routine can be adapted in such a way that the job is retrieved and then tried to print, if printing is successful, the next job is retrieved, if printing is not successful, the job is left in the printout queue (marked as not printed), the job ID is logged, and the print job can be retried in the next retrieval interval, in this case the next job is also fetched and printed.
The other frequently shown error message reads
Cannot read property 'letter' of undefined
. I do not have a current example, but I'm happy to provide one, as soon as the error shows up.Please improve (or should I say implement) error handling and make the Alma Print Daemon actually robust enough have it run unattended, i.e. as a proper daemon. If you need any further information or context I am happy to provide it, as this issue has a real impact on our library's operations.
Regards
Sven Pagel
Edit: New Screenshot, updated error message, after updating to newest version 2.1.0 of the Alma Print Daemon, as the line number in the stacktrace has changed quite drastically.
The text was updated successfully, but these errors were encountered: