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

App crash when opening notification #557

Open
tharro opened this issue Nov 18, 2024 · 1 comment
Open

App crash when opening notification #557

tharro opened this issue Nov 18, 2024 · 1 comment

Comments

@tharro
Copy link

tharro commented Nov 18, 2024

  • thread Verify Ably as publisher #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x16d527fd0)
    frame #0: 0x0000000180aa5c18 CoreFoundation__CFStrAllocateMutableContents CoreFoundation:
    -> 0x180aa5c18 <+0>: stp x20, x19, [sp, #-0x20]!
    0x180aa5c1c <+4>: stp x29, x30, [sp, #0x10]
    0x180aa5c20 <+8>: add x29, sp, #0x10
    0x180aa5c24 <+12>: add x8, x0, #0x8

dependencies:
ably_flutter: ^1.2.35
firebase_core: ^2.12.0
firebase_messaging: ^14.6.0
firebase_analytics: ^10.4.0
firebase_crashlytics: ^3.3.0
flutter_local_notifications: ^17.2.1
device_info_plus: ^10.0.1

In android/src/main/AndroidManifest.xml

...
<meta-data
            android:name="com.google.firebase.messaging.default_notification_channel_id"
            android:value="test" />
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@mipmap/ic_notification" />
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_color"
            android:resource="@color/primary" />
        <receiver android:name="io.ably.flutter.plugin.push.FirebaseMessagingReceiver"
            tools:node="remove">
        </receiver>
...

In iOS/AppDelegate.swift

...
override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: AblyData) {
       AblyInstanceStore.sharedInstance().didRegisterForRemoteNotifications(withDeviceToken: deviceToken)
    }

    override func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
       AblyInstanceStore.sharedInstance().didFailToRegisterForRemoteNotificationsWithError_error = error;
       NSLog("application:didFailToRegisterForRemoteNotificationsWithError was called with error: %@", error.localizedDescription)
    }
    ...

┆Issue is synchronized with this Jira Task by Unito

@tharro tharro changed the title Crash app when open notification App crashes when opening notification Nov 19, 2024
@tharro tharro changed the title App crashes when opening notification App crash when opening notification Nov 19, 2024
@lawrence-forooghian
Copy link
Collaborator

Hi @tharro, thanks for reporting this. Would you be able to share an example project with some instructions on how to reproduce the issue?

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

No branches or pull requests

2 participants