Skip to content
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

Creation of chromium binaries in /tmp/ #2914

Closed
malinka-2233 opened this issue Nov 30, 2023 · 4 comments · Fixed by #2917
Closed

Creation of chromium binaries in /tmp/ #2914

malinka-2233 opened this issue Nov 30, 2023 · 4 comments · Fixed by #2917
Assignees

Comments

@malinka-2233
Copy link

Hey. While using the latest zui deb package v1.4.1 i noticed, that there are chromium binary files being created and executed at runtime. My question is - what part of the build\packaging of zui causes them to appear and is there anything to be done to avoid that?
Maybe i can manually unpack asar and run the electron part without using the resulting zui binary or is there any other way?

@philrz philrz self-assigned this Nov 30, 2023
@philrz
Copy link
Contributor

philrz commented Nov 30, 2023

@malinka-2233: Thanks for reporting. We were not previously aware it was doing this.

For the benefit of our developers, I've attached a video that reproduces the issue with GA Zui v1.4.1 on Ubuntu 20.04. I start out with the /tmp directly cleaned of any .org.chromium.Chromium.* files. Then I start a watch -d -n 1 ls -lR /tmp/.org* and open/exit Zui repeatedly. As it shows, those Chromium files do indeed accumulate.

Repro.mp4

I did some web searching and it looks like another project at element-hq/element-web#17188 struggled with the exact same symptom. In their case it looks like they were able to solve it using the change in https://github.com/vector-im/element-desktop/pull/337/files. What I don't know is if Zui uses "native modules" in a similar way and if it would benefit from the same fix. However, one of our developers will likely chime in with more insight on that.

@malinka-2233
Copy link
Author

malinka-2233 commented Dec 1, 2023

Thank you for clarifying, i assumed it was known so was not going into the details.
In the meantime - if there are any different ways of launching an already packaged (and then unpacked?) zui, that bypass the zui binary - please let me know. I figured i could run the electron part in the unpacked asar archive using just
electron .
but thats only one part.

@nwt
Copy link
Member

nwt commented Dec 1, 2023

What I don't know is if Zui uses "native modules" in a similar way and if it would benefit from the same fix.

Apparently it does.

$ npm exec asar list /Applications/Zui.app/Contents/Resources/app.asar | grep '\.node$'
/node_modules/keytar/build/Release/keytar.node
/node_modules/node-pipe/build/Release/pipe.node

@philrz
Copy link
Contributor

philrz commented Dec 6, 2023

Verified in Zui Insiders 1.4.2-8, which is based on Zui commit 288bb82. In the video below, the original repro steps are repeated with that release and we no longer see the .org.chromium.Chromium.* files accumulating in /tmp. By comparison the previous Zui Insiders release 1.4.2-7 still had the original symptom (not shown here).

Verify.mp4

The next GA Zui release will have this fix as well. I hope to have that release out some time next week.

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

Successfully merging a pull request may close this issue.

3 participants