Ошибка the application failed to run

Обновлено 26.06.2018

Unable to launch the applicationДобрый день! Уважаемые читатели и гости компьютерного блога №1 в России Pyatilistnik.org. Я уверен, что у многие системные администраторы используют в своей практике, порты управления серверами, про которые я уже очень подробно рассказывал. Если вы новичок в этом деле, то это отдельный сетевой интерфейс, который позволяет взаимодействовать с сервером, не имея на нем операционной системы. Самый используемый случай, это если завис сервер, чтобы его дернуть, или для того, чтобы установить на нем удаленно ОС. Благодаря такому KVM, вы монтируете в него ISO, эмулируя DVD-rom, а дальше все стандартно. Есть единственный минус, данный KVM работает на Java, которое очень привередливое и очень часто глючит. У меня есть старенькие лезвия Dell M600, и вот при попытке открыть IDRAC, я получаю ошибку Unable to launch the application, что не дает запуститься консоли квм. Данная ошибка, очень часто встречается в клиент-банках, которые так же могут работать через Java. Ниже я покажу как ее исправить и решить на корню.

Причины ошибки с запуском Java

Вот так вот выглядит ошибка:

Unsigned application requesting unrestricted accses to system

Unable to launch the application. Если посмотреть вкладку Details, то тут можно будет найти такую ошибку: Unsigned application requesting unrestricted accses to system. The following resourse is signed with a weak signature algorithm MD5withRSA and is treated as unsigned: https://ip адрес/Applications/dellUI/Java/release/JViewer.jar

Unable to launch the application

Тут есть ряд причин, которые не дают правильной работе приложения:

  • Нужно убрать проверку MD5 хэша
  • Добавить адрес в список исключений
  • Несовместимость c версией JAVA

Исправление ошибки Unable to launch the application

Первым делом вам необходимо поправить один конфигурационный файл, под именем java.security. Данный файл располагается по пути C:Program FilesJavaваша версия javalibsecurityjava.security. Перед его редактированием советую сделать его резервную копию.

Поиск файла java.policy
Открываем его с помощью блокнота или Notepad++ и находим строку:

jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024

Удаляем из этой строки проверку алгоритма MD5 и приводим строку вот к такому виду:

jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024

Редактирование файла java.security

Перезапустите браузер. Если это не помогло исправить ошибку: Unsigned application requesting unrestricted accses to system, то сделаем еще вот, что. Так как JAVA имеет очень высокий риск хакерской атаки, то разработчики задали там очень высокий уровень безопасности. Чтобы он не срабатывал, на нужных нам ресурсах, нам необходимо добавить адрес в исключения.

Советую добавлять в исключения адреса со *, например, https://192.168.0.1/*, так как этот знак означает любые последующие знаки. Или вот еще пример https://*.ibm.com

Напоминаю, что подобное мы уже делали, при ошибке: Java Application Blocked. Открываем панель управления Windows, находим там значок Java. Открываем его и попадаем в Java Control Panel. Переходим на вкладку «Security». Оставьте уровень защиты на «High», чуть ниже будет пункт список сайтов для исключения «Exception Site List», по умолчанию он будет пустым. Для его редактирования нажмите кнопку «Edit Site List». Для добавления новой строки нажмите кнопку «Add» и введите нужный вам ресурс. Сохраняем настройки и перезапускаем браузер.

Исправляем ошибку Unable to launch the application

В итоге это в 100% случаев решает ошибку с запуском окна на Java. В итоге открыв KVM окно в IDRAC на Dell M600 я не увидел Unable to launch the application. В итоге Java-аплет запустился, попросил подтверждения того, что я доверяю данному издателю приложения. Чтобы оно больше не выскакивало, поставьте галку «Do not show this again for this app from the publisher above» и нажмите «Run» для запуска.

Подключение к java kvm

Мы почти у финишной прямой, но видимо судьба решила меня еще подразнить и я получил следующее сообщение:

В Internet Explore: Failed to establish connection with VKVM service for video redirection.
В Google Chrome: Unable to find certificate in Default Keystore for validation. Please upload the certificate using the Java Control Panel and try again. Java Control Panel can be found at the following locations.

Unable to find certificate in Default Keystore for validation

Unable to find certificate in Default Keystore for validation

Данная ошибка решается тремя действиями. Как видно из ошибки, java не устраивает сертификат, который она не смогла найти. Лично в моем случае он устарел, так как оборудование старое и java 8 версии, видит, что нужен новый сертификат. Если не знаете, просрочен у вас сертификат или нет, то откройте страницу с нужным вам сервисом и запросите сертификат (Как посмотреть сертификат в Google Chrome я уже освещал, посмотрите.)

Мой сертификат на лезвии Dell M600, закончился в 2012 году и был выпущен компанией делл, у меня два варианты, забить на это и сделать следующие шаги, либо же сгенерировать csr запрос и отправить его деловцам, чтобы те дали новый сертификат, что геморройно, либо обновить IDRAC, но вся загвоздка в том, что оборудование Dell M600 уже снято с поддержки и порт управления имеет последнюю прошивку.

Ошибка Unable to launch the application

Что делаем далее, удаляем из хранилища Java текущий сертификат, делается это через все тот же Java Control Panel, на вкладке «Security» в пункте «Manage Certificates»

Unsigned application requesting unrestricted accses to system

Находим нужный сертификат и удаляем его.

Удалить сертификат из java

Далее как в случае с ошибкой «Failed to validate certificate. The application will not be executed» нам необходимо почистить кэш в джаве. Делается это на вкладке общие «General», через кнопку настроек «Settings». Далее нажимаем «Удалить файлы (Delete Files)»

Удалить кэш java

оставляем галки:

  1. Trace and Log Files
  2. Cached Applications and Applets

Удалить кэш java-2

Перезапускаем браузер и пробуем запустить ваше приложение. В итоге меня ждала уже следующая ошибка, которую я видел:

java.lang.UnsatisfiedLinkError: com.ami.iusb.FloppyRedir.GetKeyboardName()Ljava/lang/String;

В таких случаях, эта ошибка сообщала, что нужно понизить версию java, так как оборудование старое, либо обновить прошивку на оборудовании. В итоге вы должны удалить джаву, и не забыть почистить компьютер от оставшегося мусора. После чего перезагрузить ваш компьютер и установить новую джаву. В моем случае я поставил версию 6.45, и все завелось.

ссылка на архив версий java http://www.oracle.com/technetwork/java/javase/archive-139210.html

Надеюсь вы смогли решить вашу проблему с запуском java-приложения и победили ошибку: Unable to launch the application. Unsigned application requesting unrestricted accses to system. The following resourse is signed with a weak signature algorithm MD5withRSA and is treated as unsigned. Если у вас есть другие методы, то просьба описать их в комментариях, давайте делиться опытом.

java.lang.unsatisfiedlinkerror

I have a spring-boot maven project that is giving Application run failed (java.lang.NoSuchFieldError: logger) error.

When I run this application using mvn spring-boot:run -pl application, here’s what I get:

2018-06-13 16:09:17.439  WARN 9069 --- [           main] o.s.b.c.e.EventPublishingRunListener     : Error calling ApplicationEventListener

java.lang.NoSuchFieldError: logger
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.get(ConditionEvaluationReport.java:169) ~[spring-boot-autoconfigure-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener.logAutoConfigurationReport(ConditionEvaluationReportLoggingListener.java:96) ~[spring-boot-autoconfigure-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener.onApplicationEvent(ConditionEvaluationReportLoggingListener.java:80) ~[spring-boot-autoconfigure-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener$ConditionEvaluationReportListener.onApplicationEvent(ConditionEvaluationReportLoggingListener.java:137) ~[spring-boot-autoconfigure-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:158) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.boot.context.event.EventPublishingRunListener.failed(EventPublishingRunListener.java:126) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplicationRunListeners.callFailedListener(SpringApplicationRunListeners.java:91) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplicationRunListeners.failed(SpringApplicationRunListeners.java:84) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:812) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at hello.app.Application.main(Application.java:31) [classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496) [spring-boot-maven-plugin-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at java.base/java.lang.Thread.run(Thread.java:844) [na:na]

2018-06-13 16:09:17.446 ERROR 9069 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.NoSuchFieldError: logger
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.get(ConditionEvaluationReport.java:169) ~[spring-boot-autoconfigure-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener.initialize(ConditionEvaluationReportLoggingListener.java:65) ~[spring-boot-autoconfigure-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:633) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:373) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at hello.app.Application.main(Application.java:31) [classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496) [spring-boot-maven-plugin-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at java.base/java.lang.Thread.run(Thread.java:844) [na:na]

[WARNING]
java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:496)
    at java.lang.Thread.run (Thread.java:844)
Caused by: java.lang.NoSuchFieldError: logger
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
    at org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.get (ConditionEvaluationReport.java:169)
    at org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener.initialize (ConditionEvaluationReportLoggingListener.java:65)
    at org.springframework.boot.SpringApplication.applyInitializers (SpringApplication.java:633)
    at org.springframework.boot.SpringApplication.prepareContext (SpringApplication.java:373)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:325)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:1255)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:1243)
    at hello.app.Application.main (Application.java:31)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:496)
    at java.lang.Thread.run (Thread.java:844)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.981 s
[INFO] Finished at: 2018-06-13T16:09:17-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) on project multimoduletest2-app: An exception occurred while running. null: InvocationTargetException: logger -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This project is a derivation of https://spring.io/guides/gs/multi-module/.

My project structure is:

multimoduletest2
├── application
│   ├── pom.xml
│   ├── src
│   │   └── main
│   │       └── java
│   │           └── hello
│   │               └── app
│   │                   └── Application.java
│   └── target
│       ├── classes
│       │   └── hello
│       │       └── app
│       │           └── Application.class
│       ├── generated-sources
│       │   └── annotations
│       ├── maven-archiver
│       │   └── pom.properties
│       ├── maven-status
│       │   └── maven-compiler-plugin
│       │       └── compile
│       │           └── default-compile
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── multimoduletest2-app-0.1-SNAPSHOT.jar
└── pom.xml

multimoduletest2/pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.springframework</groupId>
    <artifactId>multimoduletest2</artifactId>
    <version>0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <modules>
        <module>application</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>5.0.7.RELEASE</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

multimoduletest2/application/pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.spoken</groupId>
    <artifactId>multimoduletest2-app</artifactId>
    <version>0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.springframework</groupId>
        <artifactId>multimoduletest2</artifactId>
        <version>0.1-SNAPSHOT</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>2.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>2.0.1.RELEASE</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.0.1.RELEASE</version>
            </plugin>
        </plugins>
    </build>
</project>

Application.java:

package hello.app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * This class implements the main function.
 */
@RestController
@SpringBootApplication(scanBasePackages = "hello")
public class Application {
    /**
     * This method represents the homepage.
     *
     * @return String
     */
    @GetMapping("/")
    public String getHome() {
        return "Welcome!";
    }

    /**
     * Main
     *
     * @param args Command-line args
     */
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

This is a simplified version of a multi-module project that is giving me the same error. I’m fairly new to spring-boot and maven, so it’s possible I’m overlooking something simple.

Here are some of the things I’ve already tried without success:

  • Searched online if anyone had a similar issue
  • Removed ~/.m2/repository directory
  • Checked if there are any version collisions in the dependencies
  • Looked at the answer given at Spring boot starting error, but I didn’t see any existing process using port 8080

Thank you for your help in advance!

Вопрос

Проблема: как исправить ошибку «Не удалось запустить приложение из-за того, что не удалось инициализировать подключаемый модуль платформы Qt» в Windows?

Привет. Недавно после обновления Windows мне не удалось заставить OneDrive работать. Каждый раз, когда мой компьютер загружается, я получаю сообщение об ошибке «Не удалось запустить приложение, потому что не удалось инициализировать подключаемый модуль платформы Qt». Есть какие-нибудь советы, как решить эту проблему? Заранее спасибо.

Решенный ответ

Операционная система Windows состоит из множества компонентов — некоторые из них уже предустановлены, а другие необходимо реализовать вручную. Например, Node.js является одним из сторонних компонентов, которые вы можете увидеть практически на любом компьютере с Windows.

Qt основан на C ++[1] фреймворк, предназначенный для создания приложений на Windows, Android, Linux,[2] и другие платформы. Хотя это не язык программирования сам по себе, приложения, основанные на нем, должны иметь установленную платформу на своих машинах, чтобы иметь возможность работать. К сожалению, эти зависимости могут создавать определенные проблемы по той или иной причине.

Когда что-то пойдет не так с платформой Qt, пользователи могут получить сообщение об ошибке «Не удалось запустить приложение, потому что не удалось инициализировать подключаемый модуль платформы Qt».

Эта ошибка может затронуть несколько приложений, включая такие игры, как Apex Legends,[3] автономные компоненты (Dllhost) или часто используемые приложения, такие как OneDrive. Последний находится на каждом компьютере с Windows и является чрезвычайно полезным приложением, обычно используемым для резервного копирования системы / файлов или дополнительного хранилища для пользовательских файлов.

Вот полное сообщение, которое пользователи получают при обнаружении ошибки (текст сообщения об ошибке может отличаться в некоторых случаях):

Это приложение не удалось запустить, потому что не удалось инициализировать подключаемый модуль платформы Qt. Переустановка приложения может решить проблему.

Доступные плагины платформы: минимальные, закадровые, окна.

Хотя может показаться, что включение или установка платформы Qt исправит ошибку «Не удалось запустить приложение, потому что не удалось инициализировать подключаемый модуль платформы Qt», это не так. Однако переустановка приложения, у которого возникают проблемы с обнаружением плагина, может помочь.

Как исправить ошибку «Не удалось запустить приложение, потому что не удалось инициализировать плагин платформы Qt» в Windows?

К сожалению, это не всегда возможно, поскольку пользователи сообщали, что при попытке сделать это они получили ошибку «Не удается найти». Причина этого в том, что более новая версия приложения может уже присутствовать на устройстве, поэтому удаление невозможно. Есть способ обойти это.

В некоторых случаях причины ошибки могут быть не связаны с упомянутыми выше. Например, повреждение системного файла также может вызвать эту ошибку, поэтому мы рекомендуем попробовать запустить сканирование с помощью ReimageСтиральная машина Mac X9 программное обеспечение для ремонта, которое может автоматически устранять основные проблемы Windows. В противном случае используйте следующие методы, которые должны помочь вам навсегда решить эту ошибку.

Способ 1. Скопируйте соответствующую папку в другое место

Исправить это сейчас!Исправить это сейчас!

Для восстановления поврежденной системы необходимо приобрести лицензионную версию Reimage Reimage.

Способ 2. Проверить системные файлы на наличие повреждений

Исправить это сейчас!Исправить это сейчас!

Для восстановления поврежденной системы необходимо приобрести лицензионную версию Reimage Reimage.

  • Введите cmd в поиске Windows
  • Щелкните правой кнопкой мыши на Командная строка и выберите Запустить от имени администратора
  • Здесь введите sfc / scannow и нажмите ВходитьЗапустить сканирование SFC
  • Дождитесь завершения сканирования и начать сначала ваша машина
  • Если SFC вернула ошибка заявив, что не удалось восстановить поврежденные файлы, выполните следующие команды, нажав Входить каждый раз:
    DISM / Онлайн / Очистка-Образ / CheckHealth
    DISM / Онлайн / Очистка-Изображение / ScanHealth
    DISM / Онлайн / Очистка-Образ / RestoreHealth

Способ 3. Попробуйте чистую загрузку

Исправить это сейчас!Исправить это сейчас!

Для восстановления поврежденной системы необходимо приобрести лицензионную версию Reimage Reimage.

  • Тип msconfig в поиске Windows нажмите Входить
  • Перейти к Услуги вкладка
  • Проверить Скрыть все службы Microsoft флажок и выберите Отключить все
  • Перейти к Запускать вкладка и выберите Открыть диспетчер задач
  • Здесь щелкните правой кнопкой мыши каждую запись и выберите Запрещать и закройте диспетчер задач
  • Перейти к Ботинок вкладка, отметьте Безопасная загрузка и выберите Применить + ОК.Использовать чистую загрузку

После загрузки обратно в Windows попробуйте запустить приложение, с которым у вас возникли проблемы. Если это решит вашу проблему, значит, виновато стороннее приложение. Чтобы исправить ошибку «Не удалось запустить приложение, потому что не удалось инициализировать подключаемый модуль платформы Qt», вам следует удалить все недавно установленные приложения и посмотреть, решит ли это вашу проблему в обычном режиме.

Способ 4. Переустановите указанное приложение

Исправить это сейчас!Исправить это сейчас!

Для восстановления поврежденной системы необходимо приобрести лицензионную версию Reimage Reimage.

Вам следует попробовать удалить приложение, с которым у вас возникли проблемы, а затем установить его заново. Если вы имеете дело с OneDrive, вам следует сделать следующее:

  • Нажмите Win + R на твоей клавиатуре
  • в Бегать диалоговое окно, скопируйте и вставьте следующее:
    % userprofile% AppData Local Microsoft OneDrive Update OneDriveSetup.exe
  • Пройдите этапы установки и начать сначала ваш компьютерПереустановите OneDrive
  • Если Windows не может найти указанный файл, вам следует загрузить установочный файл с официального сайта [Прямая ссылка].

Если этот метод не работает и вы получаете сообщение об ошибке, перейдите к приведенному ниже методу, а затем повторите этот шаг.

Метод 5. Удалите проблемное приложение через командную строку

Исправить это сейчас!Исправить это сейчас!

Для восстановления поврежденной системы необходимо приобрести лицензионную версию Reimage Reimage.

Удаление программы, которая не хочет удаляться, может быть трудным, хотя это возможно через PowerShell, так как вы можете запустить ее от имени администратора. Имейте в виду, что приведенный ниже пример относится к приложению OneDrive, и команда будет отличаться в зависимости от имени приложения и его местоположения.

  • Открытым Командная строка от имени администратора как объяснено выше
  • Скопируйте и вставьте следующие команды, нажав Входить после каждого:
    taskkill / f / im OneDrive.exe
    % SystemRoot% SysWOW64 OneDriveSetup.exe / удалитьПринудительно удалить OneDrive
  • Примечание: если вы используете 32-битная система Windows вместо этого используйте следующую команду для удаления OneDrive:
    % SystemRoot% System32 OneDriveSetup.exe / удалить
  • Это должно принудительно удалить приложение.

Исправляйте ошибки автоматически

Команда ugetfix.com делает все возможное, чтобы помочь пользователям найти лучшие решения для устранения их ошибок. Если вы не хотите бороться с методами ручного ремонта, используйте автоматическое программное обеспечение. Все рекомендованные продукты были протестированы и одобрены нашими профессионалами. Инструменты, которые можно использовать для исправления ошибки, перечислены ниже:

Предложение

сделай это сейчас!

Скачать Fix
Счастье
Гарантия

сделай это сейчас!

Скачать Fix
Счастье
Гарантия

Совместим с Майкрософт ВиндоусСовместим с OS X По-прежнему возникают проблемы?
Если вам не удалось исправить ошибку с помощью Reimage, обратитесь за помощью в нашу службу поддержки. Сообщите нам все подробности, которые, по вашему мнению, нам следует знать о вашей проблеме.

Reimage — запатентованная специализированная программа восстановления Windows. Он диагностирует ваш поврежденный компьютер. Он просканирует все системные файлы, библиотеки DLL и ключи реестра, которые были повреждены угрозами безопасности.Reimage — запатентованная специализированная программа восстановления Mac OS X. Он диагностирует ваш поврежденный компьютер. Он просканирует все системные файлы и ключи реестра, которые были повреждены угрозами безопасности.
Этот запатентованный процесс восстановления использует базу данных из 25 миллионов компонентов, которые могут заменить любой поврежденный или отсутствующий файл на компьютере пользователя.
Для восстановления поврежденной системы необходимо приобрести лицензионную версию Reimage инструмент для удаления вредоносных программ.

Упоминания в прессе о Reimage

Нажмите

Условия использования Reimage | Политика конфиденциальности Reimage | Политика возврата денег за товар | Нажмите

VPN имеет решающее значение, когда дело доходит до конфиденциальность пользователя. Онлайн-трекеры, такие как файлы cookie, могут использоваться не только платформами социальных сетей и другими веб-сайтами, но также вашим интернет-провайдером и правительством. Даже если вы примените самые безопасные настройки через веб-браузер, вас все равно можно будет отслеживать через приложения, подключенные к Интернету. Кроме того, браузеры, ориентированные на конфиденциальность, такие как Tor, не являются оптимальным выбором из-за пониженной скорости соединения. Лучшее решение для вашей максимальной конфиденциальности — это Частный доступ в Интернет — быть анонимным и безопасным в сети.

Программное обеспечение для восстановления данных — один из вариантов, который может вам помочь восстановить ваши файлы. После удаления файла он не исчезает в воздухе — он остается в вашей системе до тех пор, пока поверх него не записываются новые данные. Восстановление данных Pro это программа для восстановления, которая ищет рабочие копии удаленных файлов на вашем жестком диске. Используя этот инструмент, вы можете предотвратить потерю ценных документов, школьных заданий, личных фотографий и других важных файлов.

Question

Issue: How to fix «Application failed to start because no Qt platform plugin could be initialized» error in Windows?

Hello. Recently, after a Windows update, I was unable to get OneDrive to work. Whenever my PC boots, I receive an error “Application failed to start because no Qt platform plugin could be initialized.” Any advice on how to deal with this issue? Thanks in advance.

Solved Answer

Windows operating system consists of many components – some are already pre-installed while others need to be implemented manually. For example, Node.js is one of the third-party components you would see on almost any Windows computer.

Qt is a C++-based[1] framework that is designed to create applications on Windows, Android, Linux,[2] and other platforms. While it is not a programming language on its own, apps that are based on it need to have the framework installed on their machines to be able to run. Unfortunately, these dependencies can create certain issues due to one reason or another.

When something goes wrong with the Qt platform, users may receive the “Application failed to start because no Qt platform plugin could be initialized” error.

Several applications could be affected by this error, including games such as Apex Legends,[3] standalone components (Dllhost), or commonly-used apps as OneDrive. The latter resides in every Windows computer and is an extremely useful app commonly used for system/file backups or additional storage for user files.

Here’s the full message that users receive upon encountering the error (the error message text may vary in some instances):

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, windows.

While it may seem like enabling or installing the Qt platform would fix the “Application failed to start because no Qt platform plugin could be initialized” error, it is not the case. Reinstalling the app that is having difficulties detecting the plugin might help, however.

How to fix "Application failed to start because no Qt platform plugin could be initialized" error in Windows?

Unfortunately, that is not always possible, as users reported that they then received the “Can’t be found” error while trying to do so. The reason for this being is that a newer version of the app may be already present on the device, hence uninstallation is not possible. There is a way around it.

In some cases, the reasons for the error could be unrelated to the ones mentioned above. For example, system file corruption might also cause this error, so we recommend you try running a scan with ReimageMac Washing Machine X9 repair software that could fix underlying Windows issues automatically. Otherwise, proceed with the below methods that should help you solve this error for good.

Method 1. Copy relevant folder to a different location



Fix it now!




Fix it now!

To repair damaged system, you have to purchase the licensed version of Reimage Reimage.

Method 2. Check system files for damage



Fix it now!




Fix it now!

To repair damaged system, you have to purchase the licensed version of Reimage Reimage.

  • Type in cmd in Windows search
  • Right-click on Command Prompt and select Run as administrator
  • Here, type sfc /scannow and press Enter

    Run SFC scan

  • Wait till the scan completes and restart your machine
  • If the SFC has returned an error saying it was unable to repair damaged files, run the following commands, pressing Enter each time:
    DISM /Online /Cleanup-Image /CheckHealth
    DISM /Online /Cleanup-Image /ScanHealth
    DISM /Online /Cleanup-Image /RestoreHealth

Method 3. Try Clean Boot



Fix it now!




Fix it now!

To repair damaged system, you have to purchase the licensed version of Reimage Reimage.

  • Type msconfig in Windows search, hit Enter
  • Go to Services tab
  • Check the Hide all Microsoft services checkbox and select Disable all
  • Go to Startup tab and pick Open Task Manager
  • Here, right-click on every entry and select Disable and close the Task Manager
  • Go to Boot tab, tick Safe Boot and select Apply + OK.

    Use Clean Boot

Once booted back into Windows, try running the app you were having problems with. If that fixes your problem, it means that there is a third-party application that is at fault. In order to fix the “Application failed to start because no Qt platform plugin could be initialized” error, you should uninstall all recently installed applications and see if that solves your problem in normal mode.

Method 4. Reinstall the application in question



Fix it now!




Fix it now!

To repair damaged system, you have to purchase the licensed version of Reimage Reimage.

You should try uninstalling the app you are having troubles with and then installing it anew. If you are dealing with OneDrive, you should do the following:

  • Press Win + R on your keyboard
  • In the Run dialog, copy and paste the following:
    %userprofile%AppDataLocalMicrosoftOneDriveUpdateOneDriveSetup.exe
  • Go through the installation steps and restart your PC

    Reinstall OneDrive

  • If Windows can’t find the file specified, you should download the setup file from the official website [direct link].

If this method does not work and you are presented with an error, proceed with the method below and then repeat this step.

Method 5. Uninstall the problematic app via Command Prompt



Fix it now!




Fix it now!

To repair damaged system, you have to purchase the licensed version of Reimage Reimage.

Uninstalling a program that does not want to uninstall might be difficult, although it is possible via PowerShell, as you can launch it as an administrator. Keep in mind that the below example is for the OneDrive application, and the command would differ depending on the app name and its location.

  • Open Command Prompt as administrator as explained above
  • Copy and paste the following commands, pressing Enter after each:
    taskkill /f /im OneDrive.exe
    %SystemRoot%SysWOW64OneDriveSetup.exe /uninstall

    Force uninstall OneDrive

  • Note: if you are using 32-bit Windows system use the following command to uninstall OneDrive instead:
    %SystemRoot%System32OneDriveSetup.exe /uninstall
  • This should force-uninstall the app.

Repair your Errors automatically

ugetfix.com team is trying to do its best to help users find the best solutions for eliminating their errors. If you don’t want to struggle with manual repair techniques, please use the automatic software. All recommended products have been tested and approved by our professionals. Tools that you can use to fix your error are listed bellow:

do it now!

Download Fix
 

Happiness
Guarantee

do it now!

Download Fix
 

Happiness
Guarantee

Compatible with Microsoft Windows
Compatible with OS X

Still having problems?
If you failed to fix your error using Reimage, reach our support team for help. Please, let us know all details that you think we should know about your problem.

Reimage — a patented specialized Windows repair program. It will diagnose your damaged PC. It will scan all System Files, DLLs and Registry Keys that have been damaged by security threats.Reimage — a patented specialized Mac OS X repair program. It will diagnose your damaged computer. It will scan all System Files and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user’s computer.
To repair damaged system, you have to purchase the licensed version of Reimage malware removal tool.

Press mentions on Reimage

A VPN is crucial when it comes to user privacy. Online trackers such as cookies can not only be used by social media platforms and other websites but also your Internet Service Provider and the government. Even if you apply the most secure settings via your web browser, you can still be tracked via apps that are connected to the internet. Besides, privacy-focused browsers like Tor is are not an optimal choice due to diminished connection speeds. The best solution for your ultimate privacy is Private Internet Access – be anonymous and secure online.

Data recovery software is one of the options that could help you recover your files. Once you delete a file, it does not vanish into thin air – it remains on your system as long as no new data is written on top of it. Data Recovery Pro is recovery software that searchers for working copies of deleted files within your hard drive. By using the tool, you can prevent loss of valuable documents, school work, personal pictures, and other crucial files.

When launching certain apps on Windows, many users receive the “This application failed to start because no Qt platform plugin could be initialized” error. Don’t worry. This post of MiniTool explores several effective troubleshooting methods.

According to user reports, the “this application failed to start because no Qt platform plugin could be initialized” error can occur with many apps such as OneDrive, Designer, Python, etc. This error often appears after installing a series of Windows updates. Here’s a true example from the answersmicrosoft.com forum:

After a series of recent Windows updates my Surface displays the following error when we log in OneDrive — This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. I have searched the community and followed the responses given to others suffering the same fate but so far this has not resolved the issue. Looking to know what I should attempt next?https://answers.microsoft.com/en-us/windows/forum/all/application-failed-to-start-because-no-qt-platform/205e4259-dcbc-4d72-addb-8e7edb9663e9

no Qt platform plugin could be initialized

Qt is a cross-platform software that was designed to create graphical user interfaces and cross-platform applications on Windows, Linux, macOS, and Android. However, when something went wrong with the Qt platform, you may receive the “This application failed to start because it could not find or load the Qt platform plugin Windows” error.

It seems like reinstalling the application may fix the error. However, some users encounter new errors when reinstalling the app. Don’t worry. Here we explore several effective troubleshooting methods. Let’s try.

How to Fix the “No Qt Platform Plugin Could Be Initialized” Error

After analyzing extensive user reports, we summarize the 6 applicable ways to fix the Qt platform plugin Windows error. You can try them in order until the error gets solved or choose the ones that work best for you.

Fix 1. Replace the Qt Files in the Destination

The first and proven method is to replace the Qt files in the destination folder. Here we take Python for example. To do so, follow the steps below:

Step 1. Press the Win + E keys to open the File Explorer, select This PC, type pyqt5_tools in the search box, and hit Enter.

Step 2. Right-click the pyqt5_tools folder once the search is complete and select Open folder location.

Step 3. Then go to the folder path “PyQt5 > Qt > plugins”, and then open the Plugin folder, right-click the platforms folder, and select Copy.

Step 4. Go to the site-packages folder that you initially opened and go to pyqt5_tools > Qt > bin.

Step 5. Right-click any empty space inside the bin directory and select paste. Then confirm it when you see the “Replace the files in the destination” message.

open Qt5 tools folder

Now, you can relaunch the app and see if the “this application failed to start Qt platform Windows” message persists.

Fix 2. Perform a Clean Boot

One of the possible reasons for the “this application failed to start Qt platform Windows” error is third-party software conflicts. If you are not sure which app is causing the conflict, you can perform a clean boot (click on the Hyperlink to know the detailed steps). Once you find out the conflicting software, uninstall it and check if the error is fixed.

Fix 3. Check System File Corruption

Sometimes corrupted system files can trigger various errors and issues when running your apps such as the “no Qt platform plugin could be initialized” error. So, we recommend you run an SFC scan or DISM to check system files.

Step 1. Type cmd in the search box, and then right-click Command Prompt and select Run as administrator option.

Step 2. Type the sfc /scannow command in the elevated command prompt and hit Enter. After that, the SFC tool will scan and try to repair the corrupted system files automatically.

run an SFC scan

Step 3. If the SFC command was unable to repair corrupt system files, you can try running the following DISM commands:

  • DISM /Online /Cleanup-Image /CheckHealth
  • DISM /Online /Cleanup-Image /ScanHealth
  • DISM /Online /Cleanup-Image /RestoreHealth

Fix 4. Reinstall the App

As the error message hints, reinstalling the application may help fix the problem. However, many users cannot uninstall the app smoothly. Don’t worry. We summarize the following 3 applicable ways to reinstall the app. (Here we take reinstalling OneDrive for example)

Uninstall OneDrive via the Run box:

Step 1, Press Win + R keys to open the Run dialog box, and then type the following command in it and hit Enter. Here make sure you replace the OneDriveSetup.exe path with the actual location.

%userprofile%AppDataLocalMicrosoftOneDriveUpdateOneDriveSetup.exe

reinstall OneDrive with the Run dialog box

Step 2. Once uninstalled, go through the installation steps and restart your computer and check if the error gets fixed. If it fails to uninstall the application, you can try the following 2 methods.

Uninstall OneDrive via CMD:

Step 1. Type cmd in the Run dialog box and press Ctrl + Shift + Enter keys to open the elevated Command Prompt window.

Step 2. Type the following command and hit Enter to uninstall the app. If you are running on a 32-bit system, replace SysWOW64 with System32. This will force uninstalling the app.

  • taskkill /f /im OneDrive.exe 
  • %SystemRoot%SysWOW64OneDriveSetup.exe /uninstall

Uninstall OneDrive from Settings:

Step 1. Right-click the Start menu at the bottom left and select Apps and Features.

Step 2. Inside the Applications window, search for OneDrive by name and click the Uninstall button.

uinstall OneDrive

Step 3. Then follow the on-screen prompts to complete the uninstallation. After that, you can reinstall the app and check if the error disappears.

Fix 5. Download the Update.xml File of the App

Some users reported that the error can be fixed by downloading the update.xml file of the app. If you can’t reinstall OneDrive via the above method, try this solution. Click here to download the OneDriveSetup.exe file, and run it to install the latest version of OneDrive.

a user report from the Microsoft forum

Fix 6. Undo the Recent Changes

Many people reported that “This application failed to start because it could not find or load the Qt platform plugin Windows” error mainly occurs after installing a series of Windows updates. If this scenario applies to you, you can try performing a system restore or uninstalling these updates manually.

Step 1. Press the Win + I keys to open the Settings app, and then select Update & Security > View update history.

click View update history

Step 2. Click on Uninstall updates, and then right-click the most recent update and select Uninstall. Then follow the on-screen prompts to complete the uninstallation. Then repeat the same procedure to uninstall other Windows updates.

uninstall Windows updates

Issue:

The following error occurs when launching Autodesk products:

AdskLicensingAgent (or AdSSO)
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: windows.

Causes:

There could be multiple causes for this error:

  • An issue with Autodesk Licensing Service 10.1.1.66 (or newer).
  • A conflict with Inventor 2021 beta.
  • Corrupted or outdated Autodesk Single Sign on component / Autodesk Licensing Service.
  • A conflict with 3rd party applications using QT libraries

Solution:

If using Autodesk Licensing Service 10.1.1.66 (or newer)

Do the following steps. Replace «10.1.1.66» in these steps with the latest version of the AdskLicensing that is installed.

  1. Open Windows File Explorer.
  2. Browse to the folder «C:Program Files (x86)Common FilesAutodesk SharedAdskLicensing10.1.1.66AdskLicensingAgentplatforms«.
  3. Copy the file «qwindows_Ad_5_12.dll«.
  4. Paste the file one folder up, into «C:Program Files (x86)Common FilesAutodesk SharedAdskLicensing10.1.1.66AdskLicensingAgent«.

If the above does not fix the issue

  1. Uninstall and reinstall the Autodesk Licensing Service:
    1. Uninstall the existing Autodesk licensing service by running this file as administrator:
      • C:Program Files (x86)Common FilesAutodesk SharedAdskLicensingUninstall.exe
    2. Reinstall the licensing service using the file Autodesk Licensing Service 11.0.0.4854.zip installer or a newer version of the licensing service.
      • See December 2020 — Autodesk Licensing Service Update for further information.
  2. Repair or update the «Single Sign On Component» (AdSSO) following the solution in «This application failed to start because it could not find or load the Qt platform plugin «windows».» dialogue appears when launching or updating any Autodesk software (It may be required to delete C:Program FilesAutodeskAutodesk AdSSO folder completely after uninstalling AdSSO.)

If there are 3rd party applications using QT libraries use the following steps 

  1. Check if there is an environment/system variable defined with variable name QT_PLUGIN_PATH
  2. If present, take a backup of the variable value which would ideally be a location to the 3rd party libraries.
  3. Delete the variable and test Autodesk and 3rd party applications to ensure they work as expected.

Note: A system reboot is suggested after uninstalling the previous versions and again another reboot may require after installing the latest services.  

Products:

All Desktop Products;

Versions:

2020; 2021; 2022; 2023;


Edit:
Some people started to mark my question as a duplicate. Do not forget that many similar questions existed when I asked this one (see e.g. the list below). However, none of these answers solved my problem. After a long search I found a comment which had been ignored by all users pointing to the missing lib. Now, many months later, the comment has been changed to an answer. However, when I answered this question by msyself I intended to help other people by directly providing the solution. This should not be forgotten and so far my answer helped a lot of people. Therefore my question is definitely not a duplicate. By the way: The accepted answer within the provided link on top does not solve the problem!


Yes, i used the search:

Failed to load platform plugin «windows». Available platforms are : Error

Deploying Qt C++ Application from Visual Studio qwindows.dll error

failed to load platform plugin «windows» Available platforms are: windows, minimal

However, in my case the problem still persists. I am using Qt 5.1.1 with Visual Studio 2012 and developed my Application on Windows 7 with Qt Creator 2.8.1. Application is compiled in «Release»-mode and can be executed if directly started with Qt Creator.

However, when starting from the «release»-Folder, i get the following message:

This application failed to start because it could not find or load the
Qt platform plugin «windows». Available platform plugins are:
minimal, offscreen, windows.

Folder structure looks like this:

release
+ gui.exe
+ icudt51.dll
+ icuin51.dll
+ icuuc51.dll
+ libGLESv2.dll
+ Qt5Core.dll
+ Qt5Gui.dll
+ Qt5Widgets.dll
+ platforms

Platforms is the folder directly copied from QtQt5.1.15.1.1msvc2012pluginsplatforms including e.g. qwindows.dll. Does not matter if I rename it to «platform» as some other users did. Qt is still not finding the «platform plugin windows», where is my mistake?

Community's user avatar

asked Dec 10, 2013 at 13:16

Anonymous's user avatar

5

Okay, as posted here https://stackoverflow.com/a/17271172/1458552 without much attention by other users:

The libEGL.dll was missing! Even though this has not been reported when trying to start the application (all other *.dlls such as Qt5Gui.dll had been reported).

Community's user avatar

answered Dec 10, 2013 at 13:43

Anonymous's user avatar

AnonymousAnonymous

4,5778 gold badges47 silver badges61 bronze badges

8

I created a platforms directory next to my exe location and put qwindows.dll inside, but I still received the «Failed to load platform plugin «windows». Available platforms are: windows» error.

I had copied qwindows.dll from C:QtQt5.1.1ToolsQtCreatorbinpluginsplatforms, which is not the right location. I looked at the debug log from running in Qt Creator and found that my app was looking in C:QtQt5.1.15.1.1mingw48_32pluginsplatforms when it ran in the debugger.

When I copied from C:QtQt5.1.15.1.1mingw48_32pluginsplatforms, everything worked fine.

answered Jun 12, 2014 at 19:30

Brandon's user avatar

BrandonBrandon

5514 silver badges2 bronze badges

2

The release is likely missing a library/plugin or the library is in the wrong directory and or from the wrong directory.

Qt intended answer: Use windeployqt. see last paragraph for explanation

Manual answer:

Create a folder named «platforms» in the same directory as your application.exe file. Copy and paste the qwindows.dll, found in the /bin of whichever compiler you used to release your application, into the «platforms» folder. Like magic it works. If the .dll is not there check plugins/platforms/ ( with plugins/ being in the same directory as bin/ ) <— PfunnyGuy’s comment.

It seems like a common issue is that the .dll was taken from the wrong compiler bin. Be sure to copy your the qwindows.dll from the same compiler as the one used to release your app.

Qt comes with platform console applications that will add all dependencies (including ones like qwindows.dll and libEGL.dll) into the folder of your deployed executable. This is the intended way to deploy your application, so you do not miss any libraries (which is the main issue with all of these answers). The application for windows is called windeployqt. There is likely a deployment console app for each OS.

Lukasz Czerwinski's user avatar

answered Aug 10, 2017 at 2:10

CrippledTable's user avatar

4

Setting the QT_QPA_PLATFORM_PLUGIN_PATH environment variable to %QTDIR%pluginsplatforms worked for me.

It was also mentioned here and here.

Community's user avatar

answered Oct 30, 2016 at 12:38

Jim G.'s user avatar

Jim G.Jim G.

15k22 gold badges104 silver badges164 bronze badges

3

I ran into this and none of the answers I could find fixed it for me.

My colleauge has Qt (5.6.0) installed on his machine at:
C:QtQt5.6.05.6msvc2015plugins
I have Qt (5.6.2) installed in the same location.

I learned from this post: http://www.tripleboot.org/?p=536, that the Qt5Core.dll has a location to the plugins written to it when Qt is first installed.
Since my colleague’s and my Qt directories were the same, but different version of Qt were installed, a different qwindows.dll file is needed. When I ran an exe deployed by him, it would use my C:QtQt5.6.05.6msvc2015pluginsplatformsqwindows.dll file instead of the one located next to the executable in the .platforms subfolder.

To get around this, I added the following line of code to the application which seems to force it to look next to the exe for the ‘platforms’ subfolder before it looks at the path in the Qt5Core.dll.

QCoreApplication::addLibraryPath(".");

I added the above line to the main method before the QApplication call like this:

int main( int argc, char *argv[] )
{
    QCoreApplication::addLibraryPath(".");
    QApplication app( argc, argv );
    ...
    return app.exec();
}

answered Mar 13, 2017 at 15:38

Joel's user avatar

JoelJoel

1372 silver badges7 bronze badges

3

create dir platforms and copy qwindows.dll to it, platforms and app.exe are in the same dir


cd app_dir
mkdir platforms
xcopy qwindows.dll platformsqwindows.dll

Folder structure

+ app.exe
+ platformsqwindows.dll

answered Mar 8, 2018 at 9:24

KunMing Xie's user avatar

KunMing XieKunMing Xie

1,57316 silver badges15 bronze badges

3

I found another solution. Create qt.conf in the app folder as such:

[Paths]
Prefix = .

And then copy the plugins folder into the app folder and it works for me.

answered Aug 6, 2017 at 18:56

Peter Quiring's user avatar

Peter QuiringPeter Quiring

1,5881 gold badge15 silver badges21 bronze badges

1

For anyone coming from QT version 5.14.0, it took me 2 days to find this piece statment of bug:

windeployqt does not work for MinGW QTBUG-80763 Will be fixed in
5.14.1

https://wiki.qt.io/Qt_5.14.0_Known_Issues

So be aware. Using windeployqt withMinGW will give the same error stated here.

answered Jan 17, 2020 at 3:41

Yahya Tawil's user avatar

Yahya TawilYahya Tawil

3873 silver badges10 bronze badges

I had this problem while using QT 5.6, Anaconda 4.3.23, python 3.5.2 and pyinstaller 3.3.
I had created a python program with an interface developed using QTcreator, but had to deploy it to other computers, therefore I needed to make an executable, using pyinstaller.

I’ve found that the problem was solved on my computer if I set the following environment variables:

QT_QPA_PLATFORM_PLUGIN_PATH: %QTDIR%pluginsplatforms

QTDIR: C:Miniconda3pkgsqt-5.6.2-vc14_3Library

But this solution only worked on my PC that had conda and qt installed in those folders.

To solve this and make the executable work on any computer, I’ve had to edit the «.spec» (file first generated by pyinstaller) to include the following line:

datas=[(
‘C:Miniconda3pkgsqt-5.6.2-vc14_3Librarypluginsplatforms*.dll’,
‘platforms’ ),]

This solution is based on the answers of Jim G. and CrippledTable

answered Oct 3, 2017 at 12:34

Loebsen Van de Graaff's user avatar

For me the solution was to correct the PATH variable. It had Anaconda3Librarybin as one of the first paths. This directory contains some Qt libraries, but not all. Apparently, that is a problem. Moving C:ProgramsQt5.12.3msvc2017_64bin to the front of PATH solved the problem for me.

answered Apr 29, 2019 at 13:23

Jann Poppinga's user avatar

Most of these answers contain good (correct) info, but in my case, there was still something missing.

My app is built as a library (dll) and called by a non-Qt application. I used windeployqt.exe to set up the Qt dlls, platforms, plugins, etc. in the install directory, but it still couldn’t find the platform. After some experimentation, I realized the application’s working directory was set to a different folder. So, I grabbed the directory in which the dll «lived» using GetModuleHandleExA and added that directory to the Qt library path at runtime using

QCoreApplication::addLibraryPath(<result of GetModuleHandleExA>);

This worked for me.

answered May 9, 2018 at 13:14

Jacob Robbins's user avatar

I had the same problem and solved it by applying several things.
The first, if it is a program that you did with Qt.

In the folder (in my case) of «C: Qt Qt5.10.0 5.10.0 msvc2017_64 plugins» you find other folders, one of them is «platforms». That «platforms» folder is going to be copied next to your .exe executable. Now, if you get the error 0xc000007d is that you did not copy the version that was, since it can be 32bits or 64.

If you continue with the errors is that you lack more libraries. With the «Dependency Walker» program you can detect some of the missing folders. Surely it will indicate to you that you need an NVIDIA .dll, and it tells you the location.

Another way, instead of using «Dependency Walker» is to copy all the .dll from your «C: Windows System32» folder next to your executable file. Execute your .exe and if everything loads well, so you do not have space occupied in dll libraries that you do not need or use, use the .exe program with all your options and without closing the .exe you do is erase all the .dll that you just copied next to the .exe, so if those .dll are being used by your program, the system will not let you erase, only removing those that are not necessary.

I hope this solution serves you.

Remember that if your operating system is 64 bits, the libraries will be in the System32 folder, and if your operating system is 32 bits, they will also be in the System32 folder. This happens so that there are no compatibility problems with programs that are 32 bits in a 64-bit computer.
The SysWOW64 folder contains the 32-bit files as a backup.

EJoshuaS - Stand with Ukraine's user avatar

answered Mar 23, 2018 at 17:41

Ire's user avatar

1

For a MinGW platform and if you are compiling a Debug target by a hand made CMakeLists.txt written ad hoc you need to add the qwindows.dll to the platform dir as well.
The windeployqt executable does its work well but it seems that for some strange reason the CMake build needs the release variant as well.
In summary it will be better to have both the qwindows.dll and qwindowsd.dll in your platform directory.
I did not notice the same strange result when importing the CMake project in QtCreator and then running the build procedure.
Compiling on the command line the CMake project seems to trigger the qwindows.dll dependency either if the correct one for the Debug target is set in place (qwindowsd.dll)

answered Oct 11, 2017 at 9:40

Michal Turlik's user avatar

Use this batch file: RunWithQt.bat

@echo off
set QTDIR=C:QtQt5.1.15.1.1msvc2012bin
set QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%pluginsplatforms
start %1
  • to use it, drag your gui.exe file and drop it on the RunWithQt.bat in explorer,
  • or call RunWithQt gui.exe from the command line

answered Feb 8, 2018 at 15:54

Jakub Krzesłowski's user avatar

If you have Anaconda installed I recomend you to uninstall it and try installing python package from source, i fixed this problem in this way

answered Mar 27, 2018 at 19:39

Soberbia coding's user avatar

The application qtbase/bin/windeployqt.exe deploys automatically your application. If you start a prompt with envirenmentvariables set correctly, it deploys to the current directory.
You find an example of script:

@echo off
set QTDIR=E:QT5110vc2017

set INCLUDE=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726ATLMFCinclude;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726include;C:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum;C:Program Files (x86)Windows Kits10include10.0.14393.0ucrt;C:Program Files (x86)Windows Kits10include10.0.14393.0shared;C:Program Files (x86)Windows Kits10include10.0.14393.0um;C:Program Files (x86)Windows Kits10include10.0.14393.0winrt;C:Program Files (x86)Windows Kits10include10.0.14393.0cppwinrt

set LIB=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726ATLMFClibx86;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726libx86;C:Program Files (x86)Windows KitsNETFXSDK4.6.1libumx86;C:Program Files (x86)Windows Kits10lib10.0.14393.0ucrtx86;C:Program Files (x86)Windows Kits10lib10.0.14393.0umx86;

set LIBPATH=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726ATLMFClibx86;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726libx86;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726libx86storereferences;C:Program Files (x86)Windows Kits10UnionMetadata10.0.17134.0;C:ProgramFiles (x86)Windows Kits10References10.0.17134.0;C:WindowsMicrosoft.NETFrameworkv4.0.30319;

Path=%QTDIR%qtbasebin;%PATH%
set VCIDEInstallDir=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEVC
set VCINSTALLDIR=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVC
set VCToolsInstallDir=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.11.25503
set VisualStudioVersion=15.0
set VS100COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 10.0Common7Tools
set VS110COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 11.0Common7Tools
set VS120COMNTOOLS=S:Program Files (x86)Microsoft Visual Studio 12.0Common7Tools
set VS150COMNTOOLS=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7Tools
set VS80COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 8Common7Tools
set VS90COMNTOOLS=c:Program Files (x86)Microsoft Visual Studio 9.0Common7Tools
set VSINSTALLDIR=S:Program Files (x86)Microsoft Visual Studio2017Enterprise
set VSSDK110Install=C:Program Files (x86)Microsoft Visual Studio 11.0VSSDK
set VSSDK150INSTALL=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVSSDK
set WindowsLibPath=C:Program Files (x86)Windows Kits10UnionMetadata;C:Program Files (x86)Windows Kits10References
set WindowsSdkBinPath=C:Program Files (x86)Windows Kits10bin
set WindowsSdkDir=C:Program Files (x86)Windows Kits10
set WindowsSDKLibVersion=10.0.14393.0
set WindowsSdkVerBinPath=C:Program Files (x86)Windows Kits10bin10.0.14393.0
set WindowsSDKVersion=10.0.14393.0
set WindowsSDK_ExecutablePath_x64=C:Program Files (x86)Microsoft SDKsWindowsv10.0AbinNETFX 4.6.1 Toolsx64
set WindowsSDK_ExecutablePath_x86=C:Program Files (x86)Microsoft SDKsWindowsv10.0AbinNETFX 4.6.1 Tools

mkdir C:VCProjectsApplicationBuildVS2017_QT5_11_32-Releasesetup
cd C:VCProjectsApplicationBuildVS2017_QT5_11_32-Releasesetup
copy /Y ..Releaseapplication.exe .
windeployqt application.exe
pause

answered Nov 23, 2018 at 9:03

MyGeertRo's user avatar

MyGeertRoMyGeertRo

1311 silver badge3 bronze badges

Lets say, you wanted to have some CGAL-Demos portable. So you’d have a folder «CGAL», and in it, 1 subfolder called «lib»: all (common) support-dlls for any programs in the CGAL-folder go here. In our example, this would be the Dll-Download: simply unzip into the «lib» directory. The further you scroll down on the demos-page, the more impressive the content. In my case, the polyhedron-demo seemed about right. If this runs on my 10+ yo notebook, I’m impressed. So I created a folder «demo» in the «CGAL»-directory, alongside «lib».
Now create a .cmd-file in that folder. I named mine «Polyhedron.cmd». So we have a directory structure like this:

 CGAL - the bag for all the goodies
  lib - all libraries for all CGAL-packages
 demo - all the demos I'm interested in
[...] - certainly some other collections, several apps per folder...
Polyhedron.cmd - and a little script for every Qt-exe to make it truly portable.

In this little example, «Polyhedron.cmd» contains the following text:

@echo off
set "me=%~dp0"
set PATH=%me%lib
set "QT_PLUGIN_PATH=%me%libplugins"
start /b "CGAL Polyhedron Demo" "%me%demopolyhedronpolyhedron_3.exe"

All scripts can be the same apart from the last line, obviously. The only caveat is: the «DOS-Window» stays open for as long as you use the actual program. Close the shell-window, and you kill the *.exe as well. Whereever you copy the «CGAL»-folder, as the weird «%~dp0»-wriggle represents the full path to the *.cmd-file that we started, with trailing «». So «%me%lib» is always the full path to the actual library («CGALlib» in my case). The next 2 lines tell Qt where its «runtime» files are. This will be at least the file «qwindows.dll» for Windows-Qt programs plus any number of *.dlls. If I remember rightly, the Dll-library (at least when I downloaded it) had a little «bug» since it contains the «platforms»-directory with qwindows.dll in it. So when you open the lib directory, you need to create a folder «plugins» next to «platforms», and then move into «plugins». If a Qt-app, any Qt-app, doesn’t find «qwindows.dll», it cannot find «windows». And it expects it in a directory named «platforms» in the «plugins» directory, which it has to get told by the OS its running on…and if the «QT_PLUGIN_PATH» is not exactly pointing to all the helper-dlls you need, some Qt-programs will still run with no probs. And some complain about missing *.dlls you’ve never heard off…

answered Jan 20, 2019 at 4:09

Thomas Sturm's user avatar

I ran into the same error and solved it with a different method than those mentioned in other posts. Hopefully this will help future readers.

BUILD:

Windows 10 (64bit)
Minicoda (using python 3.9.4) (pkgs are from conda-forge channel)
pyqt 5.12.3

My scenario:

I was building a GUI application for some embedded work. I had two machines that were used for development (same OS and architecture), one had zero internet connection. After packaging up my environment and installing on the offline machine, I ran into the error that you got.

Solution:

locate the qt.conf file in your conda environment.
for me: C:Users»name»miniconda3envs»env_name»qt.conf

Make sure the paths are correct. I needed to update the «name» as this was left over from the old machine.

Hopefully this helps someone.

answered Jun 3, 2021 at 20:34

Jesse T-P's user avatar

Jesse T-PJesse T-P

1071 silver badge7 bronze badges

I had the same problem of running a QT5 application in windows 10 ( VS2019).
My error was

..DebugQt5Cored.dll
Module: 5.14.1
File: kernelqguiapplication.cpp
Line: 1249

This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.

Solution

Since I was using QT msvc2017, I copied plugins folders from «C:QtQt5.14.15.14.1msvc2017plugins» location to the binary location

it worked.

Then check visual studio output window and identify the dlls loaded from plugin folder and removed unwanted dlls

answered Dec 17, 2020 at 22:54

Saman's user avatar

SamanSaman

711 silver badge3 bronze badges

Setting QT_PLUGIN_PATH env variable to <...>/plugins directory also worked for me.

answered Jan 7, 2021 at 5:57

Andrei's user avatar

AndreiAndrei

7408 silver badges9 bronze badges

I got the error when Pycharm was trying to run Matplot. The solution that worked for me was setting the Anaconda3Libraryplugins directory (for example: c:Program filesAnaconda3Libraryplugins) as environment variable «QT_PLUGIN_PATH».
To set that you should go to Control Panel / System / Advanced System Settings / Environment Variables.

answered Sep 9, 2021 at 2:50

Star's user avatar

StarStar

837 bronze badges

Talking mainly about the Windows platform

Faced the same issue when trying to debug the app build using the vcpkg installed Qt library, while having my app build using cmake. Had trouble for some hours until found the solution. The simplest way is to do the following:

  • in your build folder, find the folder where the final executable is located.

  • in that folder, you’ll find some Qt libraries, like Qt6Core.dll.

  • pay attention to whether or not the library file has the d suffix in its name, i.e. Qt6Cored.dll instead of Qt6Core.dll

  • in the vcpkg folder, you have 2 options

    1. ./installed/x64-windows/Qt6/plugins/platforms
    2. ./installed/x64-windows/debug/Qt6/plugins/platforms
  • if the d suffix was present, copy the content of the ../debug/.. folder (otherwise the other one) into the platforms folder in the same folder, where your executable and the Qt libraries are located (if there’s no such folder, create on your own).

You can somehow automate this process. Leaving that task to you. If I do that on my own, will update the answer.

Edit

If you are using CMakeLists you may want to give this a try. Add the following to your app’s CMakeLists.txt

# assuming your target's name is app

if(WIN32)
    add_custom_command(
        TARGET app POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy_directory
            ${Qt6_DIR}/../../$<$<CONFIG:Debug>:debug/>Qt6/plugins/platforms/
            $<TARGET_FILE_DIR:app>/platforms/
    )
endif()

answered Mar 18, 2022 at 11:52

arsdever's user avatar

arsdeverarsdever

1,06010 silver badges29 bronze badges


Edit:
Some people started to mark my question as a duplicate. Do not forget that many similar questions existed when I asked this one (see e.g. the list below). However, none of these answers solved my problem. After a long search I found a comment which had been ignored by all users pointing to the missing lib. Now, many months later, the comment has been changed to an answer. However, when I answered this question by msyself I intended to help other people by directly providing the solution. This should not be forgotten and so far my answer helped a lot of people. Therefore my question is definitely not a duplicate. By the way: The accepted answer within the provided link on top does not solve the problem!


Yes, i used the search:

Failed to load platform plugin «windows». Available platforms are : Error

Deploying Qt C++ Application from Visual Studio qwindows.dll error

failed to load platform plugin «windows» Available platforms are: windows, minimal

However, in my case the problem still persists. I am using Qt 5.1.1 with Visual Studio 2012 and developed my Application on Windows 7 with Qt Creator 2.8.1. Application is compiled in «Release»-mode and can be executed if directly started with Qt Creator.

However, when starting from the «release»-Folder, i get the following message:

This application failed to start because it could not find or load the
Qt platform plugin «windows». Available platform plugins are:
minimal, offscreen, windows.

Folder structure looks like this:

release
+ gui.exe
+ icudt51.dll
+ icuin51.dll
+ icuuc51.dll
+ libGLESv2.dll
+ Qt5Core.dll
+ Qt5Gui.dll
+ Qt5Widgets.dll
+ platforms

Platforms is the folder directly copied from QtQt5.1.15.1.1msvc2012pluginsplatforms including e.g. qwindows.dll. Does not matter if I rename it to «platform» as some other users did. Qt is still not finding the «platform plugin windows», where is my mistake?

Community's user avatar

asked Dec 10, 2013 at 13:16

Anonymous's user avatar

5

Okay, as posted here https://stackoverflow.com/a/17271172/1458552 without much attention by other users:

The libEGL.dll was missing! Even though this has not been reported when trying to start the application (all other *.dlls such as Qt5Gui.dll had been reported).

Community's user avatar

answered Dec 10, 2013 at 13:43

Anonymous's user avatar

AnonymousAnonymous

4,5778 gold badges47 silver badges61 bronze badges

8

I created a platforms directory next to my exe location and put qwindows.dll inside, but I still received the «Failed to load platform plugin «windows». Available platforms are: windows» error.

I had copied qwindows.dll from C:QtQt5.1.1ToolsQtCreatorbinpluginsplatforms, which is not the right location. I looked at the debug log from running in Qt Creator and found that my app was looking in C:QtQt5.1.15.1.1mingw48_32pluginsplatforms when it ran in the debugger.

When I copied from C:QtQt5.1.15.1.1mingw48_32pluginsplatforms, everything worked fine.

answered Jun 12, 2014 at 19:30

Brandon's user avatar

BrandonBrandon

5514 silver badges2 bronze badges

2

The release is likely missing a library/plugin or the library is in the wrong directory and or from the wrong directory.

Qt intended answer: Use windeployqt. see last paragraph for explanation

Manual answer:

Create a folder named «platforms» in the same directory as your application.exe file. Copy and paste the qwindows.dll, found in the /bin of whichever compiler you used to release your application, into the «platforms» folder. Like magic it works. If the .dll is not there check plugins/platforms/ ( with plugins/ being in the same directory as bin/ ) <— PfunnyGuy’s comment.

It seems like a common issue is that the .dll was taken from the wrong compiler bin. Be sure to copy your the qwindows.dll from the same compiler as the one used to release your app.

Qt comes with platform console applications that will add all dependencies (including ones like qwindows.dll and libEGL.dll) into the folder of your deployed executable. This is the intended way to deploy your application, so you do not miss any libraries (which is the main issue with all of these answers). The application for windows is called windeployqt. There is likely a deployment console app for each OS.

Lukasz Czerwinski's user avatar

answered Aug 10, 2017 at 2:10

CrippledTable's user avatar

4

Setting the QT_QPA_PLATFORM_PLUGIN_PATH environment variable to %QTDIR%pluginsplatforms worked for me.

It was also mentioned here and here.

Community's user avatar

answered Oct 30, 2016 at 12:38

Jim G.'s user avatar

Jim G.Jim G.

15k22 gold badges104 silver badges164 bronze badges

3

I ran into this and none of the answers I could find fixed it for me.

My colleauge has Qt (5.6.0) installed on his machine at:
C:QtQt5.6.05.6msvc2015plugins
I have Qt (5.6.2) installed in the same location.

I learned from this post: http://www.tripleboot.org/?p=536, that the Qt5Core.dll has a location to the plugins written to it when Qt is first installed.
Since my colleague’s and my Qt directories were the same, but different version of Qt were installed, a different qwindows.dll file is needed. When I ran an exe deployed by him, it would use my C:QtQt5.6.05.6msvc2015pluginsplatformsqwindows.dll file instead of the one located next to the executable in the .platforms subfolder.

To get around this, I added the following line of code to the application which seems to force it to look next to the exe for the ‘platforms’ subfolder before it looks at the path in the Qt5Core.dll.

QCoreApplication::addLibraryPath(".");

I added the above line to the main method before the QApplication call like this:

int main( int argc, char *argv[] )
{
    QCoreApplication::addLibraryPath(".");
    QApplication app( argc, argv );
    ...
    return app.exec();
}

answered Mar 13, 2017 at 15:38

Joel's user avatar

JoelJoel

1372 silver badges7 bronze badges

3

create dir platforms and copy qwindows.dll to it, platforms and app.exe are in the same dir


cd app_dir
mkdir platforms
xcopy qwindows.dll platformsqwindows.dll

Folder structure

+ app.exe
+ platformsqwindows.dll

answered Mar 8, 2018 at 9:24

KunMing Xie's user avatar

KunMing XieKunMing Xie

1,57316 silver badges15 bronze badges

3

I found another solution. Create qt.conf in the app folder as such:

[Paths]
Prefix = .

And then copy the plugins folder into the app folder and it works for me.

answered Aug 6, 2017 at 18:56

Peter Quiring's user avatar

Peter QuiringPeter Quiring

1,5881 gold badge15 silver badges21 bronze badges

1

For anyone coming from QT version 5.14.0, it took me 2 days to find this piece statment of bug:

windeployqt does not work for MinGW QTBUG-80763 Will be fixed in
5.14.1

https://wiki.qt.io/Qt_5.14.0_Known_Issues

So be aware. Using windeployqt withMinGW will give the same error stated here.

answered Jan 17, 2020 at 3:41

Yahya Tawil's user avatar

Yahya TawilYahya Tawil

3873 silver badges10 bronze badges

I had this problem while using QT 5.6, Anaconda 4.3.23, python 3.5.2 and pyinstaller 3.3.
I had created a python program with an interface developed using QTcreator, but had to deploy it to other computers, therefore I needed to make an executable, using pyinstaller.

I’ve found that the problem was solved on my computer if I set the following environment variables:

QT_QPA_PLATFORM_PLUGIN_PATH: %QTDIR%pluginsplatforms

QTDIR: C:Miniconda3pkgsqt-5.6.2-vc14_3Library

But this solution only worked on my PC that had conda and qt installed in those folders.

To solve this and make the executable work on any computer, I’ve had to edit the «.spec» (file first generated by pyinstaller) to include the following line:

datas=[(
‘C:Miniconda3pkgsqt-5.6.2-vc14_3Librarypluginsplatforms*.dll’,
‘platforms’ ),]

This solution is based on the answers of Jim G. and CrippledTable

answered Oct 3, 2017 at 12:34

Loebsen Van de Graaff's user avatar

For me the solution was to correct the PATH variable. It had Anaconda3Librarybin as one of the first paths. This directory contains some Qt libraries, but not all. Apparently, that is a problem. Moving C:ProgramsQt5.12.3msvc2017_64bin to the front of PATH solved the problem for me.

answered Apr 29, 2019 at 13:23

Jann Poppinga's user avatar

Most of these answers contain good (correct) info, but in my case, there was still something missing.

My app is built as a library (dll) and called by a non-Qt application. I used windeployqt.exe to set up the Qt dlls, platforms, plugins, etc. in the install directory, but it still couldn’t find the platform. After some experimentation, I realized the application’s working directory was set to a different folder. So, I grabbed the directory in which the dll «lived» using GetModuleHandleExA and added that directory to the Qt library path at runtime using

QCoreApplication::addLibraryPath(<result of GetModuleHandleExA>);

This worked for me.

answered May 9, 2018 at 13:14

Jacob Robbins's user avatar

I had the same problem and solved it by applying several things.
The first, if it is a program that you did with Qt.

In the folder (in my case) of «C: Qt Qt5.10.0 5.10.0 msvc2017_64 plugins» you find other folders, one of them is «platforms». That «platforms» folder is going to be copied next to your .exe executable. Now, if you get the error 0xc000007d is that you did not copy the version that was, since it can be 32bits or 64.

If you continue with the errors is that you lack more libraries. With the «Dependency Walker» program you can detect some of the missing folders. Surely it will indicate to you that you need an NVIDIA .dll, and it tells you the location.

Another way, instead of using «Dependency Walker» is to copy all the .dll from your «C: Windows System32» folder next to your executable file. Execute your .exe and if everything loads well, so you do not have space occupied in dll libraries that you do not need or use, use the .exe program with all your options and without closing the .exe you do is erase all the .dll that you just copied next to the .exe, so if those .dll are being used by your program, the system will not let you erase, only removing those that are not necessary.

I hope this solution serves you.

Remember that if your operating system is 64 bits, the libraries will be in the System32 folder, and if your operating system is 32 bits, they will also be in the System32 folder. This happens so that there are no compatibility problems with programs that are 32 bits in a 64-bit computer.
The SysWOW64 folder contains the 32-bit files as a backup.

EJoshuaS - Stand with Ukraine's user avatar

answered Mar 23, 2018 at 17:41

Ire's user avatar

1

For a MinGW platform and if you are compiling a Debug target by a hand made CMakeLists.txt written ad hoc you need to add the qwindows.dll to the platform dir as well.
The windeployqt executable does its work well but it seems that for some strange reason the CMake build needs the release variant as well.
In summary it will be better to have both the qwindows.dll and qwindowsd.dll in your platform directory.
I did not notice the same strange result when importing the CMake project in QtCreator and then running the build procedure.
Compiling on the command line the CMake project seems to trigger the qwindows.dll dependency either if the correct one for the Debug target is set in place (qwindowsd.dll)

answered Oct 11, 2017 at 9:40

Michal Turlik's user avatar

Use this batch file: RunWithQt.bat

@echo off
set QTDIR=C:QtQt5.1.15.1.1msvc2012bin
set QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%pluginsplatforms
start %1
  • to use it, drag your gui.exe file and drop it on the RunWithQt.bat in explorer,
  • or call RunWithQt gui.exe from the command line

answered Feb 8, 2018 at 15:54

Jakub Krzesłowski's user avatar

If you have Anaconda installed I recomend you to uninstall it and try installing python package from source, i fixed this problem in this way

answered Mar 27, 2018 at 19:39

Soberbia coding's user avatar

The application qtbase/bin/windeployqt.exe deploys automatically your application. If you start a prompt with envirenmentvariables set correctly, it deploys to the current directory.
You find an example of script:

@echo off
set QTDIR=E:QT5110vc2017

set INCLUDE=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726ATLMFCinclude;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726include;C:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum;C:Program Files (x86)Windows Kits10include10.0.14393.0ucrt;C:Program Files (x86)Windows Kits10include10.0.14393.0shared;C:Program Files (x86)Windows Kits10include10.0.14393.0um;C:Program Files (x86)Windows Kits10include10.0.14393.0winrt;C:Program Files (x86)Windows Kits10include10.0.14393.0cppwinrt

set LIB=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726ATLMFClibx86;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726libx86;C:Program Files (x86)Windows KitsNETFXSDK4.6.1libumx86;C:Program Files (x86)Windows Kits10lib10.0.14393.0ucrtx86;C:Program Files (x86)Windows Kits10lib10.0.14393.0umx86;

set LIBPATH=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726ATLMFClibx86;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726libx86;S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.15.26726libx86storereferences;C:Program Files (x86)Windows Kits10UnionMetadata10.0.17134.0;C:ProgramFiles (x86)Windows Kits10References10.0.17134.0;C:WindowsMicrosoft.NETFrameworkv4.0.30319;

Path=%QTDIR%qtbasebin;%PATH%
set VCIDEInstallDir=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEVC
set VCINSTALLDIR=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVC
set VCToolsInstallDir=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVCToolsMSVC14.11.25503
set VisualStudioVersion=15.0
set VS100COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 10.0Common7Tools
set VS110COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 11.0Common7Tools
set VS120COMNTOOLS=S:Program Files (x86)Microsoft Visual Studio 12.0Common7Tools
set VS150COMNTOOLS=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7Tools
set VS80COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 8Common7Tools
set VS90COMNTOOLS=c:Program Files (x86)Microsoft Visual Studio 9.0Common7Tools
set VSINSTALLDIR=S:Program Files (x86)Microsoft Visual Studio2017Enterprise
set VSSDK110Install=C:Program Files (x86)Microsoft Visual Studio 11.0VSSDK
set VSSDK150INSTALL=S:Program Files (x86)Microsoft Visual Studio2017EnterpriseVSSDK
set WindowsLibPath=C:Program Files (x86)Windows Kits10UnionMetadata;C:Program Files (x86)Windows Kits10References
set WindowsSdkBinPath=C:Program Files (x86)Windows Kits10bin
set WindowsSdkDir=C:Program Files (x86)Windows Kits10
set WindowsSDKLibVersion=10.0.14393.0
set WindowsSdkVerBinPath=C:Program Files (x86)Windows Kits10bin10.0.14393.0
set WindowsSDKVersion=10.0.14393.0
set WindowsSDK_ExecutablePath_x64=C:Program Files (x86)Microsoft SDKsWindowsv10.0AbinNETFX 4.6.1 Toolsx64
set WindowsSDK_ExecutablePath_x86=C:Program Files (x86)Microsoft SDKsWindowsv10.0AbinNETFX 4.6.1 Tools

mkdir C:VCProjectsApplicationBuildVS2017_QT5_11_32-Releasesetup
cd C:VCProjectsApplicationBuildVS2017_QT5_11_32-Releasesetup
copy /Y ..Releaseapplication.exe .
windeployqt application.exe
pause

answered Nov 23, 2018 at 9:03

MyGeertRo's user avatar

MyGeertRoMyGeertRo

1311 silver badge3 bronze badges

Lets say, you wanted to have some CGAL-Demos portable. So you’d have a folder «CGAL», and in it, 1 subfolder called «lib»: all (common) support-dlls for any programs in the CGAL-folder go here. In our example, this would be the Dll-Download: simply unzip into the «lib» directory. The further you scroll down on the demos-page, the more impressive the content. In my case, the polyhedron-demo seemed about right. If this runs on my 10+ yo notebook, I’m impressed. So I created a folder «demo» in the «CGAL»-directory, alongside «lib».
Now create a .cmd-file in that folder. I named mine «Polyhedron.cmd». So we have a directory structure like this:

 CGAL - the bag for all the goodies
  lib - all libraries for all CGAL-packages
 demo - all the demos I'm interested in
[...] - certainly some other collections, several apps per folder...
Polyhedron.cmd - and a little script for every Qt-exe to make it truly portable.

In this little example, «Polyhedron.cmd» contains the following text:

@echo off
set "me=%~dp0"
set PATH=%me%lib
set "QT_PLUGIN_PATH=%me%libplugins"
start /b "CGAL Polyhedron Demo" "%me%demopolyhedronpolyhedron_3.exe"

All scripts can be the same apart from the last line, obviously. The only caveat is: the «DOS-Window» stays open for as long as you use the actual program. Close the shell-window, and you kill the *.exe as well. Whereever you copy the «CGAL»-folder, as the weird «%~dp0»-wriggle represents the full path to the *.cmd-file that we started, with trailing «». So «%me%lib» is always the full path to the actual library («CGALlib» in my case). The next 2 lines tell Qt where its «runtime» files are. This will be at least the file «qwindows.dll» for Windows-Qt programs plus any number of *.dlls. If I remember rightly, the Dll-library (at least when I downloaded it) had a little «bug» since it contains the «platforms»-directory with qwindows.dll in it. So when you open the lib directory, you need to create a folder «plugins» next to «platforms», and then move into «plugins». If a Qt-app, any Qt-app, doesn’t find «qwindows.dll», it cannot find «windows». And it expects it in a directory named «platforms» in the «plugins» directory, which it has to get told by the OS its running on…and if the «QT_PLUGIN_PATH» is not exactly pointing to all the helper-dlls you need, some Qt-programs will still run with no probs. And some complain about missing *.dlls you’ve never heard off…

answered Jan 20, 2019 at 4:09

Thomas Sturm's user avatar

I ran into the same error and solved it with a different method than those mentioned in other posts. Hopefully this will help future readers.

BUILD:

Windows 10 (64bit)
Minicoda (using python 3.9.4) (pkgs are from conda-forge channel)
pyqt 5.12.3

My scenario:

I was building a GUI application for some embedded work. I had two machines that were used for development (same OS and architecture), one had zero internet connection. After packaging up my environment and installing on the offline machine, I ran into the error that you got.

Solution:

locate the qt.conf file in your conda environment.
for me: C:Users»name»miniconda3envs»env_name»qt.conf

Make sure the paths are correct. I needed to update the «name» as this was left over from the old machine.

Hopefully this helps someone.

answered Jun 3, 2021 at 20:34

Jesse T-P's user avatar

Jesse T-PJesse T-P

1071 silver badge7 bronze badges

I had the same problem of running a QT5 application in windows 10 ( VS2019).
My error was

..DebugQt5Cored.dll
Module: 5.14.1
File: kernelqguiapplication.cpp
Line: 1249

This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.

Solution

Since I was using QT msvc2017, I copied plugins folders from «C:QtQt5.14.15.14.1msvc2017plugins» location to the binary location

it worked.

Then check visual studio output window and identify the dlls loaded from plugin folder and removed unwanted dlls

answered Dec 17, 2020 at 22:54

Saman's user avatar

SamanSaman

711 silver badge3 bronze badges

Setting QT_PLUGIN_PATH env variable to <...>/plugins directory also worked for me.

answered Jan 7, 2021 at 5:57

Andrei's user avatar

AndreiAndrei

7408 silver badges9 bronze badges

I got the error when Pycharm was trying to run Matplot. The solution that worked for me was setting the Anaconda3Libraryplugins directory (for example: c:Program filesAnaconda3Libraryplugins) as environment variable «QT_PLUGIN_PATH».
To set that you should go to Control Panel / System / Advanced System Settings / Environment Variables.

answered Sep 9, 2021 at 2:50

Star's user avatar

StarStar

837 bronze badges

Talking mainly about the Windows platform

Faced the same issue when trying to debug the app build using the vcpkg installed Qt library, while having my app build using cmake. Had trouble for some hours until found the solution. The simplest way is to do the following:

  • in your build folder, find the folder where the final executable is located.

  • in that folder, you’ll find some Qt libraries, like Qt6Core.dll.

  • pay attention to whether or not the library file has the d suffix in its name, i.e. Qt6Cored.dll instead of Qt6Core.dll

  • in the vcpkg folder, you have 2 options

    1. ./installed/x64-windows/Qt6/plugins/platforms
    2. ./installed/x64-windows/debug/Qt6/plugins/platforms
  • if the d suffix was present, copy the content of the ../debug/.. folder (otherwise the other one) into the platforms folder in the same folder, where your executable and the Qt libraries are located (if there’s no such folder, create on your own).

You can somehow automate this process. Leaving that task to you. If I do that on my own, will update the answer.

Edit

If you are using CMakeLists you may want to give this a try. Add the following to your app’s CMakeLists.txt

# assuming your target's name is app

if(WIN32)
    add_custom_command(
        TARGET app POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy_directory
            ${Qt6_DIR}/../../$<$<CONFIG:Debug>:debug/>Qt6/plugins/platforms/
            $<TARGET_FILE_DIR:app>/platforms/
    )
endif()

answered Mar 18, 2022 at 11:52

arsdever's user avatar

arsdeverarsdever

1,06010 silver badges29 bronze badges

Доброго времени суток.
При запуске нового приложения (установка прошла успешно без каких-либо ошибок) на Ubuntu 20.04 старт программы завершается ошибкой —

(This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
2020-04-18T15:53:56 7[/] Project initial: Программа прервана!
Аварийный останов (стек памяти сброшен на диск))


Это-же приложение на Ubuntu 18.04.01 — запускалось и работало без проблем.
Переустановка приложения никак не помогает.

При выводе в терминал какие плагины Qt как запускаются видно, что плагин «xcb» — не может загрузится или запуститься.

~$ openscada
2020-04-19T00:58:25 1[/] Первичная станция: Загрузка.
2020-04-19T00:58:25 1[/sub_BD/] Project initial > Базы Данных: Подключение модуля 'SQLite'.
2020-04-19T00:58:25 1[/sub_BD/] Project initial > Базы Данных: Подключение модуля 'DBF'.
2020-04-19T00:58:25 1[/sub_DAQ/] Project initial > Сбор Данных: Подключение модуля 'JavaLikeCalc'.
2020-04-19T00:58:25 1[/sub_DAQ/] Project initial > Сбор Данных: Подключение модуля 'LogicLev'.
2020-04-19T00:58:25 1[/sub_Transport/] Project initial > Транспорты: Подключение модуля 'Sockets'.
2020-04-19T00:58:25 1[/sub_Transport/] Project initial > Транспорты: Подключение модуля 'Serial'.
2020-04-19T00:58:25 1[/sub_Protocol/] Project initial > Транспортные Протоколы: Подключение модуля 'SelfSystem'.
2020-04-19T00:58:25 1[/sub_Protocol/] Project initial > Транспортные Протоколы: Подключение модуля 'UserProtocol'.
2020-04-19T00:58:25 1[/sub_Special/] Project initial > Специальные: Подключение модуля 'FLibSYS'.
2020-04-19T00:58:25 1[/sub_Special/] Project initial > Специальные: Подключение модуля 'FLibComplex1'.
2020-04-19T00:58:25 1[/sub_UI/] Project initial > Интерфейсы Пользователя: Подключение модуля 'QTStarter'.
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("xcb")
Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/opt/Qt/lib/libQt5XcbQpa.so.5: undefined symbol: _ZN20QEventDispatcherUNIX6selectEiP6fd_setS1_S1_P8timespec)
QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/opt/Qt/lib/libQt5XcbQpa.so.5: undefined symbol: _ZN20QEventDispatcherUNIX6selectEiP6fd_setS1_S1_P8timespec)"
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
2020-04-19T00:58:25 7[/] Project initial: Программа прервана!
Аварийный останов (стек памяти сброшен на диск)


Хотя файл библиотеки Qt libqxcb.so по указаному пути /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so присутствует.
Подскажите, что возможно предпринять чтобы устранить ошибку.
Заранее спасибо за помощь.

Правила форума
1.4. Листинги и содержимое текстовых файлов следует добавлять в сообщение с помощью тегов

Показать скрытое содержание

или [code]…[/code], либо прикреплять к сообщению в виде отдельного файла. Длинные гиперссылки следует оформлять при помощи тега [url=]…[/url]

  —Aleksandru

Get this somewhat strange error message fixed on Windows.

A surface laptop on a table

Have you recently run into the “Application failed to start because no Qt platform plugin could be initialized” error? QT is a cross-platform app that is used to generate graphical user interfaces. Even if QT support for Windows platforms is extensive, your system might display the error message when you try to open OneDrive, OBS Studio, Python, or even video games.

While this isn’t one of the common errors on Windows, you can still fix it using the tips below.

1. Change the QT Files Location

Sometimes, a simple trick such as changing the QT files location is enough to get rid of the error. Here’s how you can do it:

  1. Launch File Explorer and open This PC.
  2. Using the Search field, search for pyqt5_tools.
  3. When Windows finishes the search, right-click the pyqt5_tools and head to Open folder location.
  4. Head to PyQt5 > Qt > bin. Copy the platforms folder.
    Fix qt error
  5. Make a new search for site-packages and open the folder.
  6. There, paste the platforms folder.
  7. Windows will warn you there’s already a folder with the same name. Click Replace the files in the destination.

2. Run an SFC Scan

There’s a chance Windows display the “Application failed because no QT platform plugin could be initialized” error due to corrupt system files. Fortunately, Windows has a built-in tool to help you fix the problem.

In the Start menu search bar, search for command prompt and select Run as administrator. Then, run the sfc /scannow command line. Windows will scan and automatically replace any corrupted system file.

sfc-scan-1-1

If the System File Checker didn’t fix the problem, there are more built-in tools to repair corrupt Windows files.

3. Perform a Clean Boot

One of the installed third-party apps might be the reason why you get the “Application failed because no QT platform plugin could be initialized” error. To test it, perform a clean boot on Windows, which will force it to boot with a minimal list of programs and drivers.

If Windows stops displaying the error, it means something you’ve installed on your PC is causing the problem. Take a look at your installed apps, and remove any software that might be causing the problem. If you’re unsure as to what might be doing it, slowly re-enable apps through the clean boot until the issue reappears.

4. Update the Malfunctioning App

An outdated version of the app you’re trying to use might be the reason for the QT error. In this case, simply updating the app should solve the issue.

If you’ve downloaded the app from Microsoft Store, launch it and head to Library. There, you’ll see a list of available updates. You can update the apps individually, or click Get updates to update them all.

Update Microsoft Store apps

5. Reinstall the Troublesome App

As the error message hints, reinstalling the app might fix the problem. When reinstalling the app, make sure you get it from its official website, to avoid any future problems.

If you’re having issues getting rid of the app, check out how to fix Windows when it won’t allow you to uninstall a program.

6. Uninstall Any Recent Windows Updates

Sometimes, Windows display the “Application failed because no QT platform plugin could be initialized” error after a system update. In this case, you can load a restore point to undo the change and get rid of the error.

But if there’s no restore point available, you can manually uninstall Windows updates.

  1. Launch Windows Settings by pressing Win + I.
  2. From the left pane, click Windows Update > Update History.
  3. Head to Related Settings and click Uninstall updates.
  4. Right-click the latest update and select Uninstall.

Uninstall recent Windows updates

Get Rid of the QT Error on Windows

Hopefully, one or more of the above solutions helped you fix the “Application failed to start because no Qt platform plugin could be initialized” error.

Sometimes, it’s difficult to figure out the exact cause of a Windows error, and reinstalling the app every time might not be the most efficient solution. To speed up the troubleshooting process, you should use one of the many Windows repair tools.

Привет.
Нужна помощь или совет.
— Пытаюсь запустить сервер spring boot, он запускается но затем процесс останавливается.
Ниже скинул все ошибки что вылетают..
Гуглил варианты решения — удалял/добавлял всякие зависимости, менял названия методов, игрался с аннотациями))
но ничего пока не помогло.
Вот фрагменты кода где возможно что то нужно изменить или переписать:
Controller:

@Controller
public class Controller1 {
    private Daos daos;
    @GetMapping(value = "/showAll")
    public String findALl(Model model){
        List<User> list = daos.findAll();
        model.addAttribute("users", list);
        return "findAll";
    }
}

JpaRep:

public interface JpaMethodsClassImpl extends JpaRepository<User, Long> {
}

Фрагмент из сервиса:

private final JpaMethodsClassImpl jpaMethodsClass;

@Autowired
public Daos(JpaMethodsClassImpl jpaMethodsClass) {
    this.jpaMethodsClass = jpaMethodsClass;
}

public List<User> findAll(){
    return jpaMethodsClass.findAll();
}

Как пофиксить не знаю:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-03-07 16:18:26.033 ERROR 6380 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/jpa/HibernatePersistenceProvider
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.16.jar:5.3.16]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.16.jar:5.3.16]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.16.jar:5.3.16]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.4.jar:2.6.4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.4.jar:2.6.4]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.4.jar:2.6.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.4.jar:2.6.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.4.jar:2.6.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.4.jar:2.6.4]
	at com.example.springbootdemo1.SpringbootDemo1Application.main(SpringbootDemo1Application.java:16) ~[classes/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.6.4.jar:2.6.4]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/jpa/HibernatePersistenceProvider
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.16.jar:5.3.16]
	... 24 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/jpa/HibernatePersistenceProvider
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.16.jar:5.3.16]
	... 38 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/jpa/HibernatePersistenceProvider
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.16.jar:5.3.16]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.16.jar:5.3.16]
	... 52 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/hibernate/jpa/HibernatePersistenceProvider
	at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[na:na]
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[na:na]
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) ~[na:na]
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) ~[na:na]
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) ~[na:na]
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na]
	at org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter.<init>(HibernateJpaVendorAdapter.java:84) ~[spring-orm-5.3.16.jar:5.3.16]
	at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.createJpaVendorAdapter(HibernateJpaConfiguration.java:125) ~[spring-boot-autoconfigure-2.6.4.jar:2.6.4]
	at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter(JpaBaseConfiguration.java:105) ~[spring-boot-autoconfigure-2.6.4.jar:2.6.4]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.16.jar:5.3.16]
	... 53 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.hibernate.jpa.HibernatePersistenceProvider
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na]
	... 70 common frames omitted


Process finished with exit code 0

Понравилась статья? Поделить с друзьями:
  • Ошибка the application failed a problem
  • Ошибка the application faced a problem
  • Ошибка the application does not support your operating system
  • Ошибка the application could not be started
  • Ошибка the apache service named