Skip to content

Flutter requested I file a bug about a Bad UTF-8 encoding when running a large application handling radio data of dubious UTF-8-itude #184646

Description

@interfect

Steps to reproduce

  1. Be running https://github.com/zjs81/meshcore-open with flutter run -d edge
  2. Pair the application to a MeshCore device over Bluetooth and let it try and download contacts and messages.
  3. Have someone have sent a MeshCore advertisement with a name that Flutter does not like.

Expected results

Browser window remains open.

Actual results

Browser window suddenly closes.

Terminal where I started the app displays:

Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string: [Notification] queued: advert (🥨KI4OTK Backpack �)
. The Flutter team would greatly appreciate if you could file a bug explaining exactly what you were doing when this happened:
https://github.com/flutter/flutter/issues/new/choose
The source bytes were:
[91, 78, 111, 116, 105, 102, 105, 99, 97, 116, 105, 111, 110, 93, 32, 113, 117, 101, 117, 101, 100, 58, 32, 97, 100, 118, 101, 114, 116, 32, 40, 240, 159, 165, 168, 75, 73, 52, 79, 84, 75, 32, 66, 97, 99, 107, 112, 97, 99, 107, 32, 239, 191, 189, 41, 10]

I assume the real problem is that there are indeed some non-UTF-8 byte sequences flying around (maybe coming from the MeshCore device?), and the application is somehow promising that they are valid when they aren't, which upsets the runtime like this. But it could be that the runtime is genuinely broken.

Code sample

I have absolutely no idea what the underlying cause of the bug here is, and I cannot currently program my way out of a paper bag in Dart, but Flutter itself requested I open this issue. I will need help from someone who knows anything about Dart to determine how the message I received might be used to construct an example that reproduces the problem.

Screenshots or Video

No response

Logs

I'm not able to provide a log here because it would contain a large amount of identifiable information about people the radio device has been talking to.

Flutter Doctor output

Doctor output
$ flutter doctor -v
[√] Flutter (Channel stable, 3.41.6, on Microsoft Windows [Version 10.0.26200.8037], locale en-US) [254ms]
    • Flutter version 3.41.6 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db50e20168 (11 days ago), 2026-03-25 16:21:00 -0700
    • Engine revision 425cfb54d0
    • Dart version 3.11.4
    • DevTools version 2.54.2
    • 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-lldb-debugging, enable-uiscene-migration

[√] Windows Version (My Windows Version) [686ms]

[X] Android toolchain - develop for Android devices [320ms]
    • Android SDK at C:\Users\(My User Name)\AppData\Local\Android\sdk
    • Emulator version 34.2.14.0 (build_id 11834374) (CL:N/A)
    X cmdline-tools component is missing.
      Try installing or updating Android Studio.
      Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure to set the ANDROID_HOME environment variable.
      See https://developer.android.com/studio/command-line for more details.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) [93ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.29 (March 2026)) [92ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.14.37111.16
    • Windows 10 SDK version 10.0.26100.0

[√] Connected device (2 available) [5.2s]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26200.8037]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 146.0.3856.97
    ! Device (Device Hash) is not authorized.
      You might need to check your device for an authorization dialog.

[√] Network resources [137ms]
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions