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

Crashes when opening a file or creating new project #542

Open
K0-RR opened this issue Jul 13, 2023 · 13 comments
Open

Crashes when opening a file or creating new project #542

K0-RR opened this issue Jul 13, 2023 · 13 comments

Comments

@K0-RR
Copy link

K0-RR commented Jul 13, 2023

This means the app can't be used at all. Here is the log:

flatpak run com.jetbrains.PyCharm-Community 
pycharm-wrapper: Setting up NPM packages
pycharm-wrapper: Setting up Cargo packages
pycharm-wrapper: Setting up Python packages
pycharm-wrapper: Setting up Ruby packages
CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
Gtk-Message: 12:38:26.536: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:38:26.537: Failed to load module "canberra-gtk-module"
2023-07-13 12:38:27,326 [   1222]   WARN - #c.i.o.v.n.p.l.VfsLog - VFS Log version differs from the implementation version: log null vs implementation -43
2023-07-13 12:38:28,064 [   1960]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "Visual Studio" not found PluginDescriptor(name=IDEA CORE, id=com.intellij, descriptorPath=plugin.xml, path=/app/pycharm/lib, version=231.9161.41, package=com.intellij.feedback, isBundled=true)
2023-07-13 12:38:28,104 [   2000]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "Eclipse" not found PluginDescriptor(name=IDEA CORE, id=com.intellij, descriptorPath=plugin.xml, path=/app/pycharm/lib, version=231.9161.41, package=com.intellij.feedback, isBundled=true)
2023-07-13 12:38:28,105 [   2001]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "NetBeans 6.5" not found PluginDescriptor(name=IDEA CORE, id=com.intellij, descriptorPath=plugin.xml, path=/app/pycharm/lib, version=231.9161.41, package=com.intellij.feedback, isBundled=true)
2023-07-13 12:38:28,106 [   2002]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "Visual Studio" not found PluginDescriptor(name=IDEA CORE, id=com.intellij, descriptorPath=plugin.xml, path=/app/pycharm/lib, version=231.9161.41, package=com.intellij.feedback, isBundled=true)
2023-07-13 12:38:28,125 [   2021]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "VSCode" not found PluginDescriptor(name=Terminal, id=org.jetbrains.plugins.terminal, descriptorPath=plugin.xml, path=/app/pycharm/plugins/terminal, version=231.9161.41, package=null, isBundled=true)
2023-07-13 12:38:28,143 [   2039]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "Eclipse" not found PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, descriptorPath=plugin.xml, path=/app/pycharm/plugins/vcs-github, version=231.9161.41, package=org.jetbrains.plugins.github, isBundled=true)
2023-07-13 12:38:28,152 [   2048]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "Eclipse" not found PluginDescriptor(name=Space, id=com.jetbrains.space, moduleName=intellij.space.vcs, descriptorPath=intellij.space.vcs.xml, path=/app/pycharm/plugins/space, version=231.9161.41, package=com.intellij.space.vcs, isBundled=true)
2023-07-13 12:38:28,154 [   2050]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "Eclipse" not found PluginDescriptor(name=Python Community Edition, id=PythonCore, descriptorPath=plugin.xml, path=/app/pycharm/plugins/python-ce, version=231.9161.41, package=null, isBundled=true)
2023-07-13 12:38:28,155 [   2051]   WARN - #c.i.o.a.i.ActionManagerImpl - keymap "NetBeans 6.5" not found PluginDescriptor(name=Python Community Edition, id=PythonCore, descriptorPath=plugin.xml, path=/app/pycharm/plugins/python-ce, version=231.9161.41, package=null, isBundled=true)
2023-07-13 12:38:28,262 [   2158]   WARN - #c.i.e.t.TargetBasedSdks - SDK target configuration data is absent
2023-07-13 12:38:28,306 [   2202]   WARN - #c.j.p.PluginClassPathRuntimeCustomizer - There was more than one class loaded in Projector Plugin classloader - this is likely a bug!
2023-07-13 12:38:29,767 [   3663]   WARN - #c.i.w.i.i.l.m.ModuleBridgeLoaderService - Loaded from cache, but no serialized modules found. Workspace model cache will be ignored, project structure will be recreated.
Info  | RdCoroutineScope          | 53:DefaultDispatcher-worker-35 | RdCoroutineHost overridden 
2023-07-13 12:38:37,773 [  11669]   WARN - #c.i.u.x.Binding - no accessors for com.intellij.ide.util.TipsUsageManager$State
2023-07-13 12:38:52,320 [  26216]   WARN - #c.i.o.u.WindowStateService - cannot find a project frame for ProjectDefault (Template) Project
2023-07-13 12:38:52,320 [  26216]   WARN - #c.i.o.u.WindowStateService - cannot find a project frame for ProjectDefault (Template) Project
2023-07-13 12:39:02,335 [  36231]   WARN - #c.i.o.u.WindowStateService - cannot find a project frame for ProjectDefault (Template) Project
2023-07-13 12:39:20,631 [  54527]   WARN - #c.i.o.w.i.c.h.t.MainMenuButton - rootPane is not set, MainMenu button listeners are not installed
2023-07-13 12:39:22,158 [  56054]   WARN - #c.i.o.v.ExternallyAddedFilesProcessorImpl - Cannot find project config directory for non-default and non-directory based project wataha
[0713/123922.873959:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /app/pycharm/jbr/lib/chrome-sandbox is owned by root and has mode 4755.
@rajrupdasofficial
Copy link

rajrupdasofficial commented Jul 28, 2023

Exact same issue on Popos 22.04 LTS.
Do you able to debug the issue?

@rajrupdasofficial
Copy link

@FakeShemp Any progress or can I run pycharm anyway?

@FakeShemp
Copy link
Collaborator

I don't know what causes it and I don't have this issue myself so I wouldn't know what to do.

@rajrupdasofficial
Copy link

@FakeShemp Okay I am trying to troubleshooting it via reinstall ,

I will keep you update further

@rajrupdasofficial
Copy link

@FakeShemp No uninstalling and reinstalling ,complete data wipe out . Nothing solves the issue . can you take a look into this ?
Actually want to know if Intel or AMD cpu matters ?

because I am using a AMD cpu.

@chamaoskurumi
Copy link

Exact same issue on Popos 22.04 LTS. Do you able to debug the issue?

I can confirm this problem. Also on PopOS 22.04 LTS

@Technohacker
Copy link

I can trigger this crash when opening a project if it has a README.md file. Judging by how the crash message involves Chromium's sandbox, and that JetBrains Runtime includes the Chromium Embedding Framework, I'm going to hazard a guess and say markdown rendering seems to make use of a Chromium WebView, which leads to a crash since it finds the sandbox invalid.

Maybe Zypak could help here?

@unclearParadigm
Copy link

I can confirm that the crashes are related to README files as outlined by @Technohacker. Further, all Jetbrain Products within a Flatpak are affected. Native installations of those IDEs (native as in: "not through Flatpak are not showing the same behavior). The crash is reproducible on Rider, PyCharm as well as IntelliJ (that's all IDEs I have tried). Tests are conducted with a clean installation of Fedora 39 Workstation. Minimal reproduction is to create any project with a README in the projects root directory. When loading the project, the IDE will try to render the Markdown file and crash the whole process. When the README is manually deleted, the project loads just fine without crash. This narrows it down to the Chromium WebView.

Further, it might be that only AMD CPUs are affected. I was not able to reproduce it on a laptop with a Intel I5 (however using Fedora 38 instead of 39 as above). I try to give it a shot with Fedora 39 Workstation on the Intel machine to see whether it actually has to do with CPU vendor, or whether it's just a difference between Fedora 38 and 39.

@redtux
Copy link

redtux commented Jan 5, 2024

Hi, I can confirm this bug on Ubuntu 23.10 with Gnome 44, using an older ThinkPad equipped with an Intel i5-6200U CPU.

The project is locally stored on a dedicated ZFS dataset owned by my user. Initially, I suspected this might be the root cause, but by setting "filesystem=home" in Flatseal I could access the project.

When launching PyCharm as pycharm and navigating to the project directory, I experience crashes selectively. However, when attempting to open the Flatpak using pycharm . in my project's root directory, it consistently crashes. This occurs immediately after displaying the splash screen and briefly showing the IDE GUI. (Note that while the project uses rst files and docstrings with Sphinx for documentation, it does also include a README.md file.)

Edit:

  • pycharm --version

    PyCharm 2023.3.2 (Community Edition)
    Build #PC-233.13135.95
    
  • sysctl kernel.unprivileged_userns_clone

    kernel.unprivileged_userns_clone = 1
    

@6b6279
Copy link

6b6279 commented Jan 15, 2024

This error is caused by PyCharm's built-in Electron, which is used for rendering Markdown/HTML, akin to WebKitGTK in Eclipse. Electron, in general, does not work in Flatpak, as Flatpak prevents namespace cloning, which Electron uses for sandboxing. The only way to prevent PyCharm from crashing upon opening e.g. a Markdown file is by disabling sandboxing for Electron. This can be done manually over the Registry (before creating a new project or opening any folders, although, like previously said, PyCharm should only crash when the Chromium driver is invoked) or by injecting a idea.properties file with ide.browser.jcef.sandbox.enable = 0 into the Flatpak.

Everything worked fine for me after disabling sandboxing over the Registry.

@mscheifer
Copy link

The only way to prevent PyCharm from crashing upon opening e.g. a Markdown file is by disabling sandboxing for Electron. This can be done manually over the Registry (before creating a new project or opening any folders, although, like previously said, PyCharm should only crash when the Chromium driver is invoked)

I can confirm this worked for me on Pop!_OS 22.04

@LipCpp
Copy link

LipCpp commented May 8, 2024

Well actually the error is quite ease to fix. Watch the last line of the error msg:

"[0713/123922.873959:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /app/pycharm/jbr/lib/chrome-sandbox is owned by root and has mode 4755."

you have to change the ownership and access rights of this file "/app/pycharm/jbr/lib/chrome-sandbox"
Enter:
cd /app/pycharm/jbr/lib/
sudo chown root chrome-sandbox
sudo chgrp root chrome-sandbox
sudo chmod 4755 chrome-sandbox

Hope I could help

@enrialonso
Copy link

Well actually the error is quite ease to fix. Watch the last line of the error msg:

"[0713/123922.873959:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /app/pycharm/jbr/lib/chrome-sandbox is owned by root and has mode 4755."

you have to change the ownership and access rights of this file "/app/pycharm/jbr/lib/chrome-sandbox" Enter: cd /app/pycharm/jbr/lib/ sudo chown root chrome-sandbox sudo chgrp root chrome-sandbox sudo chmod 4755 chrome-sandbox

Hope I could help

This work for me on ubuntu 24.04 and standalone pycharm installation

PyCharm 2024.1.1 (Professional Edition)
Build #PY-241.15989.155, built on April 29, 2024
Licensed to Enrique Villadoniga
Subscription is active until May 24, 2024.
Runtime version: 17.0.10+1-b1207.14 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.8.0-31-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 4002M
Cores: 16
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  ru.sadv1r.ansible-vault-editor-idea-plugin (1.21)
  name.kropp.intellij.makefile (241.14494.150)
  String Manipulation (9.13.0)
  dev.meanmail.plugin.nginx-intellij-plugin (2022.1.1)
  ru.adelf.idea.dotenv (2024.1)
Current Desktop: ubuntu:GNOME

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

No branches or pull requests