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.ide.scratch.ScratchFileServiceImpl$Substitutor returned Language.ANY, which is not allowed

See original GitHub issue

What happened

I updated IntelliJ to 2019.2.1 and after it opened I got this error.

Version information

IntelliJ IDEA 2019.2.1 • Flutter plugin io.flutter 38.2.4 • Dart plugin 192.6459

Error getting Flutter sdk information.

Exception

null

java.lang.Throwable: For Language: TEXT and file://C:/Users/Michel Feinstein/.IntelliJIdea2019.2/config/scratches/bug-report_1.md, com.intellij.ide.scratch.ScratchFileServiceImpl$Substitutor returned Language.ANY, which is not allowed
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
	at com.intellij.psi.LanguageSubstitutors.substituteLanguage(LanguageSubstitutors.java:48)
	at com.intellij.lang.LanguageUtil.getLanguageForPsi(LanguageUtil.java:38)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.createFileViewProvider(FileManagerImpl.java:265)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findViewProvider(FileManagerImpl.java:211)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:371)
	at com.intellij.openapi.fileTypes.ex.FileTypeChooser.getKnownFileTypeOrAssociate(FileTypeChooser.java:123)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getKnownFileTypeOrAssociate(FileTypeManagerImpl.java:1741)
	at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInEditorOrNativeApp(OpenFileDescriptor.java:127)
	at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigate(OpenFileDescriptor.java:117)
	at io.flutter.FlutterErrorReportSubmitter.submitAsync(FlutterErrorReportSubmitter.java:198)
	at com.intellij.openapi.diagnostic.ErrorReportSubmitter.trySubmitAsync(ErrorReportSubmitter.java:69)
	at com.intellij.openapi.diagnostic.ErrorReportSubmitter.submit(ErrorReportSubmitter.java:61)
	at com.intellij.diagnostic.IdeErrorsDialog.reportMessage(IdeErrorsDialog.java:617)
	at com.intellij.diagnostic.IdeErrorsDialog.doOKAction(IdeErrorsDialog.java:374)
	at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1861)
	at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1821)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6416)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	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:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:817)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:762)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:405)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:404)
	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)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-doroshkocommented, Aug 22, 2019
0reactions
pqcommented, Aug 22, 2019

Great catch. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scratch files | IntelliJ IDEA Documentation - JetBrains
You can create a scratch file with a draft of the method, which is not stored in your project directory but can be...
Read more >
stop IntelliJ IDEA to switch java language level every time the ...
I can change the language level to 8.0 (F4 -> Modules -> Language level) however every time I edit my pom.xml the project...
Read more >
IntelliJ IDEA. Scratch Files and Scratch Buffers - YouTube
In this screencast we're going to take a look at both scratch files and scratch buffers and identify their key uses. Scratch files...
Read more >
IntelliJ IDEA | Full Course | 2020 - YouTube
Every aspect of IntelliJ IDEA is specifically designed to maximize developer productivity.Together, the powerful static code analysis and ...
Read more >
What programming language is recommended for students to ...
with their choice of programming language to meet all the criteria in the Create performance task. A list of suggested programming languages is...
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