Skip to content

Commit

Permalink
fix: printer parsing crashing on certain systems (#117)
Browse files Browse the repository at this point in the history
- Use the same version of pdf-to-printer (newer versions have an error
in the validation of the output and crash) as the installer.

- Improve logger for the printer service to print the actual error if no
stacktrace is available.

Note: this is meant to be a quick fix, the package pdf-to-printer is
archived currently, we might need to fork it or use another library in
the future. Also the logging config should be looked at in the future as
this error was not visible without printing it directly.
  • Loading branch information
Saschl authored May 13, 2024
1 parent 00bdec9 commit dbddf3e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/server/src/utilities/printer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class PrinterService {
this.logger.warn('Printer disabled or null printerName');
return null;
} catch (error) {
this.logger.error('Error retrieving printers list', error);
this.logger.error(`Error retrieving printers list: ${error}`, error);
return null;
}
}
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fbw-simbridge",
"version": "0.5.3",
"version": "0.5.4",
"description": "The simbridge server for FBW addons for various tasks the addons themselves can't achieve",
"author": "",
"private": false,
Expand Down Expand Up @@ -72,7 +72,7 @@
"nest-winston": "^1.6.2",
"node-hide-console-window": "^2.2.0",
"open": "^8.4.0",
"pdf-to-printer": "^5.2.0",
"pdf-to-printer": "5.3.0",
"pdfjs-dist": "^2.13.216",
"pdfkit": "^0.13.0",
"react": "^17.0.0",
Expand Down

0 comments on commit dbddf3e

Please sign in to comment.