Skip to content

Commit dbddf3e

Browse files
authored
fix: printer parsing crashing on certain systems (#117)
- 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.
1 parent 00bdec9 commit dbddf3e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

apps/server/src/utilities/printer.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class PrinterService {
4444
this.logger.warn('Printer disabled or null printerName');
4545
return null;
4646
} catch (error) {
47-
this.logger.error('Error retrieving printers list', error);
47+
this.logger.error(`Error retrieving printers list: ${error}`, error);
4848
return null;
4949
}
5050
}

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fbw-simbridge",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"description": "The simbridge server for FBW addons for various tasks the addons themselves can't achieve",
55
"author": "",
66
"private": false,
@@ -72,7 +72,7 @@
7272
"nest-winston": "^1.6.2",
7373
"node-hide-console-window": "^2.2.0",
7474
"open": "^8.4.0",
75-
"pdf-to-printer": "^5.2.0",
75+
"pdf-to-printer": "5.3.0",
7676
"pdfjs-dist": "^2.13.216",
7777
"pdfkit": "^0.13.0",
7878
"react": "^17.0.0",

0 commit comments

Comments
 (0)