Getting an FCM error, 'MismatchSenderId' when trying to send push notification

Please provide the following:

  1. SDK Version: 34
  2. Platforms(Android/iOS/web/all): Android

Hello,

When developing in Expo app, everything works fine, as far the as the push notifications are concerned. The intended recipient receives the push notification. But when I deploy the Node backend to Heroku, the ticket chunk throws an error, 'error: ‘MismatchSenderId’. What could be wrong?

      // Get their push token
      const { pushToken } = user;

      console.log("token!", pushToken); // ExponentPushToken[PrzBxfLzvVXwfRho_abtMC]

      if (!Expo.isExpoPushToken(pushToken)) {
        console.error(`Push token ${pushToken} is not a valid Expo push token`);
      }

      const message = {
        to: pushToken,
        sound: "default",
        body: notificationData
      };

      // Send it out
      const ticketChunk = await expo.sendPushNotificationsAsync([message]);

      // Push notification receipt
      console.log("ticketChunk from reply", ticketChunk[0].details.fcm); // errors out here
    }
  } catch (err) {
    console.log("errrrr", err);
  }

Hey @mkhoussid,

It looks there are a couple possibilities on what might be occurring here. I’d start with this one firebase - FCM getting MismatchSenderId - Stack Overflow and go from there in this thread.

Cheers,
Adam

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.