Open muttmuure opened 1 month ago
Triggered auto assignment to @CortneyOfstad (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Was able to recreate so going to get eyes on this!
Job added to Upwork: https://www.upwork.com/jobs/~01b96cd2222bc21292
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External
)
I've been unable to replicate this in production with a physical iOS device
Cannot view logs. SSO required
π£ @drantis! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Unable to reproduce:
The OS only lets a certain amount of push notifications to reach the app and this depends on many things like Battery, Amount of push notifications we have recently sent, etc. perhaps that is the cause, or perhaps we're missing some extra steps required to reproduce this?
Was not able to reproduce (details here)
Talking to @Julesssss and @muttmuure in Slack, I'm going to need to create a new Expensify account under a public domain email. Testing this now π
Alright I was able to recreate! I ran the snippet for cort2007@gmail.com and signed in via the mobile app. Enabled notifications, quit the app.
From cortney@expensify.com, I attempted to send a test message and it never notified me on iOS
Unable to reproduce on latest staging:
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@Julesssss, @CortneyOfstad, @sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
The reproduction steps here are to dismiss the redirect (using Switch to Expensify Classic) and then you don't receive notifications anymore.
So sign up on a public domain which will set the redirect, then navigate back to Classic. This disables notifications for you on the back end and you no longer receive them
This member invitation redirection is higher priority. But I will get back to this soon
@Julesssss are we expecting proposals on this, or will you be working on the fix?
Hey @sobitneupane, I'm pretty sure this is a backend issue. So you can unassign and unsubscribe
I'm finding it hard to verify currently. I see no difference in NVPs between users. I believe re-authenticating could work, but I'd like to confirm Matt and Cortney's NVP data before we confirm that fix.
notificationID
being present in OnyxIt looks like the NVP data is identical for both 'unsubscribed' users and regular users:
Unsbscribed
"private_pushNotificationID": "ptetgDGrF0KHB2ev",
"pushNotificationsEnabled": {
"iPhone8,4_C5A88FFA-C9E0-4D6C-8969-96DABCA6D1CE": [
{
"isEnabled": true,
"timestamp": "2024-05-31 10:24:25"
}
]
},
**Subscribed**
// ID
"private_pushNotificationID": "cKWxpD68HHuwAtHx",
"EnablePushNotifications": { // This doesn't seem to be used anywhere...
"completed": {
"data": {
"value": "allow"
},
"time": 1638377726
},
"dismissed": {
"data": [],
"time": 1701962990
}
},
"pushNotificationsEnabled": {
"bluejay002ce64b-2937-13c3-6a13-a80b5c37ef1f": [
{
"isEnabled": true,
"timestamp": "2023-03-16 10:30:51"
}
],
...
Not overdue!
Busy with other chores today. Will carry on when I'm back on Wednesday
@Julesssss @CortneyOfstad this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
I'm still working on chores, reviews, ect and didn't have time to pickup today. I'll have time for this tomorrow.
Issue not reproducible during KI retests. (First week)
I'm afraid I have again been too busy with chores and other daily/hourly tasks to get to this. I will make time tomorrow.
@CortneyOfstad in the meantime, it would be helpful to confirm:
I find it confusing that magic codes aren't sent to new accounts on first entering your email; AFAICT, you must wait 30 seconds and then try again to receive it...
I can now reproduce on Android too. This only works for hybrid app. I see the same log that Matt reported here.
Signing into expensify.com
and being redirected doesn't work as far as I can tell,
[App] 2024-06-07T13:24:01.533Z - [info] [PushNotification] Unsubscribing from push notifications. ~~ parameters: '' userAgent: 'okhttp/4.9.2'
π
Not overdue!
The UserAPI::createTemporaryLogin
function attempts to retrieve the private_pushNotificationID
NVP, here. But this is being retrieved as null
or ''
. This seems to be reproducible 100% of the time in prod.
But reproducing locally is tricky because the unsubscription only occurs on mobile. When debugging web I do in fact see the NVP being set π
Once again I have been pulled away to finish some other things. And new instances of a previous fire...
For now, I think the eventual solutions will be:
createTemporaryLogin
(secondary improvement)note: I should try temp-mail for throwaway accounts
I continued investigating today. A lot of my time is being spent building the Hybrid app locally for debugging...
Here is the specific line of code causes us to de-register from Airship. I don't yet know why, but the app behaves differently when being run within hybrid app:
nvp_private_pushNotificationID
exists, so we register for push notificationsnvp_private_pushNotificationID
is null, so we deregister for push notifications I think this is because a a unique flow is used for the Hybrid app flow, where the user's accountID is returned (via createTemporaryLogin
). This function gets the users accountID and returns it as Onyx data. Perhaps this is called too early for it to work within Hybrid app...
Next steps:
I think Mariusz will eventually hit this issue when resolving Hybrid notifications as this problem seems to be that we deregister from Airship due to the missing Onyx data.
My best guess so far is that the mounting of PushNotification
is happening too early, or in the wrong order when NewDot is running within Hybrid.
I'll remain subscribed.
cc @staszekscp
I had a bit of time to have a look at the issue π If the issue is indeed related to calling PushNotification.deregister()
I think the key would be to change the callback for ONYXKEYS.NVP_PRIVATE_PUSH_NOTIFICATION_ID
key. Currently we register to push notifications, even though we do it already by calling registerOnStartup
on the native OldDot side - therefore the user is already registered whenever we enter NewDot.
It means that theoretically we could skip registration/deregistration of PushNotifications on NewDot side. Especially if we're not going to let users to logout on NewDot. It would require some testing, but after some testing it seems that it would work.
FYI: I'm going to be out of office for the next two weeks, but I hope that it'll help you debug this issue π
@Julesssss any update? Last one I can see is from Slack here β thanks!
Hey @CortneyOfstad, this is held on wider Hybrid notification changes. Which I believe will be investigated by @staszekscp when he is back.
@AndrewGable I looked for a Hybrid notification issues in the board and tracker but can't see anything. Are we missing a wider issue for this?
Thanks @Julesssss!
@staszekscp β if you have any questions, or need anything β just let me know!
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v1.4.74-4 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: @muttmuure Slack conversation: https://expensify.enterprise.slack.com/archives/C05LX9D6E07/p1715102667514389
Action Performed:
Break down in numbered steps
Expected Result:
Actual Result:
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
None
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @sobitneupane