Skycoder42 / QtService

A platform independent library to easily create system services and use some of their features

Home Page:https://skycoder42.github.io/QtService/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR_SERVICE_REQUEST_TIMEOUT (1053/0x41D)

DowJhob opened this issue · comments

subj, when attempt start example echoservice
all dll copyed with windeployqt
win10, qt5.12.5, by all users on machine..

This error generally indicates, that for some reason the service did not start correctly. The reason is most likely, that some Qt paths are not detected correctly. You can find out with a few steps:

  1. After running windeployqt, the servicebackends plugin folder should still be missing, as windeployqt does not copy those... Make sure to copy that folder from your Qt installation, and verify that qwindows[d].dll are in that folder.
  2. If not working, check the generated qt.conf - are the paths there correct?
  3. If that still does not work, the paths are most likely detected incorrectly and qt.conf won't help, because it is only used after the plugins are required. The only way around here is to set the environment variables from within the application. Add the following your main before creating the service instance:
// the directoy, where the binary is located
const auto appDir = QFileInfo{QString::fromUtf8(argv[0])}.dir();
qputenv("QT_PLUGIN_PATH", appDir.absolutePath().toUtf8());
// or use appDir.absoluteFilePath("..."), if plugins are in a subfolder.

Where should qt.conf be located?

third option helped, add it to the repository