izhangzhihao / intellij-rainbow-brackets

🌈Rainbow Brackets for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio/Fleet
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
GNU General Public License v3.0
4.43k stars 213 forks source link

[IJPL-59368 ][RIDER-111854] IDE crashes due to "chrome-sandbox is owned by root and has mode" error when IDE is launching the JCEF in a sandbox #2734

Closed albinalm closed 3 months ago

albinalm commented 4 months ago

Have you checked the issues and discussions to ensure there are no duplicates?

Yes

Your programming languages

C#

Free or paid?

Paid users

Expected Behavior

It should start right up

Current Behavior

Entire Rider crashes with no detailed error logging. I've isolated the problem to Rainbow Brackets.

If i load my solution with it disabled > It starts and loads, if I enable the plugin it crashes. Disabling it again, solution loads. Seems to have bricked my old solution somehow when I cloned it from my repository using the addon. I had to make a new solution, then add all projects again. It was at that point, when I finally had a working solution I managed to isolate the problem to this plugin.

Code snippet for reproduce

This is a startup error and thus I have no code snippets to provide.

Your Environment

JetBrains Rider 2024.1.1 Build #RD-241.14494.325, built on April 16, 2024 Licensed to Albin Alm Subscription is active until January 28, 2025. Runtime version: 17.0.10+8-b1207.12 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 6.8.0-31-generic .NET Core v8.0.1 x64 (Server GC) GC: G1 Young Generation, G1 Old Generation Memory: 3980M Cores: 24 Registry: ide.experimental.ui=true ide.new.project.model.index.case.sensitivity=true Non-Bundled Plugins: com.wakatime.intellij.plugin (14.3.13) com.mallowigi (95.0.0) Current Desktop: ubuntu:GNOME

albinalm commented 4 months ago

I found this message through my idea.log

com.intellij.diagnostic.PluginException: Migrate طẉ to ProjectActivity [Plugin: izhangzhihao.rainbow.brackets]
    at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:275)
    at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:68)
    at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invokeSuspend(StartupManagerImpl.kt:191)
    at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
    at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3.invokeSuspend(StartupManagerImpl.kt:190)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
izhangzhihao commented 4 months ago

Pls find and upload logs here by following https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files

albinalm commented 4 months ago

rider-logs.zip

izhangzhihao commented 4 months ago

I found this message through my idea.log

com.intellij.diagnostic.PluginException: Migrate طẉ to ProjectActivity [Plugin: izhangzhihao.rainbow.brackets]
  at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:275)
  at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:68)
  at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invokeSuspend(StartupManagerImpl.kt:191)
  at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
  at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
  at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
  at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
  at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3.invokeSuspend(StartupManagerImpl.kt:190)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

this is a warn actually:

2024-04-30 14:55:21,687 [ 6530] WARN - #c.i.i.s.i.StartupManagerImpl - Migrate طẉ to ProjectActivity [Plugin: izhangzhihao.rainbow.brackets]

And I could not reproduct it with

JetBrains Rider 2024.1.1
Build #RD-241.14494.325, built on April 16, 2024
Evaluation purpose only.
Runtime version: 17.0.10+8-b1207.12 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.4
.NET Core v8.0.1 x64 (Server GC)
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Metal Rendering is ON
Registry:
  ide.plugins.snapshot.on.unload.fail=true
  ide.experimental.ui=true
  ide.new.project.model.index.case.sensitivity=true
Non-Bundled Plugins:
  PsiViewer (241.14494.158-EAP-SNAPSHOT)
  PythonCore (241.14494.240)
  org.toml.lang (241.14494.150)
  izhangzhihao.rainbow.brackets (2024.2.3-241)
albinalm commented 4 months ago

Screencast from 2024-04-30 15-12-16.webm Weird... Rider and my OS is just installed.

Here's a video demo:ing the issue

izhangzhihao commented 4 months ago

Pls try to uncheck this option before opening your project:

image
albinalm commented 4 months ago

Just did, seems to have resolved the issue. Good catch from the video, I just saw you can see it crashing right after displaying the changelog.

No clue what element in the readme that could've caused this issue, but might be good to keep in mind if you encounter this for other users as well.

Thanks!

izhangzhihao commented 4 months ago

Very interesting... because I already added a try-catch here:

image
izhangzhihao commented 4 months ago

Just created a new issue for the Rider IDE: RIDER-111854

albinalm commented 4 months ago

Very interesting... because I already added a try-catch here:

image

Yep! Seems to be an IDE issue in that case!

ajanke commented 4 months ago

For what its worth, this same thing happened to me with IntelliJ 2024.1.1. Disabling the changelog page fix it for me also so it seems the bug is not limited to Rider.

izhangzhihao commented 4 months ago

This is now clear: this is a JCEF issue. The workaround is to disable JCEF in the IDE registry (ide.browser.jcef.sandbox.enable key).

izhangzhihao commented 3 months ago

The latest release of PyCharm seems to have this issue fixed, but I didn't have a Linux machine to test: https://youtrack.jetbrains.com/issue/IJPL-59368/IDE-crashes-due-to-chrome-sandbox-is-owned-by-root-and-has-mode-error-when-IDE-is-launching-the-JCEF-in-a-sandbox