Skip to content

🐞Workmanager can't execute Post requests on Android 15 #649

@falerr

Description

@falerr
  • I have read the README
  • I have done the setup for Android
  • I have done the setup for iOS
  • I have ran the sample app and it does not work there

Version

Technology Version
Workmanager version 0.9.0+3

Describe the error
When the app is running and the callbackDispatcher executes, it does everything Ok, but when the app is closed it triggers as normal but on Android 15 it shows this error when doing a Post request (if the app is still open there is no problem):

The connection errored: Failed host lookup: 'myweb.com' This indicates an error which most likely cannot be solved by the library.

I got two devices, a Samsung Tab A9 which I updated yesterday to Android 15 and now I found this issue where before there wasn't any and it would execute the code correctly, and a Samsung Tab S9 wich is still on Android 14 and the code runs just fine.

Output of flutter doctor -v
[✓] Flutter (Channel stable, 3.35.1, on macOS 13.7.8 22H730 darwin-x64, locale ca-ES) [1.779ms]
• Flutter version 3.35.1 on channel stable at /Users/plautech/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 20f8274939 (3 weeks ago), 2025-08-14 10:53:09 -0700
• Engine revision 1e9a811bf8
• Dart version 3.9.0
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging

[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1) [11,3s]
• Android SDK at /Users/plautech/Library/Android/sdk
• Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
• Platform android-36, build-tools 36.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/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.6+-13391695-b895.109)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 15.2) [3,3s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [42ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [39ms]
• Android Studio at /Applications/Android Studio.app/Contents
• 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 21.0.6+-13391695-b895.109)

[✓] Connected device (4 available) [8,9s]
• SM T733 (mobile) • R52T903RC0M • android-arm64 • Android 14 (API 34)
• iPad (wireless) (mobile) • 00008101-000A049414D2601E • ios • iOS 18.5 22F76
• macOS (desktop) • macos • darwin-x64 • macOS 13.7.8 22H730 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 139.0.7258.155
! Error: Browsing on the local area network for iPhone de Guifré. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPad (2). Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [473ms]
• All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions