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.

Reference element is not the same element for which references were queried

See original GitHub issue

Hi,

I have some issue on PHPStorm v 2020.4 with symfony plugin v 0.22.205

the text info: Element text: cache:pool:delete Reference range: (0,17)

the stack trace: com.intellij.diagnostic.PluginException: Reference element is not the same element for which references were queried [Plugin: fr.adrienbrault.idea.symfony2plugin] at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:337) at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12) at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:59) at com.intellij.diagnostic.PluginException.logPluginError(PluginException.java:76) at com.intellij.psi.PsiReferenceServiceImpl.assertReferencesHaveSameElement(PsiReferenceServiceImpl.java:55) at com.intellij.psi.PsiReferenceServiceImpl.getReferences(PsiReferenceServiceImpl.java:28) at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:32) at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.lambda$execute$0(PsiSearchHelperImpl.java:948) at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:88) at com.intellij.psi.impl.search.LowLevelSearchUtil.lambda$processElementsAtOffsets$0(LowLevelSearchUtil.java:179) at com.intellij.psi.impl.search.LowLevelSearchUtil.processOffsets(LowLevelSearchUtil.java:205) at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:178) at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.execute(PsiSearchHelperImpl.java:944) at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:280) at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:271) at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:25) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:885) at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61) at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:25) at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$18(PsiSearchHelperImpl.java:905) at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$11(PsiSearchHelperImpl.java:543) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1132) at com.intellij.openapi.application.ex.ApplicationUtil.tryRunReadAction(ApplicationUtil.java:33) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:525) at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$7(PsiSearchHelperImpl.java:400) at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$8(PsiSearchHelperImpl.java:473) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183) at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$9(PsiSearchHelperImpl.java:472) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137) at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65) at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104) at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) Caused by: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Element: com.intellij.psi.impl.source.xml.XmlTokenImpl; reference: fr.adrienbrault.idea.symfony2plugin.config.xml.ParameterXmlReference; reference element: com.intellij.psi.impl.source.xml.XmlTextImpl at com.intellij.psi.PsiReferenceServiceImpl.assertReferencesHaveSameElement(PsiReferenceServiceImpl.java:65) … 40 more

Thanks a lot Good Bye

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thereIsMostDefinitelyNothinToSeeHerecommented, May 19, 2021
com.intellij.diagnostic.PluginException: Reference element is not the same element for which references were queried [Plugin: fr.adrienbrault.idea.symfony2plugin]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:300)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:81)
	at com.intellij.diagnostic.PluginException.logPluginError(PluginException.java:98)
	at com.intellij.psi.PsiReferenceServiceImpl.assertReferencesHaveSameElement(PsiReferenceServiceImpl.java:54)
	at com.intellij.psi.PsiReferenceServiceImpl.getReferences(PsiReferenceServiceImpl.java:27)
	at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:32)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.lambda$execute$0(PsiSearchHelperImpl.java:942)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:88)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.lambda$processElementsAtOffsets$0(LowLevelSearchUtil.java:179)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processOffsets(LowLevelSearchUtil.java:205)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:178)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.execute(PsiSearchHelperImpl.java:938)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:272)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:263)
	at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:25)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:844)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
	at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:25)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$17(PsiSearchHelperImpl.java:899)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$10(PsiSearchHelperImpl.java:535)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:515)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$7(PsiSearchHelperImpl.java:392)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$8(PsiSearchHelperImpl.java:465)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$9(PsiSearchHelperImpl.java:464)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Element: com.intellij.psi.impl.source.xml.XmlTokenImpl; reference: fr.adrienbrault.idea.symfony2plugin.config.xml.ParameterXmlReference; reference element: com.intellij.psi.impl.source.xml.XmlTextImpl
	at com.intellij.psi.PsiReferenceServiceImpl.assertReferencesHaveSameElement(PsiReferenceServiceImpl.java:64)
	... 35 more
1reaction
lostfocuscommented, Mar 8, 2021

Same issue here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting a direct reference or pointer to a visual element in ...
Query returns a VisualElement, or you can use Q<Label>(nameOfLabel) (or any other type) to reference other element types more directly. I've  ...
Read more >
Stale Element reference error on finding the element
It throws Stale Element Reference error and does not click the second element on the page, says element is not attached to the...
Read more >
Stale element reference: element is not attached to the page ...
Been trying to get the synthetics scripted browser working for a contact us form. However I've been running into issues with the error ......
Read more >
References and Resolve | IntelliJ Platform Plugin SDK
While the referencing element and the referenced element both may have a name, only the element which introduces the name (e.g., ...
Read more >
Exceptions | Selenium
Invalid Selector · has invalid characters or; has an invalid query ; No Such Element · The element may not be present. ;...
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