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
PlatformException(channel-error, Unable to establish connection on channel., null, null) when starting Firebase.initializeApp from iOS background task
#513
Open
4 tasks done
markalroberts opened this issue
Oct 10, 2023
· 6 comments
I have ran the sample app and it does not work there
Version
Technology
Version
Workmanager version
0.52
Xcode version
14.1
Swift version
5.7.1
iOS deployment target
16.x
Describe the error
I am trying to use WorkManager for a regular 15 minute background tasks to update the BadgeIcon number and show some local notifications. This works fine on Android. On iOS, when I simulate background refresh, I get this error at the point that Firebase.initializeApp is called at the start of Workmanager().executeTask- however it works fine when it's called in main.dart.
PlatformException(channel-error, Unable to establish connection on channel., null, null)
I have tried to find out what could be causing this and all searching points to a mismatch in versions of Firebase or dependant libraries. I have gone through the Flutter clean and update process but it has not helped.
Output of flutter doctor -v
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.6, on macOS 12.7 21G816 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.78.2)
[✓] VS Code (version 1.78.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
The text was updated successfully, but these errors were encountered:
// "I've had the same problem. But it was my mistake - I've used a not initialized firebase instance within the isolate ..."
// edit: only worked for a short time
Any update or solution on this one? I'm facing this issue at the moment when triggering the iOS background task from the Xcode debugger. I'm using the branch suggested in here:
Version
Describe the error
I am trying to use WorkManager for a regular 15 minute background tasks to update the BadgeIcon number and show some local notifications. This works fine on Android. On iOS, when I simulate background refresh, I get this error at the point that
Firebase.initializeApp
is called at the start ofWorkmanager().executeTask
- however it works fine when it's called in main.dart.PlatformException(channel-error, Unable to establish connection on channel., null, null)
I have tried to find out what could be causing this and all searching points to a mismatch in versions of Firebase or dependant libraries. I have gone through the Flutter clean and update process but it has not helped.
Output of
flutter doctor -v
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.6, on macOS 12.7 21G816 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.78.2)
[✓] VS Code (version 1.78.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
The text was updated successfully, but these errors were encountered: