It seems that the specified Electron version in the ‘package.json’ cannot be found. Despite trying to install ‘electron@6.1’ as suggested in the readme, we encounter the same issue.
Upon further investigation, I checked the latest Electron version on npm, which is v26.2.2. I decided to update to this version, and the packages are successfully installed. However, the ‘exportToPDF’ service no longer works, and it displays the following error:
Error: Script failed to execute, which normally indicates an error was thrown. Please check the renderer console for the error.
at node:electron/js2c/renderer_init:2:16978
at EventEmitter.<anonymous> (node:electron/js2c/renderer_init:2:11167)
at EventEmitter.emit (node:events:513:28)
at Object.onMessage (node:electron/js2c/renderer_init:2:9240)
(Use 'Electron --trace-warnings ...' to locate where the warning was generated)
Upon debugging, I suspect that the newer version of Electron may be causing an issue in ‘gantt/pdf/electron-template.js’ due to the following code:
Hello,
Unfortunately, I couldn’t reproduce the issue on my computer. When I install the modules, I have the 8.2.5 version, and it is possible to download that version from Github or NPM:
Could you clarify the operating system and device you are using? Is it OSX with the M1 processor?
At the time Electron 8 was released, the Darwin-ARM64 architecture didn’t exist. It is the same with the older versions, and if you don’t use Windows, you don’t need to install versions older than 8.
The newer Electron versions removed the way to load external scripts that we need to evaluate the page sizes, so if you try to install them, it will not work.
I will inform the dev team about that issue, and they will investigate if there is a way to upgrade the code to the newer versions of Electron.
Hello,
Thank you for the clarification.
I checked that Electron 11 still works for exporting PDF files, while the 12th version doesn’t work.
The release note says they added the darwin arm64 builds as an experimental feature: https://releases.electronjs.org/release/v11.0.0
So, you can try installing that version and check if it works on your computer:
npm install electron@11
Regarding the issue with the g++-multilib package, it can be that the package is not ported to that architecture. Unfortunately, I don’t have a Mac computer with that architecture, so I cannot suggest what actually you need to do.
The current Dockerfile uses node.js 14 which is based on Debian 9. You can experiment with different versions of the base image in the Docker package.
Hello,
The dev team updated the PDF export module to the 0.7.0 version. This includes the update to Electron 29, so, it should work correctly on Mac M1 processors. It also includes the features of adding the header and footer on each page.
Here is full list of changes:
You can download the new version from the Client’s Area:
Hello,
I am using the local export module DHTMLX Export module to PDF/PNG 0.7.7 (for Gantt/Scheduler)
When I was building, I encountered the following problem:
Deploying in the K8S environment based on the arm64 architecture, exporting PNG from Gantt chart resulted in an error as shown in the figure, and the logs are as follows. At the same time, a series of adjustments were made according to the prompts given by AI, but the error still occurred.
By checking the code, the following issues were found:,
According to the code retrieved by AI, the arm64 architecture is reporting an error. Please help confirm if there is a problem and how to solve the error I mentioned above.
Looking forward to your prompt response
Thanks
Hello,
We didn’t test the export module in the ARM64 environment, so I cannot suggest if you need additional configuration for it. Downgrading the Electron version is not recommended as the earlier versions may have different API, so there is no guarantee it will work.
The primary issue should be related to something different. According to the logs, Electron crashes when it tries to start. Also, the logs show that you run the export module with the option for the headless servers. Electron 29 supports the ARM64 architecture, so, it is not clear why the issue occurs.
LLMs suggest that there are Kubernetes limitations, for example that the --no-sandbox option is blocked.
However, the 0.7.7 is not the latest version of the PDF export module. You can download the 0.8.0 version that uses Puppeteer instead of Electron. There, the Chromium version is newer, it doesn’t require the xvfb package to work, and the Docker file includes instructions to download the native builds for the current CPU architecture. So there are more chances it will work in your environment.
I recommend installing the 0.8.0 version as Electron won’t be used in the future versions.
Also, please don’t post the source code of the PDF export module.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan