134130 / intellij-mise

mise-en-place JetBrain's IntelliJ platform supports
11 stars 2 forks source link

Network must not be accessed in EDT or inside read action #79

Closed hverlin closed 2 weeks ago

hverlin commented 2 weeks ago

I am seeing this error with latest version:

java.lang.Throwable: Assertion failed: Network must not be accessed in EDT or inside read action, because this may take considerable amount of time, and write actions will be blocked during that time so user won't be able to perform tasks in the IDE
    at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:469)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:502)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:340)
    at com.intellij.util.io.RequestBuilder.readChars(RequestBuilder.java:93)
    at com.intellij.util.io.RequestBuilder.readChars(RequestBuilder.java:97)
    at com.github.l34130.mise.toml.schema.MiseSchemaFileService.schemaFile_delegate$lambda$0(MiseSchemaFileService.kt:20)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.github.l34130.mise.toml.schema.MiseSchemaFileService.getSchemaFile(MiseSchemaFileService.kt:16)
    at com.github.l34130.mise.toml.schema.MiseSchemaFileService.getSchemaFile(MiseSchemaFileService.kt:25)
    at com.github.l34130.mise.toml.schema.MiseSchemaFileProvider.getSchemaFile(MiseSchemaFileProvider.kt:18)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl.getSchemaForProvider(JsonSchemaServiceImpl.java:590)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl$MyState.createFileProviderMap(JsonSchemaServiceImpl.java:565)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl$MyState.lambda$new$0(JsonSchemaServiceImpl.java:517)
    at com.intellij.util.concurrency.SynchronizedClearableLazy._get_value_$lambda$1$lambda$0(SynchronizedClearableLazy.kt:41)
    at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210)
    at com.intellij.util.concurrency.SynchronizedClearableLazy.getValue(SynchronizedClearableLazy.kt:40)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl.getProvidersForFile(JsonSchemaServiceImpl.java:248)

I think IntelliJ automatically assigns a schema using JSON store, so I am not sure if it's needed?

134130 commented 2 weeks ago

I've added this feature to use the config file on mise configuration parser (for auto-suggestions)

But I agree that the feature is unstable and no need at this time, I'll drop it.

Thank you for reporting this!