question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

com.intellij.util.IncorrectOperationException: Cannot modify a read-only directory

See original GitHub issue
Q A
Bug report? yes
Plugin version 1.6.2
Pest version 1.21.3
IntelliJ version PS-221.5787.33
OS Linux

Description

Working with docker, the vendor directory is mounted from outside the container therefore the directory can probably not be changed (renamed or whatever is attempted).

It is unclear to me why it does this, besides the constant error it is working just fine.

Stacktrace

com.intellij.util.IncorrectOperationException: Cannot modify a read-only directory '<redacted path to project>/vendor'.

com.intellij.util.IncorrectOperationException: Cannot modify a read-only directory '<redacted path to project>/vendor'.
	at com.intellij.psi.impl.CheckUtil.checkWritable(CheckUtil.java:22)
	at com.intellij.psi.impl.file.PsiDirectoryImpl.checkAdd(PsiDirectoryImpl.java:455)
	at com.intellij.psi.impl.file.PsiDirectoryImpl.add(PsiDirectoryImpl.java:400)
	at com.pestphp.pest.customExpectations.ExpectationFileService$generateFile$2$1$1.run(ExpectationFileService.kt:80)
	at com.intellij.openapi.project.DumbServiceHeavyActivities.suspendIndexingAndRun(DumbServiceHeavyActivities.java:21)
	at com.intellij.openapi.project.DumbServiceImpl.suspendIndexingAndRun(DumbServiceImpl.java:190)
	at com.pestphp.pest.customExpectations.ExpectationFileService$generateFile$lambda-5$$inlined$runWriteAction$1.compute(actions.kt:60)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runWriteAction$13(ApplicationImpl.java:1024)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1003)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1024)
	at com.pestphp.pest.customExpectations.ExpectationFileService.generateFile$lambda-5(ExpectationFileService.kt:105)
	at com.intellij.openapi.project.DumbServiceImpl.lambda$smartInvokeLater$9(DumbServiceImpl.java:533)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mdeboercommented, Jul 18, 2022

Will do, I must say I haven’t had the issue anymore. But I have also been testing the EAP and now Beta version with the new UI. But yes I’ll vote!

1reaction
olivernybroecommented, Jul 11, 2022

So I have been talking with PhpStorm and unfortunately we cannot do anything here until they make some changes in their code. If you wanna speed it along, then upvoting the issue on YT would be helpful 👍 https://youtrack.jetbrains.com/issue/WI-58509

Read more comments on GitHub >

github_iconTop Results From Across the Web

SDK 2017.1 cannot modify a read-only file using ...
com.intellij.util.IncorrectOperationException: Cannot modify a read-only file '/src/generatebuilder/basic/BasicTestFile.java'.
Read more >
Pycharm (JetBrains) cannot modify the read-only directory on ...
Change permission of your project by chmod command, open terminal and go to your project then run this command: sudo chmod 775 -R...
Read more >
IOE: Cannot modify a read-only directory · Issue #1479 - GitHub
Date: July 15, 2017 Product: IntelliJ IDEA 162.2228 Plugin: Vaadin Designer 2 2.2.1 Cannot modify a read-only directory ...
Read more >
intellij-idea-ultimate-edition - AUR (en) - Arch Linux
UnsatisfiedLinkError: /opt/intellij-idea-ultimate-edition/jbr/lib/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory.
Read more >
Java Code Examples for com.intellij.psi.PsiElement#isWritable()
isWritable()) { if (element instanceof PsiDirectory) { throw new IncorrectOperationException( PsiBundle.message("cannot.modify.a.read.only.directory", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found