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

electron crashes when calling importCertificate #25506

Closed
3 tasks done
notNotDaniel opened this issue Sep 16, 2020 · 5 comments · Fixed by #25523
Closed
3 tasks done

electron crashes when calling importCertificate #25506

notNotDaniel opened this issue Sep 16, 2020 · 5 comments · Fixed by #25523
Assignees
Labels
8-x-y 9-x-y 10-x-y crash 💥 platform/linux status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@notNotDaniel
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    10.1.2
    9.3.1
    8.5.1

  • Operating System:
    Ubuntu 18.04.05 x64
    Also under Ubuntu 16, 14, 12, and Fedora

  • Last Known Working Electron version:
    7.3.3

Expected Behavior

Calling importCertificate should call the provided function with an error code indicating whether the certificate was successfully imported.

Actual Behavior

Calling importCertificate results in a crash (segmentation fault usually) under linux. This appears to happen across all versions of electron back to 7.x, on Ubuntu 12-18 and Fedora (tested in VirtualBox, and 18 on a bare-metal server). This appears to happen regardless of whether the cert and password are valid (or even specified).

To Reproduce

./node_modules/.bin/electron -i <<< "const {app} = require('electron'); app.importCertificate({},console.log);"
# Segfault

Screenshots

Screen Shot 2020-09-16 at 3 13 51 PM

Additional Information

@concreted
Copy link

concreted commented Oct 29, 2020

The fix for this issue appears to be in 10.1.5, but I am still seeing segfaults with Electron 10.1.5 on Ubuntu 20.04 LTS:

aric@aric-Surface-Go-2:~/src/photon$ electron -i <<< "const {app} = require('electron'); app.importCertificate({},console.log);"
> const {app} = require('electron'); app.importCertificate({},console.log);
/usr/local/share/.config/yarn/global/node_modules/electron/dist/electron exited with signal SIGSEGV
aric@aric-Surface-Go-2:~/src/photon$ electron --version
v10.1.5

Same results on:

  • v12.0.0-nightly.20201026
  • 11.0.0-beta.17

@concreted
Copy link

v9.3.3 works correctly for me.

@notNotDaniel
Copy link
Author

After the fix I was still seeing segfaults under some versions if you call importCertificate immediately, however it does work now if you wait until the app is ready.

@codebytere
Copy link
Member

codebytere commented Oct 29, 2020

if y'all are still seeing segfaults and can reproduce them at least somewhat reliably, feel free to open a new issue and ping me with a repro :) It's reasonable to wait until the app is ready, but we shouldn't be segfaulting even if you don't!

@concreted
Copy link

Ah, tried doing it after app ready and it doesn't segfault for me in 10.1.5. Can repro the segfault in 10.1.5 with @notNotDaniel's original repro steps (which do the import immediately) reliably though, will open a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8-x-y 9-x-y 10-x-y crash 💥 platform/linux status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants