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

After updating the desktop app, notifications do not work until the app is restarted #2430

Closed
Jag96 opened this issue Apr 15, 2021 · 44 comments
Assignees
Labels
External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@Jag96
Copy link
Contributor

Jag96 commented Apr 15, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Upwork Post: https://www.upwork.com/jobs/~01f895152ca12662bc

Expected Result:

I expected to receive the notification from the desktop app

Actual Result:

I didn't receive a notification from the desktop app

Action Performed:

  1. Install an earlier version of the Mac OSX desktop client
    1. The easiest way to do this is to download the staging desktop app from https://staging.expensify.cash/Expensify.cash.dmg (updated often), wait until there is an update, and then update the app using the in-app auto update modal (more context in this PR)
  2. Open the desktop client and sign in to your E.cash account
  3. Receive the notification about an update being available, update the app and allow it to restart
  4. From another account (signed into your web browser or mobile app) send a message to the account signed in to the desktop app
  5. You don't receive a desktop notification

Workaround:

Quitting the app and reloading Electron restores notifications.

Platform:

Desktop(Mac)

Version Number: v1.0.23-0
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/151959

Note: To test this on dev, we have steps here that require a Mac and an Apple Developer Account.

@Jag96 Jag96 added the Exported label Apr 16, 2021
@MelvinBot
Copy link

Triggered auto assignment to @chiragsalian (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@pranshuchittora
Copy link
Contributor

@Jag96 is this still open to work?

@Jag96
Copy link
Contributor Author

Jag96 commented May 17, 2021

@pranshuchittora yes this issue is still available to work on! If you're interested please submit a proposal explaining how you plan on fixing the issue.

@mallenexpensify
Copy link
Contributor

@pranshuchittora you'll need to finish the other issue I hired you for before we can hire you on this one. Per our contributing.md "New Expensify.cash contributors are limited to working on one job at a time, however experienced contributors may work on numerous jobs simultaneously. "

@twisterdotcom twisterdotcom pinned this issue Jun 2, 2021
@mallenexpensify mallenexpensify self-assigned this Jun 16, 2021
@mallenexpensify
Copy link
Contributor

Created a new post for the issue and raised price to $500. Assigned to me cuz @Jag96 is out for a bit https://www.upwork.com/jobs/~01f895152ca12662bc

@mallenexpensify
Copy link
Contributor

Sorry @Bognar791 , we're currently running everything through Upwork and can not additionally post to freelancer.com. Would it be helpful if we invited you in Upwork to this job?

@mallenexpensify mallenexpensify removed their assignment Jul 2, 2021
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 2, 2021
@MelvinBot
Copy link

Triggered auto assignment to @Christinadobrzyn (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MelvinBot MelvinBot added Daily KSv2 and removed Weekly KSv2 labels Jul 2, 2021
@mallenexpensify mallenexpensify self-assigned this Jul 2, 2021
@mallenexpensify
Copy link
Contributor

@Christinadobrzyn I'm out next week and need a buddy so used External label. Can you do me a favor and Upload a new job to Upwork with the price 2x and close this one? https://www.upwork.com/jobs/~01f895152ca12662bc

I'll pick this back up when back. Thanks!

@NikkiWines NikkiWines added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 2, 2021
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jul 5, 2021

Closed the Upwork project and created a new one for a fixed price of $500.

New External Job posting - https://www.upwork.com/jobs/~019efa3100649f87a5
Internal posting- https://www.upwork.com/ab/applicants/1413364425165402112/job-details

@Christinadobrzyn
Copy link
Contributor

Invited a few contributors to review the project and see if they are interested.

@attaradev
Copy link
Contributor

Hello @Jag96 and @Christinadobrzyn,
I would love to take this up.

@Jag96
Copy link
Contributor Author

Jag96 commented Jul 7, 2021

@mikeattara great! Are you able to reproduce the issue? Per our contribution guidelines please confirm you can reproduce the issue, and then post a proposal on this issue that explains why the issue is happening and what technical changes you will make to fix it

@Christinadobrzyn
Copy link
Contributor

Reached out to @mikeattara in an Upwork message to see if he's able to send a proposal of how to fix this issue.

@attaradev
Copy link
Contributor

@Christinadobrzyn I am unable to reproduce the issue yet

@Looxor
Copy link
Contributor

Looxor commented Jul 12, 2021

@Jag96 I can't see the update dialog.
I've installed the app from this url https://staging.expensify.cash/Expensify.cash.dmg .
This is the version of the app which I have just installed.

Untitled
Is there any problem on the version?

@Looxor
Copy link
Contributor

Looxor commented Jul 12, 2021

@Jag96 I got this console log which means that it's not the latest version.
Can you please provide an old app or another way to download old version?

Untitled2

@roryabraham
Copy link
Contributor

roryabraham commented Jul 12, 2021

@Looxor there is no update available because you downloaded the latest version of the app. In order to test this, you really need to follow this testing guide

@Looxor
Copy link
Contributor

Looxor commented Jul 12, 2021

@roryabraham , Thank you. I will try.

@MelvinBot MelvinBot removed the Overdue label Jul 26, 2021
@mallenexpensify
Copy link
Contributor

@Christinadobrzyn I just realized I added you for 'buddy check' while I was on vacation but never unassigned you after. Going to do now

@mallenexpensify

This comment has been minimized.

@MelvinBot MelvinBot removed the Overdue label Jul 28, 2021
@rdjuric
Copy link
Contributor

rdjuric commented Jul 28, 2021

Job has been doubled to $1000, same job link in Upwork

I think it was $1000 already on the old link

@mallenexpensify
Copy link
Contributor

@rdjuric good 👀, thanks.
There were two of the same job in Upwork that were open. I closed the old one and doubled the new one.
https://www.upwork.com/jobs/~010e6f0cefe915336a
Can confirm it's doubled to $2k

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Jul 28, 2021

Issue persists on production while updating from Version 1.0.79-4 to 1.0.80-2

  • Saw there was a new version
  • Clicked notification to update
  • App froze as I tried to click update button.
    image
  • Quit app then reopened
  • Backgrounded app
  • Joe sent me message, did not show as a notification.
  • Quit app then reopened
  • Notifications from Joe show.

image

@dklymenk
Copy link
Contributor

Hello, I followed the testing guide and successfully reproduced the issue as well as found a fix it.

If I delete the following code from here, I can no longer reproduce the issue.

    app.relaunch({
        args: [`${EXPECTED_UPDATE_VERSION_FLAG}=${downloadedVersion}`],
    });

I honestly cannot tell why it fixes the issue or what is that code meant to accomplish, but none of the documentation or examples of autoUpdate.quitAndInstall() mention app.relaunch(). And it makes sense to me, since function autoUpdate.quitAndInstall() already restarts the app.

Maybe someone knows why we need that app.relaunch() call. It feels like it is a hack for some other obscure issue. If that's the case, we might want to fix that in some other way that doesn't break notifications.

Thanks.

@dklymenk
Copy link
Contributor

Here is a demo video where I successfully get notifications after app update.

2430-demo.mp4

@mallenexpensify
Copy link
Contributor

@chiragsalian can you provide feedback on the above?

Maybe someone knows why we need that app.relaunch() call

@dklymenk , if needed after Chirag reviews, you can drop that into #expensify-open-source with a link back to this issue to get more 👀

@MelvinBot MelvinBot removed the Overdue label Aug 2, 2021
@roryabraham
Copy link
Contributor

roryabraham commented Aug 2, 2021

I have reviewed and it seems @dklymenk is correct... I can't find any reason why app.relaunch (and by extension the --expected-update-version CLI argument) is needed, since autoUpdater.quitAndInstall handles the versioning + relaunch automatically.

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Aug 3, 2021

@roryabraham , I should hire @dklymenk in Upwork, correct? (post a comment so I'll get a notification plz). or... @chiragsalian

@chiragsalian
Copy link
Contributor

oops, sorry for the delay. I was OOO yesterday and got to this late today. But yes it looks like we're in agreement with your proposal @dklymenk. Feel free to go ahead and create a PR.
@mallenexpensify, go ahead and hire @dklymenk in upwork.

@mallenexpensify
Copy link
Contributor

Hired @dklymenk in Upwork

@dklymenk
Copy link
Contributor

dklymenk commented Aug 4, 2021

Hello, I have accepted the job on upwork and submitted a PR #4406

Thanks.

chiragsalian added a commit that referenced this issue Aug 4, 2021
…-after-update

#2430 remove app.relaunch on desktop update
@chiragsalian chiragsalian added the Reviewing Has a PR in review label Aug 5, 2021
@MelvinBot
Copy link

@chiragsalian, @mallenexpensify, @dklymenk Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mallenexpensify mallenexpensify added Weekly KSv2 and removed Daily KSv2 labels Aug 13, 2021
@dklymenk
Copy link
Contributor

dklymenk commented Sep 4, 2021

Hello, the issue can be closed. The upwork contract is completed and I have received the payment. Thanks.

@mallenexpensify
Copy link
Contributor

Thanks @dklymenk , closing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

14 participants