title: qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found
body: <p>I am using Ubuntu 20.04.3 and trying some QT-based apps. In my particular use case, I am trying to launch android file transfer and it throws me the following error:</p>
  <pre><code>    Failed to create wl_display (No such file or directory)
      qt.qpa.plugin: Could not load the Qt platform plugin &quot;wayland&quot; in &quot;&quot; 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
  </code></pre>
  <p>This is the output from 'qmake --version'</p>
  <pre><code>    QMake version 3.1
      Using Qt version 5.9.7 in /home/*****/anaconda3/lib
  </code></pre>
  <p>And this is what I get after deactivating conda:</p>
  <pre><code>   QMake version 3.1
     Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu
  </code></pre>
  <p>Also, I tried doing :</p>
  <pre><code>    QT_QPA_PLATFORM=wayland
  </code></pre>
  <p>This is the output from ' android-file-transfer export QT_DEBUG_PLUGINS=1'</p>
  <pre><code>    QFactoryLoader::QFactoryLoader() checking directory path &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms&quot; ...
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;eglfs&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QEglFSIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;eglfs&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;linuxfb&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QLinuxFbIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;linuxfb&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;minimal&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QMinimalIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;minimal&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;minimalegl&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QMinimalEglIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;minimalegl&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;offscreen&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QOffscreenIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;offscreen&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;vnc&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QVncIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;vnc&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-egl.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-egl.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;wayland-egl&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QWaylandEglPlatformIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;wayland-egl&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-generic.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-generic.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;wayland&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QWaylandIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;wayland&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-egl.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;wayland-xcomposite-egl&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QWaylandXCompositeEglPlatformIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;wayland-xcomposite-egl&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-glx.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;wayland-xcomposite-glx&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QWaylandXCompositeGlxPlatformIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;wayland-xcomposite-glx&quot;)
      QFactoryLoader::QFactoryLoader() looking at &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so&quot;
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
      {
  &quot;IID&quot;: &quot;org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3&quot;,
  &quot;MetaData&quot;: {
      &quot;Keys&quot;: [
          &quot;xcb&quot;
      ]
  },
  &quot;archreq&quot;: 0,
  &quot;className&quot;: &quot;QXcbIntegrationPlugin&quot;,
  &quot;debug&quot;: false,
  &quot;version&quot;: 330752}
  
  
      Got keys from plugin meta data (&quot;xcb&quot;)
      QFactoryLoader::QFactoryLoader() checking directory path &quot;/usr/bin/platforms&quot; ...
      loaded library &quot;/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqwayland-generic.so&quot;
      Failed to create wl_display (No such file or directory)
      qt.qpa.plugin: Could not load the Qt platform plugin &quot;wayland&quot; in &quot;&quot; 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
  </code></pre>
  <p>This issue is affecting many other GUI of applications I am trying to use and any solutions would be welcome.</p>