New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qwebengine Invalid file descriptor to ICU data received #2566

Closed
dominhtri1995 opened this Issue Apr 17, 2017 · 30 comments

Comments

Projects
None yet
10 participants
@dominhtri1995

dominhtri1995 commented Apr 17, 2017

Hi,
I'm having trouble running the program with QtWebEngine on Mac. I found some sort of solution for qutebrowser here. But not sure how to use it with pyinstaller only because I'm not using qutebrowser.

Pyinstaller 3.2.1
Mac Os 10.12
I'm using PyQt5 5.8.2

Error when I try to run the one-file executable with console:

[0417/025050:ERROR:icu_util.cc(178)] Invalid file descriptor to ICU data received.
[0417/025050:FATAL:content_main_runner.cc(705)] Check failed: base::i18n::InitializeICU(). 
0   QtWebEngineCore                     0x00000001196e8407 _ZN15QtWebEngineCore14FaviconManager11qt_metacallEN11QMetaObject4CallEiPPv + 15826609
1   QtWebEngineCore                     0x00000001196f9511 _ZN15QtWebEngineCore14FaviconManager11qt_metacallEN11QMetaObject4CallEiPPv + 15896507
2   QtWebEngineCore                     0x00000001196b855d _ZN15QtWebEngineCore14FaviconManager11qt_metacallEN11QMetaObject4CallEiPPv + 15630343
3   QtWebEngineCore                     0x00000001187c6796 _ZN15QtWebEngineCore18WebContentsAdapter13canViewSourceEv + 25100
4   QtWebEngineCore                     0x00000001187c565c _ZN15QtWebEngineCore18WebContentsAdapter13canViewSourceEv + 20690
5   QtWebEngineCore                     0x00000001187bc1a9 _ZNK15QtWebEngineCore10UserScript4dataEv + 231
6   QtWebEngineCore                     0x00000001187bcb8c _ZN15QtWebEngineCore18WebContentsAdapterC2EPN7content11WebContentsE + 52
7   QtWebEngineWidgets                  0x000000011d25ecbe _ZrsR11QDataStreamR17QWebEngineHistory + 1870
8   QtWebEngineWidgets                  0x000000011d260f80 _ZN14QWebEnginePageC2EP7QObject + 48
9   PyQt5.QtWebEngineWidgets.so         0x000000011d222d1a _ZL24init_type_QWebEnginePageP17_sipSimpleWrapperP7_objectS2_PS2_S3_S3_ + 138
10  sip.so                              0x0000000116d19c5e sipSimpleWrapper_init + 180
11  Python                              0x0000000115a76f44 type_call + 212
12  Python                              0x0000000115a0a8d3 PyObject_Call + 99
13  Python                              0x0000000115aeab65 PyEval_EvalFrameEx + 15477
14  Python                              0x0000000115af04fc PyEval_EvalFrameEx + 38412
15  Python                              0x0000000115af0e90 _PyEval_EvalCodeWithName + 2400
16  Python                              0x0000000115af0f97 PyEval_EvalCodeEx + 71
17  Python                              0x0000000115a3d77a function_call + 186
18  Python                              0x0000000115a0a8d3 PyObject_Call + 99
19  Python                              0x0000000115a259cc method_call + 140
20  Python                              0x0000000115a0a8d3 PyObject_Call + 99
21  Python                              0x0000000115a804c1 slot_tp_init + 81
22  Python                              0x0000000115a76f44 type_call + 212
23  Python                              0x0000000115a0a8d3 PyObject_Call + 99
24  Python                              0x0000000115aeab65 PyEval_EvalFrameEx + 15477
25  Python                              0x0000000115af04fc PyEval_EvalFrameEx + 38412
26  Python                              0x0000000115af0e90 _PyEval_EvalCodeWithName + 2400
27  Python                              0x0000000115af0f97 PyEval_EvalCodeEx + 71
28  Python                              0x0000000115a3d77a function_call + 186
29  Python                              0x0000000115a0a8d3 PyObject_Call + 99
30  Python                              0x0000000115a259cc method_call + 140
31  Python                              0x0000000115a0a8d3 PyObject_Call + 99
32  Python                              0x0000000115a804c1 slot_tp_init + 81
33  Python                              0x0000000115a76f44 type_call + 212
34  Python                              0x0000000115a0a8d3 PyObject_Call + 99
35  Python                              0x0000000115aeab65 PyEval_EvalFrameEx + 15477
36  Python                              0x0000000115af0e90 _PyEval_EvalCodeWithName + 2400
37  Python                              0x0000000115af0ff1 PyEval_EvalCode + 81
38  vndirectPyQt                        0x000000010e8b3490 vndirectPyQt + 9360
39  vndirectPyQt                        0x000000010e8b39f9 vndirectPyQt + 10745
40  vndirectPyQt                        0x000000010e8b2464 vndirectPyQt + 5220
41  ???                                 0x0000000000000001 0x0 + 1

Trace/BPT trap: 5

Spec file:

`# -*- mode: python -*-

block_cipher = None


a = Analysis(['vndirectPyQt.py'],
             pathex=['/Users/TriDo/General_Code/vndirect'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
a.datas+= [('chromedriver','/Users/TriDo/General_Code/chromedriver', 'DATA')]
a.datas +=[('testDB.db','/Users/TriDo/General_Code/vndirect/testDB.db','DATA')]             
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          Tree('./image',prefix ='image'),
          a.zipfiles,
          a.datas,
          name='vndirectPyQt',
          debug=False,
          strip=False,
          upx=False,
          console=False)
app = BUNDLE(exe,
             name='vndirectPyQt.app',
             icon='logo.icns',
             info_plist={'NSHighResolutionCapable': 'True'},
             bundle_identifier='org.qt-project.Qt.QtWebEngineCore')
`

@dominhtri1995 dominhtri1995 changed the title from Qwebengine to Qwebengine Invalid file descriptor to ICU data received Apr 17, 2017

@dominhtri1995

This comment has been minimized.

dominhtri1995 commented Apr 21, 2017

Anyone ?

@thiagofmam

This comment has been minimized.

thiagofmam commented Apr 28, 2017

Same problem.

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 19, 2017

Same here. Amazing but is so hard to find info on how correctly integrate pyinstaller QtWebEngine on MacOS. Did anyone succeed? From what i see you have to have QT5DIR environment set, and looks for qmake executable. So it means i have to install QT( would be nice if i dont have to and simply use PyQt5) .

@tallforasmurf

This comment has been minimized.

Contributor

tallforasmurf commented May 19, 2017

PyQt5 needs Qt5 and SIP installed (does the latest PyQt wheel install all Qt modules? Or just the SIP?) however PyInstaller should then bundle all needed DLLs so the package is self-contained. That works with all Qt modules except QtWebEngine, which is the spawn of the devil has an unusually complicated setup, where an entire separate Mac App is hidden in the ../Resources folder along with some "frameworks".

PyInstaller knows about the complexities of finding such "frameworks", see this code but it is not clear it knows where to put them.

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 19, 2017

PyQt5 installs pretty much everything. the only thing its missing is qmake. Which probably is not even needed. Because PyQt5 WebEngine hook uses it to detect the lib path where the Qt frameworks are. And it can use PyQt5 modules from Pythton site-packages. So looks like it could have drop Qt5 requirement.
I do have sip installed since that's Pyqt5 requirement i believe.

Would be nice to have nice help document how to build and deploy simple QtWebEngine based python macOS app. Obviously it doesn't work . And looks like i am not the only one with the problem

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 22, 2017

I tried using brew qt and standalone qt 5.8 on macos using pytnon3.5 No difference. It simply doesn't work. Did anyone ever had this working ? I am using latest develop branch. Official release doesn't work either. Thank you

@The-Compiler

This comment has been minimized.

Contributor

The-Compiler commented May 22, 2017

Working for me (with qutebrowser) with #2519 and some manual patching on top of that.

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 22, 2017

Interesting. Not sure how i can merge those changes into my current dev, looks like its pretty different.
Is there a way you can upload the bundle to take a look how its structured for your app ?Thanks
.

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 22, 2017

I was just going to write "never mind i found it" :-) Thanks very much for the link, i will try to dig more tomorrow

@thiagofmam

This comment has been minimized.

thiagofmam commented May 23, 2017

I apply the patch #2519 but now i got this error:

Class RunLoopModeTracker is implemented in both /var/folders/t7/6sn5rsss3wb4dyv623fl2gf40000gn/T/_MEIYCXLdi/QtCore (0x1121c3f60) and /Users/thiagomeneses/Qt5.8.1/lib/QtCore.framework/Versions/5/QtCore (0x11543df60). One of the two will be used. Which one is undefined.
objc[3949]: Class NotificationReceiver is implemented in both /var/folders/t7/6sn5rsss3wb4dyv623fl2gf40000gn/T/_MEIYCXLdi/QtWidgets (0x1136230f0) and /Users/thiagomeneses/Qt5.8.1/lib/QtWidgets.framework/Versions/5/QtWidgets (0x1159a60f0). One of the two will be used. Which one is undefine

@cnhuye

This comment has been minimized.

cnhuye commented May 23, 2017

same problem ...
Anyone fixed this ?
I 'm spend 3 weeks here.

@thiagofmam

This comment has been minimized.

thiagofmam commented May 23, 2017

I created a qt.conf conform (http://doc.qt.io/qt-5/osx-deployment.html#qt-plugins) with this value in same dir of the executable:

[Paths]
Plugins = "."

I make a copy of the folder platforms and paste in MacOS. Now I got this other error:

Cannot load library /Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib: (dlopen(/Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/QtGui.framework/Versions/5/QtGui
Referenced from: /Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib
Reason: image not found)
QLibraryPrivate::loadPlugin failed on "/Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib" : "Cannot load library /Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib: (dlopen(/Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/QtGui.framework/Versions/5/QtGui\n Referenced from: /Users/thiagomeneses/PycharmProjects/interact-ii/dist/interact_collect/platforms/libqcocoa.dylib\n Reason: image not found)"
This application failed to start because it could not find or load the Qt platform plugin "cocoa"

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 23, 2017

So here is what i found. Turns out official release works for me. The problem was with my spec file. It was generating in one file mode, which was forcing the extract to temp folder and was launching it from there.

When i fixed my spec i tried with #2519 without even applying the manual patching and it worked.
Next i tried with official 3.2.1 and it still worked.

This is how my working spec file looks

# -*- mode: python -*-

block_cipher = None


added_files = [
         ('main.ui', '/test/testappui/main.ui', 'DATA'),
		 ('icon.jpg', '/test/testappui/main.ui', 'DATA')
		 ]

a = Analysis(['testappui.py'],
             pathex=['/Users/vdolbaky/jasper/src/core-py/test/testappui'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)

pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)

exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='testappui',
          debug=False,
          strip=False,
          upx=False,
          console=False )

coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=False,
               name='testappui')

app = BUNDLE(coll,
           name='testappui.app',
           icon='icon.icns',
           info_plist={'NSHighResolutionCapable': 'True'},
           bundle_identifier='org.qt-project.Qt.QtWebEngineCore')
@tallforasmurf

This comment has been minimized.

Contributor

tallforasmurf commented May 23, 2017

I would like to see this properly. Could you please edit the post to properly format the code? The markdown syntax to "fence" a block of code is to put a line of three back-ticks above and below, see the markdown doc linked from just below here.

@thiagofmam

This comment has been minimized.

thiagofmam commented May 23, 2017

My similar .spec, but not works.


block_cipher = None

added_files = [('logging.conf', '.')]

a = Analysis(['main.py'],
              pathex=['/Users/thiagomeneses/PycharmProjects/interact-ii'],
              binaries=[],
              datas=added_files,
              hiddenimports=[],
              hookspath=[],
              runtime_hooks=[],
              excludes=[],
              win_no_prefer_redirects=False,
              win_private_assemblies=False,
              cipher=block_cipher)

pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)


exe = EXE(pyz,
            a.scripts,
            exclude_binaries=True,
            name='interactosx',
            debug=False,
            strip=False,
            upx=False,
            console=False )


coll = COLLECT( exe,
                a.binaries,
                a.scripts,
                a.zipfiles,
                a.datas,
                strip=False,
                upx=False,
                name='interactosx')

app = BUNDLE(coll,
             name='interactosx.app',
             icon='/Users/thiagomeneses/PycharmProjects/interact-ii/resources/icons/ic_easy.ico.icns',
             info_plist={'NSHighResolutionCapable': 'True'},
             bundle_identifier='org.qt-project.Qt.QtWebEngineCore')
@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 23, 2017

Do you have QT5DIR set?

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 23, 2017

Also in your code add

print(os.environ['QTWEBENGINEPROCESS_PATH'])

And check the output, make sure it is set to the folder in your interactosx.app/Contents/MacOS/QtWebEngineProcess

@thiagofmam

This comment has been minimized.

thiagofmam commented May 23, 2017

Works!!! This is exciting. Thank you very much!

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 23, 2017

Glad to hear. So what was your problem?

@thiagofmam

This comment has been minimized.

thiagofmam commented May 23, 2017

My old .spec look like this:

# -*- mode: python -*-

block_cipher = None

added_files = [
                ('logging.conf', '.')
              ]

a = Analysis(['main.py'],
             pathex=[
                     '/Users/thiagomeneses/PycharmProjects/interact-ii'],
             binaries=[],
             datas=added_files,
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)

pyz = PYZ(a.pure, a.zipped_data,
                 cipher=block_cipher)

exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='interact_main',
          debug=True,
          strip=False,
          upx=True,
          console=False)

coll = COLLECT(exe,
               a.scripts,
               a.binaries,
               a.zipfiles,
               a.datas,
               name='interact_collect',
               debug=True,
               strip=False,
               upx=True,
               console=False,
               bundle_identifier='org.qt-project.Qt.QtWebEngineCore')

app = BUNDLE(exe,
             coll,
             name='interact_collect.app',
             icon='/Users/thiagomeneses/PycharmProjects/interact-ii/resources/icons/ic_easy.ico.icns',
             info_plist={'NSHighResolutionCapable': 'True'},
             bundle_identifier='org.qt-project.Qt.QtWebEngineCore')

Setting the QT5DIR and replacing the .spec for this works

block_cipher = None

added_files = [('logging.conf', '.')]

a = Analysis(['main.py'],
              pathex=['/Users/thiagomeneses/PycharmProjects/interact-ii'],
              binaries=[],
              datas=added_files,
              hiddenimports=[],
              hookspath=[],
              runtime_hooks=[],
              excludes=[],
              win_no_prefer_redirects=False,
              win_private_assemblies=False,
              cipher=block_cipher)

pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)


exe = EXE(pyz,
            a.scripts,
            exclude_binaries=True,
            name='interactosx',
            debug=False,
            strip=False,
            upx=False,
            console=False )


coll = COLLECT( exe,
                a.binaries,
                a.scripts,
                a.zipfiles,
                a.datas,
                strip=False,
                upx=False,
                name='interactosx')

app = BUNDLE(coll,
             name='interactosx.app',
             icon='/Users/thiagomeneses/PycharmProjects/interact-ii/resources/icons/ic_easy.ico.icns',
             info_plist={'NSHighResolutionCapable': 'True'},
             bundle_identifier='org.qt-project.Qt.QtWebEngineCore')

I used the pyinstaller 3.3.dev0+gbb9e52fb.mod (with patch)

Thank you

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 23, 2017

Great. I think even official 3.2.1 package should work, so you dont have to be on latest develop branch

And yes looks like you had the same wrong spec file as i had

@cnhuye

This comment has been minimized.

cnhuye commented May 24, 2017

Thanks for your share @vdolbakyan, I'm a new guy for PYQT.

so what you did was just change SPEC file from ONE FILE model to NONE one file model ?

i tried change my file according yours, and get many file in dist folder. but still don't work.

and how to set "QT5DIR" ? I put "print(os.environ['QTWEBENGINEPROCESS_PATH'])" in my client.py, get error:
KeyError: 'QTWEBENGINEPROCESS_PATH'

here is my .spec file

# -*- mode: python -*-

block_cipher = None


added_files = [
      ('icon-108.png','icons'),
      ('r.rcc','.')
     ]

a = Analysis(['client.py'],
             pathex=['/Volumes/Workspace/photo_studio/py_client'],
             binaries=[],
             datas=added_files,
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)


exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='client',
          debug=False,
          strip=False,
          upx=False,
          console=False )


coll = COLLECT( exe,
                a.binaries,
                a.scripts,
                a.zipfiles,
                a.datas,
                strip=False,
                upx=False,
                name='client1')

app = BUNDLE(coll,
             name='client.app',
             icon=None,
             bundle_identifier='org.qt-project.Qt.QtWebEngineCore')

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 24, 2017

run

brew install qt5

This is an example how to build it

rm -rf /tmp/mac
export QT5DIR=/usr/local/Cellar/qt/5.8.0_2
pyinstaller testappui_mac.spec --clean --distpath /tmp/mac --log-level=DEBUG

Yes make sure you generate spec for one-dir mode

Or simply folow patterrn of my spec file, so you should get the following

exe = EXE(pyz,
            a.scripts,
            exclude_binaries=True,
            name='client',
            debug=False,
            strip=False,
            upx=False,
            console=False )

coll = COLLECT( exe,
                a.binaries,
                a.scripts,
                a.zipfiles,
                a.datas,
                strip=False,
                upx=False,
                name='client1')
@cnhuye

This comment has been minimized.

cnhuye commented May 24, 2017

Great ! @vdolbakyan , you are my god ! 👍

I used the code you gave me, just change my code

exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='client',
          debug=False,
          strip=False,
          upx=False,
          console=False )

to :

exe = EXE(pyz,
            a.scripts,
            exclude_binaries=True,
            name='client',
            debug=False,
            strip=False,
            upx=False,
            console=False )

and every thing works !

Thanks ! you saved my life!

@flabbyThoroughbred

This comment has been minimized.

flabbyThoroughbred commented May 26, 2017

Hi All,
I've been following this thread because I have nearly the same problem.
My system specs are:

OSX Sierra
Python 2.7.13
pyqt5 built from pip install python-qt5 (for python 2.7)
pyinstaller 3.2.1
Qt 5.8.0_2

when I ran pyinstaller I exported QT5DIR to the /usr/local/Cellar/qt/5.8.0_2
I ran it per the spec file @vdolbakyan (or close enough).

I updated my pyinstaller code per the this suggestion

I've tried everything in the thread up to this point (and in other threads) and I still get:

[0526/163340:ERROR:icu_util.cc(178)] Invalid file descriptor to ICU data received.
[0526/163340:FATAL:content_main_runner.cc(705)] Check failed: base::i18n::InitializeICU()

That at least copied all the correct files (I'm assuming) into my app directory. (qtwebengineprocess and the qt5_plugins directory are there)
os.environ['QTWEBEGINPROCESS'] prints the correct path when the app is run
QApplication.libraryPaths() prints the path of the qt5_plugins path

It looks like everything points to where it should yet it still doesn't work.

I'm quite at a loss. I've thrown everything I can at this and I always feel like I'm just about to figure it out. Does anyone have any suggestions?

Thanks!
-Mark

@vdolbakyan

This comment has been minimized.

vdolbakyan commented May 27, 2017

Can u show your spec file?
Can you try with python 3.5
Also in spec file change debug values to true, recreate bundle, and run the process from inside of bundle. It will print to console, that info might be helpful too

@flabbyThoroughbred

This comment has been minimized.

flabbyThoroughbred commented May 30, 2017

Hello again,

My spec file is below:

-- mode: python --

block_cipher = None
a = Analysis(['/Volumes/Development/Users/Mark/Projects/Dashboard_HTML/Code/Dashboard.py'],
pathex=['/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='Dashboard',
debug=True,
strip=False,
upx=False,
console=False)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='Dashboard')

app = BUNDLE(coll,
name='Dashboard.app',
bundle_identifier='org.qt-project.Qt.QtwebEngineCore')

Unfortunately this app was built with python2.7 so going to 3.5 won't be a feasible solution.
Until I get an app functioning, I tend to compile a one-folder solution which is what I have been doing. Here is the output of the debug:

PyInstaller Bootloader 3.x
LOADER: executable is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: homepath is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: _MEIPASS2 is NULL
LOADER: archivename is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER [ARGV_EMU]: AppleEvent - processing...
LOADER [ARGV_EMU]: AppleEvent - installed handler.
LOADER [ARGV_EMU]: AppleEvent - calling ReceiveNextEvent
LOADER [ARGV_EMU]: ReceiveNextEvent got an eventLOADER [ARGV_EMU]: processing events failedLOADER [ARGV_EMU]: Out of the event loop.PyInstaller Bootloader 3.x
LOADER: executable is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: homepath is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: _MEIPASS2 is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: archivename is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: Already in the child - running user's code.
LOADER: Python library: /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Python
LOADER: Loaded functions from Python library.
LOADER: Manipulating environment (sys.path, sys.prefix)
LOADER: sys.prefix is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: Setting runtime options
LOADER: Initializing python
LOADER: Overriding Python's sys.path
LOADER: Post-init sys.path is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: Setting sys.argv
LOADER: setting sys._MEIPASS
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: callfunction returned...
LOADER: extracted pyimod01_os_path
LOADER: callfunction returned...
LOADER: extracted pyimod02_archive
LOADER: callfunction returned...
LOADER: extracted pyimod03_importers
LOADER: callfunction returned...
LOADER: Installing PYZ archive with Python modules.
LOADER: PYZ archive: out00-PYZ.pyz
LOADER: Running pyiboot01_bootstrap.py
LOADER: Running pyi_rth_pkgres.py
LOADER: Running pyi_rth__tkinter.py
LOADER: Running pyi_rth_qt5webengine.py
LOADER: Running pyi_rth_qt5.py
LOADER: Running pyi_rth_qt5plugins.py
LOADER: Running Dashboard.py
[u'/Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/qt5_plugins'] <<<<<<<<<<<<<<< correct path?
Running from Executable <<<<<<<<<<<<<
/Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess <<<<<<<< QtWebEngineProcess path
Could not find QtWebEngineProcess
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...3 completed.

Now this was built with the unedited pyinstaller module. If I use the edited pyinstaller module, the out of the box errors (meaning I haven't copied files into the build folder, added a qt.conf or otherwise editing any dynamic libraries) are:

PyInstaller Bootloader 3.x
LOADER: executable is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: homepath is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: _MEIPASS2 is NULL
LOADER: archivename is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER [ARGV_EMU]: AppleEvent - processing...
LOADER [ARGV_EMU]: AppleEvent - installed handler.
LOADER [ARGV_EMU]: AppleEvent - calling ReceiveNextEvent
LOADER [ARGV_EMU]: ReceiveNextEvent got an eventLOADER [ARGV_EMU]: processing events failedLOADER [ARGV_EMU]: Out of the event loop.PyInstaller Bootloader 3.x
LOADER: executable is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: homepath is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: _MEIPASS2 is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: archivename is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Dashboard
LOADER: Already in the child - running user's code.
LOADER: Python library: /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/Python
LOADER: Loaded functions from Python library.
LOADER: Manipulating environment (sys.path, sys.prefix)
LOADER: sys.prefix is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: Setting runtime options
LOADER: Initializing python
LOADER: Overriding Python's sys.path
LOADER: Post-init sys.path is /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard
LOADER: Setting sys.argv
LOADER: setting sys._MEIPASS
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: callfunction returned...
LOADER: extracted pyimod01_os_path
LOADER: callfunction returned...
LOADER: extracted pyimod02_archive
LOADER: callfunction returned...
LOADER: extracted pyimod03_importers
LOADER: callfunction returned...
LOADER: Installing PYZ archive with Python modules.
LOADER: PYZ archive: out00-PYZ.pyz
LOADER: Running pyiboot01_bootstrap.py
LOADER: Running pyi_rth_pkgres.py
LOADER: Running pyi_rth__tkinter.py
LOADER: Running pyi_rth_qt5webengine.py
LOADER: Running pyi_rth_qt5.py
LOADER: Running Dashboard.py
[u'/usr/local/Cellar/qt/5.8.0_2/plugins'] <<<<<<<<<<<<<<< correct path?
Running from Executable <<<<<<<<<<<<<
/Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess <<<<<<<< QtWebEngineProcess path
objc[48991]: Class RunLoopModeTracker is implemented in both /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/QtCore (0x10a872e40) and /usr/local/Cellar/qt/5.8.0_2/lib/QtCore.framework/Versions/5/QtCore (0x114c14e40). One of the two will be used. Which one is undefined.
objc[48991]: Class NotificationReceiver is implemented in both /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/QtWidgets (0x10bfab0b0) and /usr/local/Cellar/qt/5.8.0_2/lib/QtWidgets.framework/Versions/5/QtWidgets (0x11517c0b0). One of the two will be used. Which one is undefined.
objc[48991]: Class QCocoaPageLayoutDelegate is implemented in both /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/QtPrintSupport (0x10c1fded0) and /usr/local/Cellar/qt/5.8.0_2/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x114ce5ed0). One of the two will be used. Which one is undefined.
objc[48991]: Class QCocoaPrintPanelDelegate is implemented in both /Volumes/Development/Users/Mark/Builds/Dashboard_HTML/MAC_tests/test_c/dist/Dashboard/QtPrintSupport (0x10c1fdf20) and /usr/local/Cellar/qt/5.8.0_2/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x114ce5f20). One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7fbcef6f6f70) is not the object's thread (0x7fbcf1802260).
Cannot move to target thread (0x7fbcef6f6f70)

You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".

Available platform plugins are: cocoa, minimal, offscreen.

Reinstalling the application may fix this problem.
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

At this point I've tried copying over those cocoa libraries into the root app directory but even then it still seems to not find them.

-Mark

@yimelia

This comment has been minimized.

yimelia commented Nov 8, 2017

Hello, @vdolbakyan
my environment is:
macos
python 3.6
pyqt5.9(brew install)
pyinstaller (I've tried develop branch, and update-pyqt5-5.9-to-5.9.1, )

I change my spec file, add the bundle_identifier="org.qt-project.Qt.QtWebEngineCore" line,
and do export QT5DIR=/usr/local/Cellar/qt/5.9.1, and os.environ["QTWEBENGINEPROCESS_PATH"] print correct path. But still not work.

I got this output:

Traceback (most recent call last):
  File "/Users/zhangqi/PycharmProjects/AceIDE/AceIDE.py", line 39, in <module>
    main()
  File "/Users/zhangqi/PycharmProjects/AceIDE/AceIDE.py", line 23, in main
    from app import main_window
  File "/Users/zhangqi/tools/dev_tools/pyinstaller-develop/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "/Users/zhangqi/PycharmProjects/AceIDE/app/main_window.py", line 17, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEngineView
  File "/Users/zhangqi/tools/dev_tools/pyinstaller-develop/PyInstaller/loader/pyimod03_importers.py", 
line 714, in load_module
    module = loader.load_module(fullname)
ImportError: 
dlopen(/Users/zhangqi/PycharmProjects/AceIDE/dist/AceIDE/PyQt5.QtWebEngineWidgets.so, 2): Symbol not found: 
__ZN15QtWebEngineCore18WebContentsAdapter8downloadERK4QUrlRK7QStringS3_NS_14ReferrerPolicyE
  Referenced from: 
/Users/zhangqi/PycharmProjects/airtest_projects/AceIDE/dist/AceIDE/QtWebEngineWidgets
  Expected in: /Users/zhangqi/PycharmProjects/airtest_projects/AceIDE/dist/AceIDE/QtWebEngineCore
 in /Users/zhangqi/PycharmProjects/airtest_projects/AceIDE/dist/AceIDE/QtWebEngineWidgets
[19217] Failed to execute script AceIDE
@bjones1

This comment has been minimized.

Member

bjones1 commented Jan 31, 2018

I'm closing this, since #3233 should fix it -- see the instructions there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment