microsoft / microsoft/azure-tools-for-java
[IntelliJ] Uncaught Exception java.lang.IllegalStateException: 'runBlockingCancellable' is forbidden in the Write Action because it may start a long-running computation. This can cause UI freezes.
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 262
- Forks
- 185
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 1
Description
IntelliJ build version: 2026.1 IU-261.22158.277
OS: Windows 11
JDK: JetBrains s.r.o. 25.0.2
Plugin version: 3.97.3-2026.1
Additional Info: None
Parent component:
com.intellij.openapi.wm.impl.IdeRootPane[,8,8,1920x1080,layout=com.intellij.openapi.wm.impl.IdeRootPane$CustomHeaderRootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=449,maximumSize=,minimumSize=,preferredSize=]
Error message:
IdeaLoggingEvent[message=null, throwable=java.lang.IllegalStateException: 'runBlockingCancellable' is forbidden in the Write Action because it may start a long-running computation. This can cause UI freezes.
Consider running this 'runBlockingCancellable' under a read action outside your Write Action'
at com.microsoft.azure.toolkit.intellij.connector.dotazure.Profile.lambda$addConnectionToDotEnv$6(Profile.java:198)
at com.microsoft.azure.toolkit.intellij.connector.dotazure.Profile.addConnectionToDotEnv(Profile.java:198)
at com.microsoft.azure.toolkit.intellij.connector.dotazure.Profile.addConnection(Profile.java:123)
at com.microsoft.azure.toolkit.intellij.connector.dotazure.Profile.createOrUpdateConnection(Profile.java:137)
at com.microsoft.azure.toolkit.intellij.connector.dotazure.Azu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Profile.java at line 198, where addConnectionToDotEnv is called, and review the callers shown in the stack trace: addConnection and createOrUpdateConnection. Check the connection flow that triggers the write action and ensure the runBlockingCancellable call is no longer made there; done means the reported IllegalStateException no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100