You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter analyze crashes with FormatException when project path contains non-ASCII characters (Flutter 3.47) #191309
flutter analyze crashes with an unhandled FormatException: Unexpected end of input in the analysis server's LSP channel when the project is located under a path containing non-ASCII characters (e.g. a curly apostrophe ’ in Alexander’s MacBook Pro).
dart analyze on the same project works fine.
Steps to reproduce
Create a directory with a non-ASCII character in its name, e.g. ~/Alexander’s/projects
cd into it and run flutter create repro
cd repro && flutter analyze
The same project copied to a pure-ASCII path analyzes without issues. Running via an ASCII symlink also fails, because the tool resolves the symlink back to the real (non-ASCII) path.
Expected result
flutter analyze completes normally regardless of path characters.
Actual result
The analysis server exits with code 255:
Unhandled exception:
FormatException: Unexpected end of input (at character 490)
...evenuoapp/"}],"capabilities":{"window":{"workDoneProgress":true}}
^
#0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1466)
#1 _ChunkedJsonParser.close (dart:convert-patch/convert_patch.dart:496)
#6 LspByteStreamServerChannel._readMessage (package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart:96)
...
analysis server exited with code 255
The truncated payload is the LSP initialize message whose rootUri contains the non-ASCII path. This looks like a Content-Length computed in characters rather than UTF-8 bytes somewhere in the flutter tool's LSP client, so the server reads fewer bytes than the actual message and JSON parsing hits end of input.
Confirming this as a regression. I downgraded to Flutter 3.41.4 to test, and flutter analyze runs without any issues there.
Terminal logs windows:
PS C:\Developer\flutter> flutter doctor -v
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine e4b8dca3f1b4ede4c30371002441c88c12187ed6...
Expanding downloaded archive with PowerShell...
Building flutter tool...
Running pub upgrade...
Resolving dependencies... (1.6s)
Downloading packages...
Got dependencies.
Downloading package sky_engine... 622ms
Downloading package flutter_gpu... 327ms
Downloading flutter_patched_sdk tools... 1,272ms
Downloading flutter_patched_sdk_product tools... 575ms
Downloading windows-x64 tools... 4.7s
Downloading windows-x64/font-subset tools... 2,182ms
[!] Flutter (Channel [user-branch], 3.41.4, on Microsoft Windows [Version 10.0.26200.9168], locale en-IN) [567ms]
! Flutter version 3.41.4 on channel [user-branch] at C:\Developer\flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision ff37bef603 (6 months ago), 2026-03-03 16:03:22 -0800
• Engine revision e4b8dca3f1
• Dart version 3.11.1
• DevTools version 2.54.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
cli-animations, enable-native-assets, omit-legacy-version-file, enable-windowing, enable-lldb-debugging,
enable-uiscene-migration
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform
update checks and upgrades.
[√] Windows Version (Windows 11 or higher, 25H2, 2009) [2.7s]
[√] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [4.6s]
• Android SDK at C:\Users\Puneet\AppData\Local\Android\sdk
• Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
• Platform android-37.1, build-tools 37.0.0
• Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
• All Android licenses accepted.
[√] Chrome - develop for the web [207ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.3.2) [204ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\18\Community
• Visual Studio Community 2026 version 18.3.11520.95
• Windows 10 SDK version 10.0.26100.0
[√] Connected device (3 available) [422ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26200.9168]
• Chrome (web) • chrome • web-javascript • Google Chrome 151.0.7922.138
• Edge (web) • edge • web-javascript • Microsoft Edge 151.0.4129.93
[√] Network resources [1,250ms]
• All expected network resources are available.
! Doctor found issues in 1 category.
PS C:\Developer\flutter> cd ..
PS C:\Developer> cd ..
PS C:\> mkdir "C:\test_’_dir"
Directory: C:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 19-08-2026 07:36 test_’_dir
PS C:\> cd "C:\test_’_dir"
PS C:\test_’_dir> flutter create repro_app
Creating project repro_app...
Resolving dependencies in `repro_app`...
Downloading packages...
Got dependencies in `repro_app`.
Wrote 131 files.
All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
In order to run your application, type:
$ cd repro_app
$ flutter run
Your application code is in repro_app\lib\main.dart.
PS C:\test_’_dir> cd .\repro_app\
PS C:\test_’_dir\repro_app> flutter analyze
Analyzing repro_app...
No issues found! (ran in 60.1s)
PS C:\test_’_dir\repro_app>
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
puneetkukreja98 commentedon Aug 19, 2026
@AlexanderVegazo26 Thanks for reporting this issue, I was able to reproduce it on my both machines mac & windows.
Confirming this as a regression. I downgraded to Flutter 3.41.4 to test, and flutter analyze runs without any issues there.
Findings:
Terminal logs macOS:
Flutter doctor -v:
puneetkukreja98 commentedon Aug 19, 2026
Terminal logs windows:
[flutter_tools] Compute LSP Content-Length header using UTF-8 byte le…
github-actions commentedon Sep 3, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.