Desktop: Windows spawn off-screen after remote desktop

Created on 22 Mar 2017  路  20Comments  路  Source: mattermost/desktop

I confirm (by marking "x" in the [ ] below):

Summary
Mattermost client spawns off-screen after using the remote desktop feature.

  • Operating System: Windows 10 Enterprise
  • Mattermost Desktop App version: 3.6.0
  • Mattermost Server version: 3.6.0 (3.6.1)

Steps to reproduce

1-Open mattermost.
2-Move the window to a secondary screen.
3-Access the computer using the remote desktop feature as the same user.
4-Disconnect from the remote desktop session.
5-After logging in the computer directly, the mattermost window is still running but it spawns to an off-screen location.

Expected behavior
The mattermost window should be visible on the secondary screen like before the remote desktop session.

Observed behavior
The mattermost window spawns off-screen.

Possible fixes
As depicted in a previous issue marked as solved, deleting
%USERPROFILE%\AppData\Roaming\Mattermost\bounds-info.json
after completely closing the client works.

More Information Needed Windows

Most helpful comment

After some research and consultation with the colleague that had the same issue, we reached the conclusion that the windows updates, restart of the application AND deletion of the
%USERPROFILE%\AppData\Roaming\Mattermost\bounds-info.json
file fixed the trouble. Only restarting the application did not fix the problem, same with only deleting the file. It is recreated with bad values every time the application window shows up.

Before deletion, the file had some weird "X" value (-3280), thich is probably related to both of my screens resolutions (1920*2).

Thank you for your support, your software is great!

All 20 comments

@jnugh looks like there are still some instances where the desktop app opens in an "invisible" screen as described above

the mattermost window is still running but it spawns to an off-screen location.

I'm not sure how Windows RD works - so I'm not sure if I got this right: When you clsoe the remote desktop session you do not log off form your user, right? So when you use your monitor you do not have to login again and all applications are still running?

The desktop app checks if it has been placed off screen during startup, so when you didn't restart the Desktop app it will not notice that it is placed in a dead area.
I was expecting that Windows moves applications that are running still to an active monitor when the viewport changes.

When you restart Mattermost after this happens (without removing bound-info.json, does it appear at a valid position?

For the remote session, it is like locking the computer. When using remote desktop it prompts you for the password and it's like you never left your computer. It also shows only one screen, squishing all your applications on a single screen.

In my case, I lock my workstation when leaving in the evening and sometimes have to remotely log in to access our systems. The next morning when I get back to work the session is locked. After inputting my password, mattermost's window has disappeared from its previous spot on my offscreen and is now somewhere to the far left, not visible to any screen.

The window does not "reset" to a valid position after restarting the app.

**After installing this week's windows updates, I am having trouble reproducing the problem convincingly. I will advise on the issue next week since I will have to work more often remotely. A colleague also had the same issue so I will check with him how things are going this week.

After some research and consultation with the colleague that had the same issue, we reached the conclusion that the windows updates, restart of the application AND deletion of the
%USERPROFILE%\AppData\Roaming\Mattermost\bounds-info.json
file fixed the trouble. Only restarting the application did not fix the problem, same with only deleting the file. It is recreated with bad values every time the application window shows up.

Before deletion, the file had some weird "X" value (-3280), thich is probably related to both of my screens resolutions (1920*2).

Thank you for your support, your software is great!

@PotatoAdmin was deleting the %USERPROFILE%\AppData\Roaming\Mattermost\bounds-info.json file a permanent solution for you? Or has the issue reappeared?

I heard about another report where deleting the file resolved the issue temporarily but it surfaced again

@jasonblais From my experience with the windows client, only deleting the file is not a permanent work-around. One has to restart the application completely (not just the window) by right-clicking on the tray icon and selecting "exit". Only then will the window start behaving normally. Before knowing which file to remove, we just restarted the computer and it did fix the issue.

Thanks @PotatoAdmin, appreciate the prompt reply.

They did quit the app before deleting the .json file, but the issue reappeared for them.

Glad to hear it's still working for you, we'll have to investigate this more on our end

To be fair though, we had a wave of windows updates installation during the time we fixed the issue. Maybe there was an update that contributed to fixing the issue?

Hm, good point @PotatoAdmin, I'll check if they've completed their windows updates. Thanks! 馃憤

Looks like all their windows updates are complete.

He's on Windows 7 though, so it might be an issue specific to that OS version. I've reached out to a community member who might be able to try reproduce the issue

Again: What I did some time ago will not update windows position when a display is being removed as I thought all OS handle this event correctly by placing windows inside the new view bounds.
I might be wrong (for some versions of Windows at least) ;) I will work on a way to check window position after resolution changes.

I will simply add the check to display-metrics-changed. That should cover everything

I have experienced this issue once again today. Here is the chain of events that lead to the window being spawned off-screen:
-I left work yesterday evening with my mattermost window on my left screen, which is considered my secondary screen. My computer was locked using the usual way, "Windows + L".
-Today at approx. 7AM I was prompted by a service call to do some manipulations on our infrastructure so I opened a Remote Desktop session to my workstation.
-My Mattermost window was not visible but it was showing up on the taskbar.
-Clicking on the taskbar icon only produced the usual animation but showed that the window was off-screen.

Right-clicking the taskbar item and selecting "Close the window" did not solve the issue. Completely closing the software and re-opening it did work (right-click the tray icon and selecting "exit"). The window spawned in the middle of the active screen, square-shaped in what I assume is the default shape and position.

I do not know if this information helps the cause any firther but I felt you guys would like to have a detailed walk-through of what happened to make the issue happen again.

Thanks @PotatoAdmin! Really appreciate it

We have a pull request that attempts to fix the issue for Windows and Mac: https://github.com/mattermost/desktop/pull/509

Wondering if you'd be interested downloading the test build to see if the issue reproduces for you anymore? https://circleci.com/gh/mattermost/desktop/940#artifacts

//cc @jnugh @yuya-oc

I have followed @PotatoAdmin walk-through on Windows 10. I could not restore the window on the RD console. It seems the problem happens when the window is minimized into the taskbar icon when starting RD session.

@PotatoAdmin Would you confirm whether this hypothesis is correct?

I tested other applications.

| App | Built with Electron | Result |
|---|---|---|
| mspaint | NO | OK |
| cmd | NO | OK |
| iTunes | NO | OK |
| Chrome | NO | OK |
| Slack | YES | NG |
| Atom | YES | NG |
| Electron | YES(itself) | NG |

As far as looking the results, it looks an upstream bug of Electron.

@yuya-oc I could not reliably reproduce the issue, though it seems to also be happening with other applications. I had a putty session spawn off-screen today and could not bring it back to the main screen颅. Though this window was for sure minimized, more testing will be needed to make it a factor since I never really minimize my mattermost window.

It is probably a windows bug when disconnecting from the remote session since the remote desktop "squishes" all the available windows on one screen and then moves them back to their original position after ending the session. An application-side work-around is probably needed to fix it.

@jasonblais I will install the test version and see if the issue reappears. My next on-call shift starts next monday so I will have more testing mileage by April 27th.

Merged #509 would reset the window position if it spawns off-screen when restoring. I think this would make sense as a workaround for the problem. I'm wondering if you can test when v3.7-rc is released.

@PotatoAdmin Release candidates for 3.7 are available here, if you're interested to help test it: https://github.com/mattermost/desktop/issues/516#issuecomment-298262924

Really appreciate all your help troubleshooting the issue.

Yep, sorry for the delay. I would like to confirm this issue as closed. I have been using the new testing build for a week and a half now and the issue has not reappeared.

Awesome! That's great to hear.

Let us know if the issue resurfaces.

Again, many thanks for your help troubleshooting the issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

attzonko picture attzonko  路  5Comments

nerfologist picture nerfologist  路  7Comments

aborderon picture aborderon  路  5Comments

DanShockley picture DanShockley  路  6Comments

fmp777 picture fmp777  路  6Comments