Skip to content

Electron Forge template-webpack produces GTK 2/3/4 errors on Debian 12 #3930

@steve962

Description

@steve962

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Forge version

7.8.0

Electron version

v36.1.0

Operating system

Debian 12 (Linux 6.1.0-33-amd64)

Last known working Forge version

Unknown

Expected behavior

When creating a new Electron app using Electron Forge's template-webpack using the command:

npx create-electron-app@latest my-new-app --template=webpack

...from it's documentation page (https://www.electronforge.io/templates/webpack-template), and then run it with npm start, it ought to work. (From the code, it appears it would open a Hello World window...)

Actual behavior

On my Debian 12 system, it generates the following error:

(process:2276788): Gtk-ERROR **: 12:09:23.638: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported

...and exits immediately.

Steps to reproduce

Go into a Debian 12 installation and run:

npx create-electron-app@latest my-new-app --template=webpack
cd my-new-app
npm start

Additional information

Here is the full output of the test I ran just before filing this issue:

steveb@steveb-linux2:~/Development/Electron/TestApps$ npx create-electron-app@latest my-new-app --template=webpack
✔ Resolving package manager: npm
✔ Resolving template: webpack
  › Using @electron-forge/template-webpack (local module)
✔ Initializing directory
✔ Initializing git repository
✔ Preparing template
✔ Initializing template
✔ Installing template dependencies

steveb@steveb-linux2:~/Development/Electron/TestApps$ cd my-new-app
steveb@steveb-linux2:~/Development/Electron/TestApps/my-new-app$ npm start

> my-new-app@1.0.0 start
> electron-forge start

✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [0.1s]
✔ Running generateAssets hook
✔ Running preStart hook

(process:2276788): Gtk-ERROR **: 12:09:23.638: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported
steveb@steveb-linux2:~/Development/Electron/TestApps/my-new-app$ 

For context, I ran into this problem as I was attempting to take a rather complex Electron application I'd been working on for some months and convert it so I could use Electron Forge with Webpack to package the files for internal distribution testing on Linux and Windows. (I was using the ffmpeg-static-electron-forge package and couldn't figure out how to package it to make it work...) After doing a deep dive through the Forge docs, the Webpack docs, and restructuring the app to configure Webpack and package without errors, I ran into this bug on trying to execute the program. My program has some logging in main.js which was displayed, so it loaded and launched fine -- it looks like the problem occurs when you first attempt to open the main window.

For reference, I'm using Node 23.8.0 and npm 10.9.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions