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

Amazon Q: Read access is allowed from inside read-action only #4848

Open
huypxgear opened this issue Aug 30, 2024 · 3 comments
Open

Amazon Q: Read access is allowed from inside read-action only #4848

huypxgear opened this issue Aug 30, 2024 · 3 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer

Comments

@huypxgear
Copy link

Describe the bug
Error log appears on the notification

Stacktrace

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#33,DefaultDispatcher-worker-6,5,main] 113673939 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#58,AWT-EventQueue-0,6,main] 1110958389
	at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:177)
	at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:129)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:915)
	at com.intellij.psi.impl.source.PsiFileImpl.assertReadAccessAllowed(PsiFileImpl.java:185)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTreeOrFileElement(PsiFileImpl.java:694)
	at com.intellij.psi.impl.source.PsiFileImpl.withGreenStubOrAst(PsiFileImpl.java:648)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getCachedData(JSFileBaseImpl.java:49)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getTestFileType(JSFileBaseImpl.java:108)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.isTestFile(JSFileBaseImpl.java:103)
	at com.intellij.javascript.testFramework.JsTestFileIndexingHandler.isTestFile(JsTestFileIndexingHandler.java:92)
	at com.intellij.javascript.testing.JsTestSourcesFilter.isTestSource(JsTestSourcesFilter.java:12)
	at com.intellij.openapi.roots.TestSourcesFilter.isTestSources(TestSourcesFilter.java:32)
	at software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererFileCrawler.isTestFile(CodeWhispererFileCrawler.kt:67)
	at software.aws.toolkits.jetbrains.services.codewhisperer.util.DefaultCodeWhispererFileContextProvider.isTestFile(CodeWhispererFileContextProvider.kt:209)
	at software.aws.toolkits.jetbrains.services.codewhisperer.util.DefaultCodeWhispererFileContextProvider.extractSupplementalFileContext(CodeWhispererFileContextProvider.kt:114)
	at software.aws.toolkits.jetbrains.services.codewhisperer.service.CodeWhispererService$getRequestContext$supplementalContext$1.invokeSuspend(CodeWhispererService.kt:629)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

Your Environment

  • OS: macOs
  • JetBrains product: pycharm
  • JetBrains product version: Build #PY-242.21829.153, built on August 29, 2024
  • AWS Q: 3.25-242
  • AWS Core: 3.25-242
  • Python version: 3.8
@huypxgear huypxgear added the bug We can reproduce the issue and confirmed it is a bug. label Aug 30, 2024
@holmesjr
Copy link

holmesjr commented Sep 3, 2024

This isn't the first time either: #3624

This is also happening in WebStorm, so it's not IDE-specific.

@DinosaurDad
Copy link

I'm also experiencing this frequently across multiple JetBrains IDEs including WebStorm. Just started for me within the last couple of weeks, but I encounter it many times in a day.

@rli rli changed the title IDE Internal Errors Amazon Q: Read access is allowed from inside read-action only Sep 9, 2024
@Enoai
Copy link

Enoai commented Sep 18, 2024

I am running into this exact same issue on PHPSTORM also, annoying :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer
Projects
None yet
Development

No branches or pull requests

5 participants