-
Notifications
You must be signed in to change notification settings - Fork 935
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
[Bug]: Pyinstaller ends up in Page.goto: Target page, context or browser has been closed
#2683
Comments
I can reproduce on Linux - it was working at some point - most likely a regression in Pyinstaller. Since Pyinstaller is not a priority for us, I'll add the p3-collecting-feedback label for now. I recommend filing it on the Pyinstaller side. |
Page.goto: Target page, context or browser has been closed
Pyinstaller will unpack file to /tmp/xxxxx, then run /tmp/xxxx.../node /tmp/xxxx.../cli.js. |
Looks like not all files are getting packed, when running with
Looking at
This prevents Chromium from running |
I try pyinstaller test.py, then copy *.so to ./dist/test/_internal/. Then get errors:
It report missing: /home/pi/.pki/nssdb |
Looks like Pyinstaller v5 was working and v6.0.0 broke it. cc @rokm. I guess we should file it upstream. |
Does this mean that if you replace PyInstaller 6.x with 5.13.2 in your tests above, it works? Or does it mean that you recall it working with v5 at some point in time (with version of bundled chromium was in use back then)? FWIW, if I try to freeze the above example on my main Fedora 41 system with v6, it seems to work. But that's likely because I have a compatible The
But as far as I can tell, this was the case in v5 as well. One thing that has changed, though, is that in v6 collected files are automatically re-classified as data vs. binaries, and so even if you "smuggle" in binaries (executables and shared libs) via However,
Try to either remove the bundled copy of |
Yes, I tried
Can we disable this analysis? |
Hmm, in that case, can you check if If I try to build with 5.13.2 (in onedir mode for easier debugging), I see
Not really. And on linux, the line between which shared libraries should be collected from the build system and which not is always rather blurry and situation dependent. |
Looks like |
I try pyinstaller==5.13.2, it works |
That's normal, though. We always set As a side note: if you want to launch a process from the frozen application that should use system shared libraries instead of bundled ones, it is up to you to clear
Is If it is a symlink, does it help if you add
to the hooks? (Unfortunately the implementation is using |
These are all copies. I did not see any symlink.
So far this issue is about Chromium only - I did a brief attempt with Firefox and WebKit and for them it seems to work correctly. Some more debugging notes: Bad as well: Makes it work: Looks like it tries to locate
it works. If I compare it with v5,
|
Thanks for additional info @mxschmitt !
I would like to be able to fully reproduce this locally, so I can look at it from different angles. So to clarify:
Yeah, this makes sense, and is likely an issue with all Chrome/Chromium based packages. I.e., our QtWebEngine hook helper explicitly tries to collect extra nss plugins. But I see now that this part should probably be moved into binary dependency analysis itself, because (Alternatively, we could also consider blocking |
Initially I used only Chromium, so I was doing
Actually I tested on 6.0.0 = on 6.11.1 it seems to happen as well. We have more instructions here on how to repro it.
Ubuntu 20.04.6.
Interesting hack!
That good from my side - but not sure how other projects would benefit from it / if it would hurt someone. |
Version
1.49.0
Steps to reproduce
Code: test.py
env: Raspberry Pi
Expected behavior
no error
Actual behavior
Additional context
If execute the source code directly, the result is correct, but after packaging with pyinstaller, it is not correct.
The same code packaged under Windows, the results are also correct.
Environment
The text was updated successfully, but these errors were encountered: