App
App copied to clipboard
[HOLD for payment 2023-04-24] [HOLD for payment 2023-04-20] [$2000] Tapping on notification /switching chats does not take to correct chat / closing immediately
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Scenario 1:
- Receive a notification from another account for any message
- Tap on the notification
Scenario 2:
- Open a chat
- Switch to another chat
Expected Result:
User is taken to correct chat when tapping on notification and should not and go back to LHN When switching chat rooms, should load chat and should not close
Actual Result:
Some times chat does not open on tapping notification or it opened the chat ever so slightly then closed it immediately, going back to the LHN
When switching the chat it does not load or returning back to LHN
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android / native
- [ ] Android / Chrome
- [ ] iOS / native
- [ ] iOS / Safari
- [ ] MacOS / Chrome / Safari
- [ ] MacOS / Desktop
Version Number: 1.2.80 Reproducible in staging?: Needs reproduction Reproducible in production?: Needs reproduction If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:
Expensify/Expensify Issue URL: Issue reported by: @quinthar Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1677683692081849
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01a33e508f0b3ba861
- Upwork Job ID: 1635427381211086848
- Last Price Increase: 2023-03-20
Triggered auto assignment to @davidcardoza (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Bug0 Triage Checklist (Main S/O)
- [x] This "bug" occurs on a supported platform (ensure
Platformsin OP are ✅) - [x] This bug is not a duplicate report (check E/App issues and #expensify-bugs)
- If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
- [x] This bug is reproducible using the reproduction steps in the OP. S/O
- If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
- If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
- [x] This issue is filled out as thoroughly and clearly as possible
- Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
- [x] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
Sending out to external since this was reported by an internal employee and verified by others as reproducible in the Slack thread.
Job added to Upwork: https://www.upwork.com/jobs/~01a33e508f0b3ba861
Current assignee @davidcardoza is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)
Triggered auto assignment to @marcaaron (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@davidcardoza @marcaaron I'm unable to reproduce this.
https://user-images.githubusercontent.com/16493223/225389358-eaf0f6c3-0515-48ed-990f-2f84ad550bf3.mp4
Not overdue. I think this need reproduction. Also no proposals yet...
Not overdue. Same ^
@davidcardoza @s77rt @marcaaron this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
No proposals yet. This issue needs reproduction
If someone is able to reproduce this we can look at logs to see if there are any hints. It hasn't been reported since it was first reported.
Is there any overlap between this issue and the notifications reliability project? cc @Julesssss @arosiclair @cristipaval
Maybe we can roll this into that project as I expect there will be a lot of testing around notifications... 🤔
I can't reproduce it either, but have previously seen the issue where users are taken to the LHN instead of a chat.
In reality, we are still switching to the correct chat, but due to the LHN/Chat navigation being at the same level in the navigation hierachy the user is taken to the LHN. Swiping right shows them the correct chat in this case. So I think we can either close this, or hold it on the navigation reboot.
Given we have no reproducable steps, I lean towards just closing.
Looks like something related to react-navigation may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.
Feel free to drop a note in #expensify-open-source with any questions.
Let's close until this becomes reproducible.
Looks like @quinthar is still reliably experiencing this.
@davidcardoza can you work with him to figure out consistent reproduction steps.
Able to repro locally.. Looking in the backend I think something about how we or airship sends the payload has changed.
Current assignee @s77rt is eligible for the Internal assigner, not assigning anyone new.
K got it working. The regression was caused when we upgraded to a new version of Airship. I guess the "selected" notification payload is slightly different now we need to parse the payload differently. Fix incoming.
I can reproduce the bug now, either I was using an old version here https://github.com/Expensify/App/issues/15758#issuecomment-1470441625 or something else broke :sweat_smile: Reviewing PR...
Airship upgrade was done only about 2 weeks ago https://github.com/Expensify/App/pull/16360 but this bug existed way before. If anyone was able to reproduce the bug before then he may still reproduce it now. IOW the root cause is not Airship upgrade.
IOW the root cause is not Airship upgrade.
I think there are a couple of different causes. Some, but far from all users were able to reproduce initially. But since the Airship lib upgrade it was reproducible 100% of the time.
Tested the airship fix on staging v1.2.99-4. It did fix the notification click handler, however we're still not always navigating to the correct report (tested on Android). It seems we might be attempting to navigate before the navigator is ready:
2023-04-12 12:21:29.170 5687-5849/? D/ReactNativeJS: [info] [PushNotification] Callback triggered for com.airship.push_received - ""
2023-04-12 12:21:29.170 5687-5849/? D/ReactNativeJS: [info] [Report] Handled event sent by Airship - {"reportID":6730613174801450}
2023-04-12 12:21:29.210 5687-5849/? D/ReactNativeJS: [info] [PushNotification] Subscribing to notifications for account ID mEp3dzoOo8fD7e6x - ""
2023-04-12 12:21:29.212 5687-5849/? D/ReactNativeJS: [info] Making API request - {"command":"OptInToPushNotifications"}
2023-04-12 12:21:29.212 5687-5849/? D/ReactNativeJS: [info] Found existing deviceID - "redfin41160afc-ebf2-a041-f515-f0a1ca877df0"
2023-04-12 12:21:29.214 5687-5849/? D/ReactNativeJS: [info] [PushNotification] Callback triggered for com.airship.notification_response - ""
2023-04-12 12:21:29.214 5687-5849/? D/ReactNativeJS: [hmmm] [Navigation] navigate failed because navigation ref was not yet ready - {}
2023-04-12 12:21:29.214 5687-5849/? D/ReactNativeJS: [info] [PushNotification] Callback triggered for com.airship.notification_response - ""
2023-04-12 12:21:29.214 5687-5849/? D/ReactNativeJS: [hmmm] [Navigation] navigate failed because navigation ref was not yet ready - {}
2023-04-12 12:21:29.273 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] start - ""
2023-04-12 12:21:29.274 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration MoveToIndexedDB (Not applicable to current platform) - ""
2023-04-12 12:21:29.275 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration RenameActiveClientsKey - ""
2023-04-12 12:21:29.276 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration RenamePriorityModeKey - ""
2023-04-12 12:21:29.277 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration AddEncryptedAuthToken - ""
2023-04-12 12:21:29.277 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration RenameExpensifyNewsStatus - ""
2023-04-12 12:21:29.280 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration AddLastVisibleActionCreated - ""
2023-04-12 12:21:29.281 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] Skipped migration KeyReportActionsByReportActionID because we already migrated it - ""
2023-04-12 12:21:29.281 5687-5849/? D/ReactNativeJS: [info] [Migrate Onyx] finished in 8ms - ""
2023-04-12 12:21:29.288 5687-5849/? D/ReactNativeJS: [info] [NetworkConnection] NetInfo state change - {"details":{"isConnectionExpensive":false,"subnet":"255.255.255.255","ipAddress":"192.168.86.101","frequency":5180,"strength":99,"bssid":"02:00:00:00:00:00"},"isConnected":true,"type":"wifi","isInternetReachable":true,"isWifiEnabled":true}
2023-04-12 12:21:29.511 5687-5849/? D/ReactNativeJS: [info] [NetworkConnection] listenForReconnect called - ""
2023-04-12 12:21:29.520 5687-5849/? D/ReactNativeJS: 'Timing:staging.new.expensify.trie_initialization', 194
2023-04-12 12:21:29.521 5687-5849/? D/ReactNativeJS: 'Timing:staging.new.expensify.homepage_initial_render', 209
2023-04-12 12:21:29.522 5687-5849/? D/ReactNativeJS: [info] Navigating to route - {"path":"/?openOnAdminRoom=false"}
2023-04-12 12:21:29.579 5687-5849/? D/ReactNativeJS: [info] Navigating to route - {"path":"/r/91464947"}
And here are repro steps
- Log into NewDot
- Select a different chat
- Background the app
- Open the multi-task view and swipe the app away
- Send yourself a message
- Click the notification
- Check if the correct report was opened
@marcaaron do you have the bandwidth to prioritize this? It's being considered a critical bug. If not I can take over.
Yeah I can help look into this.
Open the multi-task view and swipe the app away
Just to clarify, what is this exactly?
This view. Swipe up from the bottom and hold for a second. Then you can swipe the app away to kill it.
Also just added another step for opening a different chat first. When clicking the notification, I'm usually just seeing the last chat that was open.
device logs:
WARN Possible Unhandled Promise Rejection (id: 0):
Error: Could not open URL 'undefinedr/7256767318622412': No Activity found to handle Intent { act=android.intent.action.VIEW dat=undefinedr/7256767318622412 flg=0x10000000 }
Error: Could not open URL 'undefinedr/7256767318622412': No Activity found to handle Intent { act=android.intent.action.VIEW dat=undefinedr/7256767318622412 flg=0x10000000 }
at promiseMethodWrapper (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4691:45)
at openURL (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:94946:80)
at anonymous (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:218671:39)
at tryCallOne (/Users/roryabraham/react-native/ReactAndroid/hermes-engine/.cxx/Release/33576s3o/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16)
at anonymous (/Users/roryabraham/react-native/ReactAndroid/hermes-engine/.cxx/Release/33576s3o/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27)
at apply (native)
at anonymous (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26622:26)
at _callTimer (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26541:17)
at _callReactNativeMicrotasksPass (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26571:17)
at callReactNativeMicrotasks (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26734:44)
at __callReactNativeMicrotasks (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:5052:46)
at anonymous (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4864:45)
at __guard (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:5036:15)
at flushedQueue (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4863:21)
at invokeCallbackAndReturnFlushedQueue (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4857:33)
WARN Possible Unhandled Promise Rejection (id: 1):
Error: Could not open URL 'undefinedr/7256767318622412': No Activity found to handle Intent { act=android.intent.action.VIEW dat=undefinedr/7256767318622412 flg=0x10000000 }
Error: Could not open URL 'undefinedr/7256767318622412': No Activity found to handle Intent { act=android.intent.action.VIEW dat=undefinedr/7256767318622412 flg=0x10000000 }
at promiseMethodWrapper (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4691:45)
at openURL (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:94946:80)
at anonymous (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:218671:39)
at tryCallOne (/Users/roryabraham/react-native/ReactAndroid/hermes-engine/.cxx/Release/33576s3o/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16)
at anonymous (/Users/roryabraham/react-native/ReactAndroid/hermes-engine/.cxx/Release/33576s3o/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27)
at apply (native)
at anonymous (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26622:26)
at _callTimer (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26541:17)
at _callReactNativeMicrotasksPass (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26571:17)
at callReactNativeMicrotasks (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:26734:44)
at __callReactNativeMicrotasks (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:5052:46)
at anonymous (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4864:45)
at __guard (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:5036:15)
at flushedQueue (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4863:21)
at invokeCallbackAndReturnFlushedQueue (http://localhost:8083/index.bundle?platform=android&dev=true&minify=false&app=com.expensify.chat&modulesOnly=false&runModule=true:4857:33)
Lead me to this undefined variable here:
https://github.com/Expensify/App/blob/0a8e87237ce80e702df15f44622eea8c33c94c81/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js#L34-L35
because we are importing the wrong CONST here:
https://github.com/Expensify/App/blob/f496b9f9bf8a167ba688f517510c125e693b40ed/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js#L1