Skip to content

[firebase_messaging]: Messaging stopped working properly after firebase update #13287

@pamafe1976

Description

@pamafe1976

Is there an existing issue for this?

  • I have searched the existing issues.

Are you aware of the differences between iOS and Android background message handling?

  • I understand that iOS and Android background messages behave differently, and I've designed my application with that in mind.

Do you have an active Apple Developer account?

  • I have an active Apple Developer account.

Are you using a physical iOS device to test background messages?

  • I am using a physical iOS device to test background messages.

Have you enabled "Remote Notifications" & "Background Mode" (Checking options for "Background Processing" & "Remote Notifications") in your app's Xcode project?

image

Have you created an APNs key in your Apple Developer account & uploaded this APNs key to your Firebase console?

image

Have you disabled method swizzling for Firebase in your app?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CADisableMinimumFrameDurationOnPhone</key>
	<true/>
	<key>CFBundleDevelopmentRegion</key>
	<string>$(DEVELOPMENT_LANGUAGE)</string>
	<key>CFBundleDisplayName</key>
	<string>CatedralApp</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>catedralapp</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>$(FLUTTER_BUILD_NAME)</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>com.googleusercontent.apps.730634363046-ibebsa45r1d8v889vt1smtivfp64475g</string>
			</array>
		</dict>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLName</key>
			<string>BundleID</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>com.pmf.catedralappios</string>
			</array>
		</dict>
	</array>
	<key>CFBundleVersion</key>
	<string>$(FLUTTER_BUILD_NUMBER)</string>
	<key>GADApplicationIdentifier</key>
	<string>ca-app-pub-1785464071070677~7221440751</string>
	<key>GIDClientID</key>
	<string>730566337046-ibebsa45r1d8v889vt1smtivfp04233g.apps.googleusercontent.com</string>
	<key>LSApplicationCategoryType</key>
	<string></string>
	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>sms</string>
		<string>tel</string>
	</array>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
	<string>We need to access your location while the app is in the background, This will allow CatedralApp to give you instructions and record your tracks even when your phone is in your pocket.</string>
	<key>NSLocationAlwaysUsageDescription</key>
	<string>We need to access your location while the app is in the background. This will allow CatedralApp to give you instructions and record your tracks even when your phone is in your pocket.</string>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string>We need to access your location in order to show your position on the resort map.</string>
	<key>PermissionGroupNotification</key>
	<string>Notification</string>
	<key>NSMicrophoneUsageDescription</key>
	<string>The application does not use this permission</string>
	<key>UIApplicationSupportsIndirectInputEvents</key>
	<true/>
	<key>UIBackgroundModes</key>
	<array>
		<string>audio</string>
		<string>fetch</string>
		<string>location</string>
		<string>remote-notification</string>
	</array>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIStatusBarHidden</key>
	<false/>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<false/>
	<key>FirebaseDynamicLinksCustomDomains</key>
	<array>
		<string>https://catedralapp.com.ar/shares</string>
	</array>
	<key>FirebaseDeepLinkPasteboardRetrievalEnabled</key>
	<false/>
	<key>FirebaseAutomaticScreenReportingEnabled</key>
	<false/>
</dict>
</plist>

Are you sending messages to your app from the Firebase Admin SDK?

def enviarTest():
    msg = messaging.Message(topic='test', data={
        'foo': 'bar', 'topic': 'test'}, apns=messaging.APNSConfig(
        payload=messaging.APNSPayload(
            aps=messaging.Aps(content_available=True)),
    ),)
    messaging.send(msg)
    return None

Have you requested permission from the user to receive notifications?

  • I have the relevant permission to receive notifications.

Have you used the 'Console' application on your macOS device to check if the iOS device's system is throttling your background messages?

Im attaching different cases:

  1. With BOM 1.1.0, background message correctly delivered to app
    link to content
  2. With BOM 2.0.0, foreground message is not delivered
    link to content
  3. With BOM 2.0.0, background message is not delivered
    link to content
  4. With BOM 2.0.0, if I add badge to the message, foreground is delivered but background not
    link to content

Additional context and comments

Im using firebase messaging in a flutter app.
Everything works fine (foreground and background messages are correctly received) if I revert to versions from 2024-05-28 - [BoM 1.1.0]

However if I go to a version equal or greater than 2024-06-04 - [BoM 2.0.0]
messaging stops working, both foreground and background. I have found that foreground works if I add a badge number to the message, but I dont understand why.

Background messages are not delivered to the app even when badge is present.
I have tried both with and without setting content_available=True. In BOM 1.1.0 works fine regardless of this setting, and in BOM 2.0.0 and above does not deliver the background messages at all.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions