Idea-php-symfony2-plugin: "Unable to save settings. Please restart PhpStorm"

Created on 3 Oct 2020  路  12Comments  路  Source: Haehnchen/idea-php-symfony2-plugin

Machine

PhpStorm 2020.3 EAP
Build #PS-203.4203.36, built on October 1, 2020
PhpStorm EAP User
Expiration date: October 31, 2020
Runtime version: 11.0.8+10-b1098.1 x86_x64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Symfony plugin version: 0.21.202

macOS Catalina 10.15.7

Screen

image

Logs

2020-10-03 21:13:56,373 [2030320]   WARN - mponents.impl.stores.StoreUtil - Save settings failed
java.io.IOException: Cannot create file '/symfony2.xml'
    at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.createChildFile(LocalFileSystemBase.java:337)
    at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.createChildFile(PersistentFSImpl.java:498)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.createChildData(VirtualFileSystemEntry.java:275)
    at com.intellij.configurationStore.StorageUtilKt.getOrCreateVirtualFile(storageUtil.kt:147)
    at com.intellij.configurationStore.FileBasedStorageKt.writeFile(FileBasedStorage.kt:269)
    at com.intellij.configurationStore.FileBasedStorage$FileSaveSession.saveLocally(FileBasedStorage.kt:115)
    at com.intellij.configurationStore.XmlElementStorage$XmlElementStorageSaveSession$SaveExecutor.save(XmlElementStorage.kt:164)
    at com.intellij.configurationStore.SaveExecutorKt.executeSave(SaveExecutor.kt:92)
    at com.intellij.configurationStore.SaveExecutorKt.saveSessions(SaveExecutor.kt:86)
    at com.intellij.configurationStore.ProjectSaveSessionProducerManager$saveWithAdditionalSaveSessions$$inlined$withEdtContext$1$lambda$1.compute(actions.kt:61)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runWriteAction$16(ApplicationImpl.java:1009)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:988)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1009)
    at com.intellij.configurationStore.ProjectSaveSessionProducerManager$saveWithAdditionalSaveSessions$$inlined$withEdtContext$1.invokeSuspend(ComponentStoreImpl.kt:709)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
    at com.intellij.openapi.application.constraints.BaseConstrainedExecution$Companion$scheduleWithinConstraints$1.invoke(BaseConstrainedExecution.kt:68)
    at com.intellij.openapi.application.constraints.BaseConstrainedExecution$Companion.scheduleWithinConstraints(BaseConstrainedExecution.kt:71)
    at com.intellij.openapi.application.constraints.BaseConstrainedExecution.scheduleWithinConstraints(BaseConstrainedExecution.kt:38)
    at com.intellij.openapi.application.impl.BaseExpirableExecutorMixinImpl.access$scheduleWithinConstraints$s1153900543(BaseExpirableExecutorMixinImpl.kt:12)
    at com.intellij.openapi.application.impl.BaseExpirableExecutorMixinImpl$scheduleWithinConstraints$$inlined$Runnable$1.run(Runnable.kt:19)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:323)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
    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:973)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:840)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:451)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:450)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Most helpful comment

new release is out with this patch included

All 12 comments

I've reported this issue to JetBrains:
https://youtrack.jetbrains.com/issue/WI-55821

WI-55821 was declined

Eugene Morozov commented 2 hours ago
Yep, it seems to be caused by the plugin.

It seems that sometimes (sometimes: not all machines, not all PHPStorm versions) the plugin trys to create a file on c:/symfony2.xml (

But it is not allowed to create a file in the root of drive c (system-drive)

Maybe the Problem in my case is, that my Name is "J枚rg" - with an german 枚

And so the hole path is lost => it will create a file on root c:/

?

Maybe the Problem in my case is, that my Name is "J枚rg" - with an german 枚

I don't think so, Linux user here and it tries to create /symfony2.xml which is not working.
My path is plain simple /home/user/development/customers/customername/projectname without any special characters.
Therefore I think we can rule UTF-8 problems out.

yes well... same here :(

Presumably com.intellij.openapi.components.PersistentStateComponent has changed its behavior. The path in https://github.com/Haehnchen/idea-php-symfony2-plugin/blame/c77afaa436847b049d7d9c9c80613764e04de073/src/main/java/fr/adrienbrault/idea/symfony2plugin/Settings.java#L23 is not properly expanded/prefixed anymore.

Here is documentation part about Storage annotation

https://jetbrains.org/intellij/sdk/docs/basics/persisting_state_of_components.html#defining-the-storage-location

I assume that fix is simply removing slash.

thx @jensschulze

i've compiled it and your patch seems to work. 馃憤

Can confirm the issue's gone with @jensschulze 's patch in the latest PhpStorm 2020.3 EAP Build #PS-203.4818.52

new release is out with this patch included

I also confirm that #1546 fixed the issue, closing. Thanks to everyone involved!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garak picture garak  路  6Comments

Haehnchen picture Haehnchen  路  7Comments

RikudouSage picture RikudouSage  路  6Comments

stof picture stof  路  6Comments

Haehnchen picture Haehnchen  路  4Comments