Install
$ agentstack add skill-iml1s-flutter-claude-skills-flutter-pub-get-stuck ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Flutter CLI Stuck / Hangs / Invalid SDK Hash — Diagnosis & Fix
When to Use
Use this skill when:
flutter pub get,flutter build,flutter run, or ANY Flutter CLI command hangs indefinitely (no output for > 30 seconds)- You see
Can't load Kernel binary: Invalid SDK hasherror fvm fluttercommands produce zero output- Flutter commands were working before but suddenly stopped
Root Cause Checklist
Work through these in order — each step resolves a progressively deeper issue.
1. 🧟 Zombie dart.exe / java.exe Processes (Most Common)
Symptoms: Flutter command shows no output, or hangs at "Resolving dependencies..."
Diagnosis:
Get-Process -Name dart,flutter,java -ErrorAction SilentlyContinue | Format-Table Name,Id,CPU,WS -AutoSize
Key Indicators:
- More than 5 dart.exe processes → likely zombies
- Any dart.exe using > 200MB memory (WS column) → stuck analysis/compilation
- java.exe running > 500MB → Gradle daemon holding resources
- A
flutter runrunning for hours in another terminal → WILL block everything - IDE analysis server constantly respawning dart.exe → kill IDE too
Fix:
# Kill all Flutter-related processes
Get-Process dart,java,flutter -ea 0 | Stop-Process -Force -ea 0
Start-Sleep 2
# Verify zero remaining
Get-Process dart,java -ea 0 | Measure-Object | Select-Object -ExpandProperty Count
> [!WARNING] > The IDE (VS Code / Android Studio) analysis server will respawn dart.exe processes. If zombies keep coming back, close the IDE first.
2. 🔒 Flutter SDK Lockfile
Symptoms: Zero output from any Flutter command. Zombie processes already killed but still hangs.
Diagnosis & Fix:
For FVM projects, first find the SDK path:
# Read .fvmrc to find the Flutter version
Get-Content .fvmrc
# Common FVM paths on Windows:
# C:\Users\\fvm\versions\\
# C:\Users\\AppData\Local\fvm\versions\\
Then remove the lockfile:
$sdkCache = "C:\Users\$env:USERNAME\fvm\versions\\bin\cache"
Remove-Item "$sdkCache\lockfile" -Force -ErrorAction SilentlyContinue
Remove-Item "$sdkCache\flutter.bat.lock" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Pub\Cache\lock" -Force -ErrorAction SilentlyContinue
3. 💀 Corrupted bin/cache — "Invalid SDK Hash" (Nuclear Option)
Symptoms:
Can't load Kernel binary: Invalid SDK hasherror- Flutter commands hang even after killing processes and removing lockfiles
dart.exe --versionworks butflutter --versionhangs- Deleting just the snapshot or lockfile doesn't help
Root Cause: The Dart SDK cached inside bin/cache/dart-sdk/ is mismatched with the Flutter SDK version, or the flutter_tools.snapshot is corrupted. This typically happens after:
- Interrupted
flutter upgrade - Multiple FVM version switches
- Disk space issues during SDK download
- System crashes during Flutter operations
Fix — Delete entire bin/cache:
# Step 1: Kill ALL dart/java processes
Get-Process dart,java,flutter -ea 0 | Stop-Process -Force -ea 0
Start-Sleep 2
# Step 2: Delete the entire bin/cache directory
$sdkPath = "C:\Users\$env:USERNAME\fvm\versions\"
cmd /c "rd /s /q $sdkPath\bin\cache"
# If rd fails on locked files, kill cmd.exe processes holding locks:
# Get-Process cmd -ea 0 | Stop-Process -Force -ea 0
# Then retry rd
# Step 3: Verify deletion
Test-Path "$sdkPath\bin\cache" # Should return False
# Step 4: Reactivate FVM (fixes FVM's own snapshot mismatch)
& "$sdkPath\bin\cache\dart-sdk\bin\dart.exe" pub global deactivate fvm
& "$sdkPath\bin\cache\dart-sdk\bin\dart.exe" pub global activate fvm
# If dart.exe doesn't exist yet (cache deleted), use system dart:
# dart pub global deactivate fvm; dart pub global activate fvm
# Step 5: Run flutter doctor to trigger fresh SDK download
fvm flutter doctor -v
# This will:
# - Download Dart SDK from Flutter engine
# - Expand archive
# - Build flutter_tools
# - Run pub upgrade
> [!IMPORTANT] > Remove-Item -Recurse in PowerShell often silently fails on locked files. Always use cmd /c "rd /s /q " for reliable recursive deletion, and verify with Test-Path afterward.
> [!IMPORTANT] > After deleting bin/cache, Flutter will re-download ~200MB of Dart SDK. Make sure you have internet connectivity. The first flutter doctor after cache deletion takes 2-5 minutes.
4. 📡 Network Issues (pub.dev unreachable)
Diagnosis:
ping pub.dev -n 3
Invoke-WebRequest -Uri "https://pub.dev" -UseBasicParsing -TimeoutSec 5
Fix:
# Use Chinese mirror if behind firewall
$env:PUB_HOSTED_URL = "https://pub.flutter-io.cn"
$env:FLUTTER_STORAGE_BASE_URL = "https://storage.flutter-io.cn"
flutter pub get
5. 🧹 Corrupted Pub Cache
Fix:
flutter clean
Remove-Item pubspec.lock -ErrorAction SilentlyContinue
flutter pub cache repair
flutter pub get
One-Liner Emergency Fix
# Kill everything → delete locks → clean → retry
Get-Process dart,java,flutter -ea 0 | Stop-Process -Force; Start-Sleep 2; Remove-Item pubspec.lock -ea 0; fvm flutter clean; fvm flutter pub get
Nuclear One-Liner (when Invalid SDK hash)
# Kill everything → nuke cache → reactivate FVM → rebuild
Get-Process dart,java -ea 0 | Stop-Process -Force; Start-Sleep 2; cmd /c "rd /s /q C:\Users\%USERNAME%\fvm\versions\\bin\cache"; dart pub global deactivate fvm; dart pub global activate fvm; fvm flutter doctor -v
Finding the FVM SDK Path
The FVM SDK path varies across machines. To find it programmatically:
# Method 1: Check where fvm.bat is located
where.exe fvm
# Usually: C:\Users\\AppData\Local\Pub\Cache\bin\fvm.bat
# Method 2: Look for flutter.bat in the user's fvm directory
Get-ChildItem "C:\Users\$env:USERNAME\fvm\versions" -Filter "flutter.bat" -Recurse -Depth 3 -ea 0 | Select-Object -First 5 -ExpandProperty FullName
# Method 3: Common locations
# C:\Users\\fvm\versions\\bin\flutter.bat
# C:\Users\\AppData\Local\fvm\versions\\bin\flutter.bat
Prevention
- Always stop
flutter runbefore runningflutter pub get— a hot-reloading session locks Dart processes - Don't run multiple Flutter CLI commands simultaneously in different terminals
- Close IDE before major cleanup operations — the analysis server respawns dart.exe
- Check for zombie processes if your machine feels slow or after IDE crashes
- Don't interrupt
flutter upgrade— if you must, deletebin/cacheafterward - When using FVM, stick to one version per terminal session — rapid version switching can corrupt the cache
Related skills
systematic-debugging— use when flutter pub get hangs to diagnose whether it's a process lock, network issue, or corrupted cache.fvm-flutter-release— for release builds, ensure flutter pub get completes cleanly before using FVM for version-specific builds.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ImL1s
- Source: ImL1s/flutter-claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.