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

Firebase Remote Config Terminates Background Music Player Application #13119

Open
ahmadhassan-dev opened this issue Jun 12, 2024 · 4 comments
Open

Comments

@ahmadhassan-dev
Copy link

ahmadhassan-dev commented Jun 12, 2024

Description

I am encountering an issue with my music player application where the app is unexpectedly terminated when Firebase Remote Config is used. The music is playing in the background, and the termination occurs during this process.

Reproducing the issue

  1. Implement a music player application that can play music in the background.
  2. Integrate Firebase Remote Config into the application.
  3. Start playing music in the background.

Expected Behavior:
The application should continue playing music in the background without termination when Firebase Remote Config is used.

Actual Behavior:
The application terminates unexpectedly when Firebase Remote Config fetches remote configurations while the music is playing in the background.

Firebase SDK Version

10.27.0

Xcode Version

15.3

Installation Method

CocoaPods

Firebase Product(s)

Remote Config

Targeted Platforms

iOS

Relevant Log Output

I was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.

Getting this before OS Terminates the application

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
PODS:
  - FirebaseABTesting (10.27.0):
    - FirebaseCore (~> 10.0)
  - FirebaseCore (10.27.0):
    - FirebaseCoreInternal (~> 10.0)
    - GoogleUtilities/Environment (~> 7.12)
    - GoogleUtilities/Logger (~> 7.12)
  - FirebaseCoreInternal (10.27.0):
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseInstallations (10.27.0):
    - FirebaseCore (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/UserDefaults (~> 7.8)
    - PromisesObjC (~> 2.1)
  - FirebaseRemoteConfig (10.27.0):
    - FirebaseABTesting (~> 10.0)
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - FirebaseRemoteConfigInterop (~> 10.23)
    - FirebaseSharedSwift (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseRemoteConfigInterop (10.27.0)
  - FirebaseSharedSwift (10.27.0)
  - GoogleUtilities/Environment (7.13.3):
    - GoogleUtilities/Privacy
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/Logger (7.13.3):
    - GoogleUtilities/Environment
    - GoogleUtilities/Privacy
  - "GoogleUtilities/NSData+zlib (7.13.3)":
    - GoogleUtilities/Privacy
  - GoogleUtilities/Privacy (7.13.3)
  - GoogleUtilities/UserDefaults (7.13.3):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - PromisesObjC (2.4.0)
  - RevenueCat (4.32.4)
  - SkPayment (1.0.3):
    - RevenueCat (~> 4.32.3)

DEPENDENCIES:
  - FirebaseRemoteConfig
  - SkPayment (from `https://github.com/Vyro-ai/ios-payments.git`, tag `1.2.0`)

SPEC REPOS:
  trunk:
    - FirebaseABTesting
    - FirebaseCore
    - FirebaseCoreInternal
    - FirebaseInstallations
    - FirebaseRemoteConfig
    - FirebaseRemoteConfigInterop
    - FirebaseSharedSwift
    - GoogleUtilities
    - PromisesObjC
    - RevenueCat

EXTERNAL SOURCES:
  SkPayment:
    :git: https://github.com/Vyro-ai/ios-payments.git
    :tag: 1.2.0

CHECKOUT OPTIONS:
  SkPayment:
    :git: https://github.com/Vyro-ai/ios-payments.git
    :tag: 1.2.0

SPEC CHECKSUMS:
  FirebaseABTesting: 038a7d5f1e36ba7208cf34f6f596946d8f70d6c3
  FirebaseCore: a2b95ae4ce7c83ceecfbbbe3b6f1cddc7415a808
  FirebaseCoreInternal: 4b297a2d56063dbea2c1d0d04222d44a8d058862
  FirebaseInstallations: 766dabca09fd94aef922538aaf144cc4a6fb6869
  FirebaseRemoteConfig: 37a2ba3c8c454be8553a41ba1a2f4a4f0b845670
  FirebaseRemoteConfigInterop: c55a739f5ab121792776e191d9fd437dc624a541
  FirebaseSharedSwift: a03fe7a59ee646fef71099a887f774fe25d745b8
  GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
  PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
  RevenueCat: 60ad2127f167090f6d0153aa3f9c003f9a840ae3
  SkPayment: 39f60388e1c253f40df0d436284abb54f558aed8

PODFILE CHECKSUM: e1c7195eb6f4fdeb2ebf6f08e24897fef879fdf3

COCOAPODS: 1.15.2

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777
Copy link
Member

Please share a reproducible example.

@google-oss-bot
Copy link

Hey @ahmadhassan-dev. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@ahmadhassan-dev
Copy link
Author

I am using MPNowPlayerInfoCenter & MPRemoteCommandCenter also added the capability of Audio, Airplay and Picture in Picture

When song play and I keep app in background the OS kills the app as I am using Remote Config and when i remove Remote Config dependency then the songs continuously plays in background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants