flutter / flutter/flutter-intellij

Opening a new project window

Open
#6,163 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

Thanks for the feedback! If your issue is related to the Flutter framework itself,
please open an issue at
[github.com/flutter/flutter](https://github.com/flutter/flutter/issues/new).

## Steps to Reproduce
I was trying to open a new project to a new window then I go the IDE error then I got this exception

## Version info

Android Studio `Bumblebee | 2021.1.1 Patch 3` • Flutter plugin `io.flutter 67.1.1` • Dart plugin `211.7817`

Error getting Flutter SDK information.

## Exception

null

```
com.intellij.serviceContainer.AlreadyDisposedException: Cannot create io.flutter.bazel.WorkspaceCache because container is already disposed: Project(name=kwaratranshealth, containerState=DISPOSE_COMPLETED, componentStore=C:\Users\Aderoju Israel\StudioProjects\kwaratranshealth) (disposed)
at com.intellij.serviceContainer.ComponentManagerImpl.throwContainerIsAlreadyDisposed(ComponentManagerImpl.kt:522)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:498)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
at io.flutter.bazel.WorkspaceCache.getInstance(WorkspaceCache.java:83)
at io.flutter.inspector.InspectorService.lambda$new$5(InspectorService.java:274)
at io.flutter.utils.StreamSubscription.notify(StreamSubscription.java:43)
at io.flutter.utils.EventStream.lambda$setValue$0(EventStream.java:78)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:787)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:325)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
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:969)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:787)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
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)
```

#flutter doctor

C:\Users\Aderoju Israel>flutter doctor -v
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.22000.652], locale en-US)
• Flutter version 2.10.5 at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5bac7 (4 weeks ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at C:\Users\Aderoju Israel\AppData\Local\Android\sdk
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] VS Code (version 1.67.0)
• VS Code at C:\Users\Aderoju Israel\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available)
• SM N950U (mobile) • ce10171ac01f0536047e • android-arm64 • Android 9 (API 28)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.652]
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.64
• Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.39

[√] HTTP Host Availability
• All required HTTP hosts are available

! Doctor found issues in 2 categories.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the error when opening a project in a new window with the reported Android Studio and Flutter plugin versions. Trace the disposal failure through io.flutter.bazel.WorkspaceCache.getInstance in WorkspaceCache.java and the callback created in InspectorService.java. Done means opening the new window no longer raises AlreadyDisposedException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.