Body:
I’m working on an Electron.js application that should generate a PDF using jsPDF when a button is clicked. The application runs without issues until I attempt to generate the PDF, at which point nothing happens. Additionally, I’m seeing error messages in the console related to Vulkan driver compatibility and VSync parameters.
Issue:
The ‘Generate PDF’ button click does not trigger the PDF generation as expected, and the following errors are logged in the console:
TU: error: ../src/freedreno/vulkan/tu_knl.cc:232: device /dev/dri/renderD128 (i915) is not compatible with turnip (VK_ERROR_INCOMPATIBLE_DRIVER)
[ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
These errors suggest a potential issue with the Vulkan driver and Electron’s display synchronization.
Code Snippet:
Here’s the relevant part of my renderer.js
:
const { ipcRenderer } = require('electron');
const jsPDF = require('jspdf');
const generatePDF = () => {
// ... code to collect form data ...
const pdf = new jsPDF();
// ... code to add content to PDF ...
pdf.save('output.pdf');
};
document.getElementById('generatePdf').addEventListener('click', generatePDF);
What I’ve Tried:
- Ensuring that the paths to assets and save locations are correct.
- Checking permissions for file system access.
Question:
What could be causing the PDF generation to fail upon button click within an Electron.js environment, and how can I resolve the Vulkan driver and VSync parameter errors that appear in the console?
Any insights or suggestions would be greatly appreciated!