Unsolved QtWebEngine Linux deployment problem
-
I have a program on Qt using QtWebEngine, which I compiled on Ubuntu. I need to run this program on other computers with Ubuntu.
I tried to run my program on the VM and on a real computer. I got the same result. The program does not start, but the console displays the following:Qt WebEngine ICU data not found at /home/username/Qt/Qt5.9.2/5.9.2/gcc_64/resources. Trying parent directory... Qt WebEngine ICU data not found at /home/username/Qt/Qt5.9.2/5.9.2/gcc_64. Trying application directory... Qt WebEngine ICU data not found at /home/new_username/Downloads/appname/libexec. Trying fallback directory... The application MAY NOT work. Path override failed for key base::DIR_QT_LIBRARY_DATA and path '/home/new_username/.QtWebEngineProcess' Installed Qt WebEngine locales directory not found at location /home/username/Qt/Qt5.9.2/5.9.2/gcc_64/translations/qtwebengine_locales. Trying application directory... Qt WebEngine locales directory not found at location /home/new_username/Downloads/appname/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct. Path override failed for key ui::DIR_LOCALES and path '/home/new_username/.QtWebEngineProcess' [0213/200348.562665:ERROR:icu_util.cc(178)] Invalid file descriptor to ICU data received. [0213/200348.562776:FATAL:content_main_runner.cc(691)] Check failed: base::i18n::InitializeICU(). #0 0x7fbebaec9b2e <unknown> #1 0x7fbebaedb83e <unknown> #2 0x7fbebaea8072 <unknown> #3 0x7fbebaea158d <unknown> #4 0x7fbeba5c5eb9 QtWebEngine::processMain() #5 0x0000004009f3 <unknown> #6 0x7fbeb6a111c1 __libc_start_main #7 0x000000400a31 <unknown> [5347:5347:0213/200348.725463:FATAL:zygote_host_impl_linux.cc(182)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid). #0 0x7fcbe8994b2e <unknown> #1 0x7fcbe89a683e <unknown> #2 0x7fcbe86065d3 <unknown> #3 0x7fcbe86052cb <unknown> #4 0x7fcbe860586e <unknown> #5 0x7fcbe82c165d <unknown> #6 0x7fcbe82c4f03 <unknown> #7 0x7fcbe80bf39f <unknown> #8 0x7fcbe80c0675 <unknown> #9 0x7fcbe80b09d9 <unknown> #10 0x7fcbe80b0d2e QtWebEngineCore::WebContentsAdapter::WebContentsAdapter() #11 0x7fcbf18aabb1 <unknown> #12 0x7fcbf18ab734 QWebEnginePage::QWebEnginePage() #13 0x7fcbf18b881b QWebEngineView::page() #14 0x7fcbf18b8ff1 QWebEngineView::showEvent() #15 0x7fcbf0f7b9b8 QWidget::event() #16 0x7fcbf0f3f5ec QApplicationPrivate::notify_helper() #17 0x7fcbf0f46a17 QApplication::notify() #18 0x7fcbef4ed2b8 QCoreApplication::notifyInternal2() #19 0x7fcbf0f78963 QWidgetPrivate::show_helper() #20 0x7fcbf0f7b505 QWidget::setVisible() #21 0x7fcbf0f787f8 QWidgetPrivate::showChildren() #22 0x7fcbf0f7885f QWidgetPrivate::show_helper() #23 0x7fcbf0f787e7 QWidgetPrivate::showChildren() #24 0x7fcbf0f7885f QWidgetPrivate::show_helper() #25 0x7fcbf0f7b505 QWidget::setVisible() #26 0x7fcbf0f787f8 QWidgetPrivate::showChildren() #27 0x7fcbf0f7885f QWidgetPrivate::show_helper() #28 0x7fcbf0f7b505 QWidget::setVisible() #29 0x7fcbf0f787f8 QWidgetPrivate::showChildren() #30 0x7fcbf0f7885f QWidgetPrivate::show_helper() #31 0x7fcbf0f787e7 QWidgetPrivate::showChildren() #32 0x7fcbf0f7885f QWidgetPrivate::show_helper() #33 0x7fcbf0f787e7 QWidgetPrivate::showChildren() #34 0x7fcbf0f7885f QWidgetPrivate::show_helper() #35 0x7fcbf0f7b505 QWidget::setVisible() #36 0x558b6fe3b3c0 <unknown> #37 0x7fcbee3501c1 __libc_start_main #38 0x558b6fe3b67a <unknown> Aborted (core dumped)
To start the program, I run appname.sh .
#! /bin/sh LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"lib" export LD_LIBRARY_PATH exec ./appname
qt.conf:
[Paths] Prefix=.
The location of the files in the "appname" folder:
appname appname.sh qt.conf
This folder also contains all the files and folders copied from the path /home/username/Qt/Qt5.9.2/5.9.2/gcc_64/ (I did this in order to understand that all the necessary files are exactly here).
/home/username/Qt/Qt5.9.2/5.9.2/gcc_64/ - this is the path by which I installed Qt in the system on which I compiled the program.What's wrong, why are there so many errors? I have all the files here, so I'm confused.
Thanks! -
Hi and welcome to devnet,
Not a direct answer but did you consider using the linuxdeployqt project for that ?
Hope it helps
-
I found the code for QtWebEngine (https://github.com/qt/qtwebengine/blob/5.11/src/core/web_engine_library_info.cpp). Here I found a function icuDataPath() that returns the path to the ICU date, or outputs an error. This function completely matches the output sequence with what is output from me, except for the part in which is
QLibraryInfo::location (QLibraryInfo::DataPath) % QLatin1String ("/resources");
The fact is that I output my QLibraryInfo::location (QLibraryInfo::DataPath) before the program was crashed and it is
/home/new_username/Downloads/appname/lib
, that is, that way, I went and put the resource folder, but since I have a conclusion
/home/new_username/Downloads/appname/lib/libexec
it should be assumed that my QtWebEngine for some reason takes the meaningQLibratyInfo::location (QLibraryInfo::LibraryExecutablesPath) % QLatin1String ("/resources");
which corresponds to this path. I think that this is a bug in the QtWebEngine code.
If I move the resources folder to
/home/new_username/Downloads/appname/lib/libexec
, then some of the errors are lost. I think this solution is a solution for a part of the problem.Now the application displays only the following at run:
[0301/161509.651843:ERROR:icu_util.cc(178)] Invalid file descriptor to ICU data received. [0301/161509.651916:FATAL:content_main_runner.cc(691)] Check failed: base::i18n::InitializeICU(). #0 0x7f98d7ad0b2e <unknown> #1 0x7f98d7ae283e <unknown> #2 0x7f98d7aaf072 <unknown> #3 0x7f98d71fb36b <unknown> #4 0x7f98d71fc675 <unknown> #5 0x7f98d71ec9d9 <unknown> #6 0x7f98d71ecd2e QtWebEngineCore::WebContentsAdapter::WebContentsAdapter() #7 0x7f98e09e6bb1 <unknown> #8 0x7f98e09e7734 QWebEnginePage::QWebEnginePage() #9 0x7f98e09f481b QWebEngineView::page() #10 0x7f98e09f4ff1 QWebEngineView::showEvent() #11 0x7f98e00b79b8 QWidget::event() #12 0x7f98e007b5ec QApplicationPrivate::notify_helper() #13 0x7f98e0082a17 QApplication::notify() #14 0x7f98de6292b8 QCoreApplication::notifyInternal2() #15 0x7f98e00b4963 QWidgetPrivate::show_helper() #16 0x7f98e00b7505 QWidget::setVisible() #17 0x7f98e00b47f8 QWidgetPrivate::showChildren() #18 0x7f98e00b485f QWidgetPrivate::show_helper() #19 0x7f98e00b47e7 QWidgetPrivate::showChildren() #20 0x7f98e00b485f QWidgetPrivate::show_helper() #21 0x7f98e00b7505 QWidget::setVisible() #22 0x7f98e00b47f8 QWidgetPrivate::showChildren() #23 0x7f98e00b485f QWidgetPrivate::show_helper() #24 0x7f98e00b7505 QWidget::setVisible() #25 0x7f98e00b47f8 QWidgetPrivate::showChildren() #26 0x7f98e00b485f QWidgetPrivate::show_helper() #27 0x7f98e00b47e7 QWidgetPrivate::showChildren() #28 0x7f98e00b485f QWidgetPrivate::show_helper() #29 0x7f98e00b47e7 QWidgetPrivate::showChildren() #30 0x7f98e00b485f QWidgetPrivate::show_helper() #31 0x7f98e00b7505 QWidget::setVisible() #32 0x55a37dde993e <unknown> #33 0x7f98dd48c1c1 __libc_start_main #34 0x55a37dde9bfa <unknown> Aborted (core dumped)
-
Did you already saw the Deploying Qt WebEngine Applications chapter of Qt's documentation.
-
@SGaist Yes, there is nothing to solve my problem.
-
@MazyCrazy I once had the same error. What I did is to set 'Prefix' to the full path to your program folder, and that solve my problem.
-
@MazyCrazy Is you issue fixed? I am facing a very similar issue. It works on certain version of Linux but have the same error as what you have on other Linux.