App icon indicating copy to clipboard operation
App copied to clipboard

[$250] BUG: Desktop App - Black screen on window close in full-screen mode reported by @fedirjh

Open kavimuru opened this issue 2 years ago β€’ 15 comments

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:

  1. Open Desktop App
  2. Set full screen mode
  3. Click close button

Expected Result:

Window is hidden

Actual Result:

Full screen gets black

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.2.18-3 Reproducible in staging?: y Reproducible in production?: y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/197005671-cd6952ec-748b-4fc9-93bf-a52c7cd22928.mp4

https://user-images.githubusercontent.com/43996225/197005267-69572945-9bcd-4c1e-a7c2-e17ee007d6c5.mov

Expensify/Expensify Issue URL: Issue reported by: (http://github.com/fedirjh) Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1666181224266319

View all open jobs on GitHub

kavimuru avatar Oct 20 '22 16:10 kavimuru

Triggered auto assignment to @CortneyOfstad (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

melvin-bot[bot] avatar Oct 20 '22 16:10 melvin-bot[bot]

this issue happens when we change the default close logic https://github.com/electron/electron/issues/20263 https://github.com/Expensify/App/blob/299f07bfa29c0dd81a6126691aae29e161097baa/desktop/main.js#L262-L269

We have to exit full screen mode then we hide window

browserWindow.on('close', (evt) => { 
    if (quitting || hasUpdate ) { 
        return; 
    } 
 
    evt.preventDefault(); 

    if (browserWindow.isFullScreen()) { 
        browserWindow.once('leave-full-screen', () => browserWindow.hide()) 
        browserWindow.setFullScreen(false) 
    } else { 
        browserWindow.hide() 
    } 
 
});

Or we just quit


browserWindow.on('close', (evt) => { 
    if (quitting || hasUpdate || browserWindow.isFullScreen() ) { 
        return; 
    } 
 
    evt.preventDefault(); 
    browserWindow.hide() 
 
});

fedirjh avatar Oct 20 '22 17:10 fedirjh

Was able to recreate this on my side and had to completely quit the app in order to get out of the black screen

2022-10-21_06-56-15 (1)

CortneyOfstad avatar Oct 21 '22 11:10 CortneyOfstad

Triggered auto assignment to @PauloGasparSv (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

melvin-bot[bot] avatar Oct 21 '22 11:10 melvin-bot[bot]

Marking this as External! Found some other fix suggestions on the web other than the one commented here so it's not an uncommon issue with electron

PauloGasparSv avatar Oct 21 '22 16:10 PauloGasparSv

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

melvin-bot[bot] avatar Oct 21 '22 16:10 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External)

melvin-bot[bot] avatar Oct 21 '22 16:10 melvin-bot[bot]

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

melvin-bot[bot] avatar Oct 21 '22 16:10 melvin-bot[bot]

Reviewing today!

dylanexpensify avatar Oct 24 '22 09:10 dylanexpensify

I am not sure if we should go with the workaround suggested here. What's your opinion about it @aldo-expensify ?

thesahindia avatar Oct 24 '22 15:10 thesahindia

From a short research I agree with it being a bug on the electron side (https://github.com/electron/electron/issues/20263). I think the workaround proposed is fine while the bug is there.

Besides implementing the solution, we could create a new issue like this one https://github.com/electron/electron/issues/20263, but with the electro version we are using. I understand that the existing issue was closed because it mentions an unmaintained electron version.

I tested the proposed solution and the results is good enough for me:

https://user-images.githubusercontent.com/87341702/197594263-4a6f23cc-72bd-44d3-ba92-2869ec61485c.mov

aldo-expensify avatar Oct 24 '22 18:10 aldo-expensify

What are the next steps here?

thesahindia avatar Oct 25 '22 12:10 thesahindia

What are the next steps here?

I would go with this proposal: https://github.com/Expensify/App/issues/12042#issuecomment-1285900417 (if it is a proposal πŸ˜† )

aldo-expensify avatar Oct 25 '22 17:10 aldo-expensify

Cool, let's move forward with @fedirjh's proposal (first approach).

C+ reviewed πŸŽ€πŸ‘€πŸŽ€

thesahindia avatar Oct 26 '22 10:10 thesahindia

reviewing today!

dylanexpensify avatar Oct 31 '22 09:10 dylanexpensify

πŸ“£ @fedirjh You have been assigned to this job by @aldo-expensify! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

melvin-bot[bot] avatar Nov 02 '22 01:11 melvin-bot[bot]

BugZero Checklist: The PR fixing this issue has been merged! The following checklist will need to be completed before the issue can be closed:

  • [ ] A regression test has been added or updated so that the same bug will not reach production again. Link to the updated test here:
  • [ ] The PR that introduced the bug has been identified. Link to the PR:
  • [ ] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [ ] A discussion in #contributor-plus has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [ ] Payment has been made to the issue reporter (if applicable)
  • [ ] Payment has been made to the contributor that fixed the issue (if applicable)
  • [ ] Payment has been made to the contributor+ that helped on the issue (if applicable)

melvin-bot[bot] avatar Nov 02 '22 17:11 melvin-bot[bot]

@dylanexpensify For this checklist step, I think you can best handle it by posting in #contributor-plus slack channel and using this type of approach (since this checklist is actively evolving):

Hey @user1, @user2, @user3, @user4 - this PR (link) caused this bug (link). What do you think we could have done differently in the original PR to prevent this bug from being introduced?

michaelhaxhiu avatar Nov 03 '22 20:11 michaelhaxhiu

ah nice one!

dylanexpensify avatar Nov 04 '22 11:11 dylanexpensify

@thesahindia and @fedirjh any idea on the offending PR that led to this bug?

dylanexpensify avatar Nov 04 '22 13:11 dylanexpensify

@dylanexpensify, as mentioned at https://github.com/Expensify/App/issues/12042#issuecomment-1285900417, It is an electron bug. Not a regression.

thesahindia avatar Nov 04 '22 13:11 thesahindia

reviewing today!

dylanexpensify avatar Nov 07 '22 08:11 dylanexpensify

@fedirjh can you let us know when your PR will be ready for review?

dylanexpensify avatar Nov 07 '22 11:11 dylanexpensify

It's already in production.

thesahindia avatar Nov 07 '22 11:11 thesahindia

@fedirjh can you let us know when your PR will be ready for review?

https://github.com/Expensify/App/pull/12368 : Deployed to production

fedirjh avatar Nov 07 '22 11:11 fedirjh

Working through steps on checklist

dylanexpensify avatar Nov 10 '22 10:11 dylanexpensify

@fedirjh, @dylanexpensify, @thesahindia, @aldo-expensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Nov 14 '22 08:11 melvin-bot[bot]

reviewing today!

dylanexpensify avatar Nov 14 '22 08:11 dylanexpensify

reviewing today mel!

dylanexpensify avatar Nov 14 '22 08:11 dylanexpensify

@dylanexpensify, it's ready to be settled. The PR was deployed to production 11 days ago

thesahindia avatar Nov 15 '22 17:11 thesahindia