Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Channel sent message from native to Flutter on a non-platform thread. #1451

Open
3 of 8 tasks
ronaldvanmanen opened this issue Mar 5, 2024 · 1 comment
Open
3 of 8 tasks
Assignees
Labels
platform: windows Issue is related to the Windows platform status: blocked Indicates the issue is blocked by another issue of third-party. type: bug Something isn't working

Comments

@ronaldvanmanen
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Steps to reproduce

Both the example in geolocator/ and the example in geolocator_windows/ produce the errors described below.

Expected results

No error message in the debug console,

Actual results

I'm getting the following error messages in the debug console:

[ERROR:flutter/shell/common/shell.cc(1038)] The 'flutter.baseflow.com/geolocator_service_updates'
channel sent a message from native to Flutter on a non-platform thread. Platform channel messages
must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must
be fixed in the plugin or application code creating that channel.

See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading
for more information.
[ERROR:flutter/shell/common/shell.cc(1038)] The 'flutter.baseflow.com/geolocator_updates'
channel sent a message from native to Flutter on a non-platform thread. Platform channel messages
must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must
be fixed in the plugin or application code creating that channel.

See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading
for more information.

Code sample

Code sample
Geolocator.getPositionStream().listen((position) {
  log('Position: ${position.latitude}, ${position.longitude}');
});

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

11.0.0

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.19.1, on Microsoft Windows [Version 10.0.22631.3155], locale en-NL)
    • Flutter version 3.19.1 on channel stable at C:\Users\rvanm\Source\Repos\flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision abb292a07e (2 weeks ago), 2024-02-20 14:35:05 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\rvanm\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
    • All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2022 17.9.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Enterprise
    • Visual Studio Enterprise 2022 version 17.9.34616.47
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.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 17.0.7+0-b2043.56-10550314)

[√] VS Code, 64-bit edition (version 1.87.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.84.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.3155]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 122.0.6261.95
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 122.0.2365.66

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

• No issues found!
@TimHoogstrate TimHoogstrate added the platform: windows Issue is related to the Windows platform label Mar 6, 2024
@ronaldvanmanen ronaldvanmanen changed the title [Bug]: [Bug]: Channel sent message from native to Flutter on a non-platform thread. Mar 11, 2024
@mvanbeusekom
Copy link
Member

Hi @ronaldvanmanen,

Thank you for reporting this issue. I have looked into it and came to the following conclusion:

Although the message suggests otherwise, this is an warning. The application still compiles and should run without problems. The Flutter team is aware of the problem and are planning a fix (see issue flutter/flutter#134346). To expedite a solution consider leaving a thumbs-up.

I will leave the issue open for tracking purposes, and others as a reference.

@mvanbeusekom mvanbeusekom added type: bug Something isn't working status: blocked Indicates the issue is blocked by another issue of third-party. labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: windows Issue is related to the Windows platform status: blocked Indicates the issue is blocked by another issue of third-party. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants