JulianAssmann / flutter_background

A flutter plugin to keep apps running in the background via foreground services. Android only.
https://pub.dev/packages/flutter_background
MIT License
89 stars 52 forks source link

App crashes after accepting permission #53

Open Neumann-Valle opened 2 years ago

Neumann-Valle commented 2 years ago

Describe the bug After the permission are accepted the app crashes.

To Reproduce You must include full steps to reproduce so that we can reproduce the problem.

Expected behavior App suppose to work normally

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone:

-Android emulator Pixel 3A

Logs ``` ``` ``` [✓] Flutter (Channel stable, 2.8.0, on Ubuntu 20.04.3 LTS 5.13.0-27-generic, locale en_US.UTF-8) • Flutter version 2.8.0 at /home/utan/snap/flutter/common/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision cf44000065 (7 weeks ago), 2021-12-08 14:06:50 -0800 • Engine revision 40a99c5951 • Dart version 2.15.0 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /home/utan/Android/Sdk • Platform android-31, build-tools 30.0.3 • Java binary at: /snap/android-studio/115/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at google-chrome [✓] Android Studio (version 2020.3) • Android Studio at /snap/android-studio/115/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 11.0.10+0-b96-7249189) [✓] VS Code • VS Code at /snap/code/current • Flutter extension version 3.32.0 [✓] Connected device (2 available) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Chrome (web) ```

Following error:

D/AndroidRuntime( 8657): Shutting down VM
E/AndroidRuntime( 8657): FATAL EXCEPTION: main
E/AndroidRuntime( 8657): Process: rvc.chat.client.com, PID: 8657
E/AndroidRuntime( 8657): android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{a6cf6c9 u0 rvc.chat.client.com/de.julianassmann.flutter_background.IsolateHolderService}

Then app Crashes.

JulianAssmann commented 2 years ago

This plugin is Android only, see the documentation.

Neumann-Valle commented 2 years ago

I am on android..

Neumann-Valle commented 2 years ago

see the logs.. Please reopen bug

JulianAssmann commented 2 years ago

Ah OK, the issue first said you were on iPhone.

Neumann-Valle commented 2 years ago

My bad, I am really bad with github..

Neumann-Valle commented 2 years ago

So any ideas why is this bug coming up?

Neumann-Valle commented 2 years ago

So, I decided to test with old versions and all sound null versions works, but version 1.0.0 and 1.1.0.

I have tried to see what are the changelogs on those versions to see what's goin on. Nevermind found them.

JulianAssmann commented 2 years ago

Did you find the issue?

Neumann-Valle commented 2 years ago

No I haven't..