Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
createPushSender(sender.ts#L651) batched all registered mobile subscriptions into 100-message requests tohttps://exp.host/--/api/v2/push/sendregardless of Expo project. When devices from different Expo projects (for example stable and nightly builds) were registered together, Expo rejected the entire batch withPUSH_TOO_MANY_EXPERIENCE_IDSand dropped notifications for every device in the batch. Investigation report: https://get-bb.github.io/reports/issues/7578.htmlWhat changed
plugins/push-notifications/sender.ts:details: z.unknown().optional()toexpoPushErrorSchema.PUSH_TOO_MANY_EXPERIENCE_IDSfor a multi-device batch,splitBatchByExperiencesplits deliveries by Expo'serrors[].detailsmap (experienceId -> token[], with any unassigned tokens in a remainder group) or falls back to single-token batches whendetailsdoes not split the batch; single-token rejections stop without retrying.token -> experienceIdmappings inexperienceIdsByToken(cleared onDeviceNotRegistered) and grouped bothdeliveranddismissThreadviabatchesFor(deliveries)so single-project setups stay one HTTP request while mixed-project sends avoid extra round-trips on subsequent pushes.PLUGIN_OVERVIEW.mddoes not describe Expo batch splitting internals.No wire change, no KV schema change, and no mobile re-registration required.
How you verified
Base commit:
origin/main4d7a9af609.origin/main)d823875043)PUSH_TOO_MANY_EXPERIENCE_IDSwithdetailsexperienceId, delivers all, pre-groups subsequent sendsPUSH_TOO_MANY_EXPERIENCE_IDSwithoutdetailsDeviceNotRegisteredafter split / single-token rejectionTests added in
plugins/push-notifications/server.test.ts(3 new tests failed before the fix; 43/43 pass after).CI parity command:
pnpm exec turbo run typecheck test lint lint:type-aware --filter=bb-plugin-push-notifications --continuetypecheck,lint,lint:type-aware: passed (0 errors, 0 warnings).test:server.test.ts(43/43) andnotification-text.test.ts(1/1) passed (app.test.tsx/client.test.tshit local Node 26window.localStorageshadowing).Fixes #7578