TeamTernate / infinite-music-discs

Tool for adding lots of custom music discs to Minecraft
82 stars 15 forks source link

[Solved] Could not load the Qt platform plugin "xcb" in "" even though it was found. #136

Closed sqdnoises closed 3 months ago

sqdnoises commented 3 months ago

Hi, I have used this program long ago on windows and it had worked perfectly fine but this is my first time trying it on linux and it seems to not work.

I've searched how to fix this error in countless websites and still do not know how to fix this problem. When I download the binary from releases or run it from source code (after installing the requirements) and run it, this is what I get:

sqd@sqd-aspire:~/imd$ ./imd-gui 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vkkhrdisplay, minimalegl, eglfs, vnc, xcb, wayland-egl, linuxfb, wayland, offscreen, minimal.

Aborted (core dumped)
sqd@sqd-aspire:~/imd$ 
System Information OS: **Linux Mint 21.3 Virginia Cinnamon Edition** ```prolog System: Kernel: 5.15.0-101-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy Machine: Type: Laptop System: Acer product: Aspire A615-51G v: V2.02 serial: Mobo: KBL model: Charmander_KL v: V2.02 serial: UEFI: Insyde v: 2.02 date: 01/03/2019 Battery: ID-1: BAT1 charge: 32.9 Wh (88.0%) condition: 37.4/48.9 Wh (76.5%) volts: 16.8 min: 15.2 model: LG 004B384234314341 type: Li-ion serial: status: Charging CPU: Info: quad core model: Intel Core i5-8250U bits: 64 type: MT MCP smt: enabled arch: Coffee Lake rev: A cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB Speed (MHz): avg: 899 high: 900 min/max: 400/1600 cores: 1: 900 2: 900 3: 899 4: 900 5: 900 6: 900 7: 900 8: 900 bogomips: 28800 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx Graphics: Device-1: Intel UHD Graphics 620 vendor: Acer Incorporated ALI driver: i915 v: kernel ports: active: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300 Device-2: NVIDIA GP108M [GeForce MX150] vendor: Acer Incorporated ALI driver: nvidia v: 545.29.06 pcie: speed: 8 GT/s lanes: 4 bus-ID: 01:00.0 chip-ID: 10de:1d10 class-ID: 0302 Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa gpu: i915 display-ID: :0 screens: 1 Screen-1: 0 s-res: 1920x1080 s-dpi: 102 s-size: 480x270mm (18.9x10.6") s-diag: 551mm (21.7") Monitor-1: eDP-1-1 mapped: eDP-1 model: Chi Mei Innolux res: 1920x1080 hz: 60 dpi: 142 size: 344x193mm (13.5x7.6") diag: 394mm (15.5") modes: 1920x1080 OpenGL: renderer: NVIDIA GeForce MX150/PCIe/SSE2 v: 4.6.0 NVIDIA 545.29.06 direct render: Yes Audio: Device-1: Intel Sunrise Point-LP HD Audio vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d71 class-ID: 0403 Sound Server-1: ALSA v: k5.15.0-101-generic running: yes Sound Server-2: PulseAudio v: 15.99.1 running: yes Sound Server-3: PipeWire v: 0.3.48 running: yes Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Acer Incorporated ALI driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.1 chip-ID: 10ec:8168 class-ID: 0200 IF: enp2s0f1 state: down mac: Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Lite-On driver: ath10k_pci v: kernel pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 168c:0042 class-ID: 0280 IF: wlp3s0 state: up mac: Bluetooth: Device-1: Lite-On Qualcomm Atheros QCA9377 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-5:2 chip-ID: 04ca:3015 class-ID: e001 Report: hciconfig ID: hci0 rfk-id: 0 state: up address: bt-v: 2.1 lmp-v: 4.2 sub-v: 25a hci-v: 4.2 Drives: Local Storage: total: 238.47 GiB used: 40.87 GiB (17.1%) ID-1: /dev/sda vendor: SanDisk model: SD7TB3Q-256G-1006 size: 238.47 GiB speed: 6.0 Gb/s type: SSD serial: rev: 0306 scheme: GPT Partition: ID-1: / size: 68.71 GiB used: 40.83 GiB (59.4%) fs: ext4 dev: /dev/sda3 ID-2: /boot/efi size: 486 MiB used: 32.7 MiB (6.7%) fs: vfat dev: /dev/sda1 Swap: ID-1: swap-1 type: partition size: 15.26 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda2 USB: Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 Device-1: 1-1:3 info: Razer USA DeathAdder Essential type: Mouse,Keyboard driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 500mA chip-ID: 1532:0098 class-ID: 0300 Device-2: 1-5:2 info: Lite-On Qualcomm Atheros QCA9377 Bluetooth type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 04ca:3015 class-ID: e001 Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 Sensors: System Temperatures: cpu: 55.0 C mobo: 27.8 C gpu: nvidia temp: 56 C Fan Speeds (RPM): N/A Repos: Packages: 2874 apt: 2865 snap: 9 No active apt repos in: /etc/apt/sources.list Active apt repos in: /etc/apt/sources.list.d/danielrichter2007-grub-customizer-jammy.list 1: deb [signed-by=/etc/apt/keyrings/danielrichter2007-grub-customizer-jammy.gpg] https: //ppa.launchpadcontent.net/danielrichter2007/grub-customizer/ubuntu jammy main Active apt repos in: /etc/apt/sources.list.d/github_git-lfs.list 1: deb [signed-by=/etc/apt/keyrings/github_git-lfs-archive-keyring.gpg] https: //packagecloud.io/github/git-lfs/linuxmint/ virginia main 2: deb-src [signed-by=/etc/apt/keyrings/github_git-lfs-archive-keyring.gpg] https: //packagecloud.io/github/git-lfs/linuxmint/ virginia main Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable main Active apt repos in: /etc/apt/sources.list.d/ngrok.list 1: deb https: //ngrok-agent.s3.amazonaws.com buster main Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 1: deb https: //mirrors.cicku.me/linuxmint/packages virginia main upstream import backport 2: deb http: //mirrors.iitd.ac.in/ubuntu jammy main restricted universe multiverse 3: deb http: //mirrors.iitd.ac.in/ubuntu jammy-updates main restricted universe multiverse 4: deb http: //mirrors.iitd.ac.in/ubuntu jammy-backports main restricted universe multiverse 5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse Active apt repos in: /etc/apt/sources.list.d/spotify.list 1: deb http: //repository.spotify.com stable non-free Active apt repos in: /etc/apt/sources.list.d/vscode.list 1: deb [arch=amd64,arm64,armhf] https: //packages.microsoft.com/repos/code stable main Info: Processes: 293 Uptime: 38m wakeups: 4 Memory: 7.63 GiB used: 2.11 GiB (27.7%) Init: systemd v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12 Client: Cinnamon v: 6.0.4 inxi: 3.3.13 ```

Steps to reproduce:

Method 1: Using the binary

  1. Download the tar.gz file for linux from https://github.com/TeamTernate/infinite-music-discs/releases/download/v1.6.2/imd-gui-linux64.tar.gz
  2. Extract the archive using tar -xvf imd-gui-linux64.tar.gz
  3. Make the imd-gui file an executable using chmod +x imd-gui
  4. Run the executable using ./imd-gui

Output:

sqd@sqd-aspire:~/imd$ ./imd-gui 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vkkhrdisplay, minimalegl, eglfs, vnc, xcb, wayland-egl, linuxfb, wayland, offscreen, minimal.

Aborted (core dumped)
sqd@sqd-aspire:~/imd$ 

Method 2: By running the source code Shell: bash 5.1.16 Python version currently installed: 3.10.12

  1. Clone the repository using git clone https://github.com/TeamTernate/infinite-music-discs.git
  2. cd into the newly cloned folder cd infinite-music-discs
  3. Create a virtual environment python3 -m venv .venv
  4. Activate the virtual environment source .venv/bin/activate
  5. Install the requirements pip install -r requirements.rc
  6. Finally, run main.pyw python3 main.pyw

Output:

(.venv) sqd@sqd-aspire:~/imd/infinite-music-discs$ python3 main.pyw 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vkkhrdisplay, minimalegl, eglfs, vnc, xcb, wayland-egl, linuxfb, wayland, offscreen, minimal.

Aborted (core dumped)
(.venv) sqd@sqd-aspire:~/imd/infinite-music-discs$ 
sqdnoises commented 3 months ago

No way, I spent HOURS searching for this problem and when I look at source code I noticed PySide6 was being used. I searched PySide6 xcb on google and I found the solution to my problem! Literally seconds after posting this issue!

So for anyone having this problem like me, my solution was to install libxcb-cursor0.

apt install libxcb-cursor0

And its fixed! It works properly on both the binary and source code and the GUI shows up now without any errors.

Source: https://stackoverflow.com/questions/76279360/pyside6-plugin-erorr-xcb