Skip to content

[regression] Recent list on mac doc doesn't includes folders anymore #57272

Closed

Description

Since a few days the recent list in the doc context menu shows almost no entries and seems to show files only. It used to show folder (that I have opened in the past) and files

screen shot 2018-08-27 at 16 30 04

Activity

  1. bpasero commented on Aug 27, 2018

    @bpasero
    Contributor

    Johannes Rieken (@jrieken) the list is driven by the list of recently opened files/folders/workspaces and this list can get cleared, e.g. if you run File > Recently Opened > Clear Recently Opened. Can you check the menu entries to see if they match?

    image

    Then, whats the contents of this for you:

    • open /Users/<name>/Library/Application Support/Code - Insiders/storage.json
    • find the contents under the openedPathsList key
  2. added
    info-needed
    on Aug 27, 2018
  3. jrieken commented on Aug 27, 2018

    @jrieken
    ContributorAuthor

    screen shot 2018-08-27 at 17 26 48

    yep, files, folders and workspaces in there

  4. jrieken commented on Aug 27, 2018

    @jrieken
    ContributorAuthor

    excerpt from storage.json (there are a few more but no errors or such)

    "openedPathsList": {
            "workspaces2": [
                "file:///Users/jrieken/Code/_samples/virtual",
                "file:///Users/jrieken/Code/vscode",
                "file:///Users/jrieken/Code/vscode-nls-dev",
                "file:///Users/jrieken/Code/gulp-tsb",
                "file:///Users/jrieken/Code/vscode-docs",
                "file:///Users/jrieken/Code/collab/vscode-loader",
                "file:///Users/jrieken/Code/vscode-distro",
                {
                    "id": "2fe8841ab3a022a03af35d4afa32766d",
                    "configPath": "/Users/jrieken/Code/collab/CollabRemoteHub.code-workspace"
                },
                "file:///Users/jrieken/.vscode-insiders/extensions/ms-vscode.powershell-1.8.3/logs/1534861262-8424461e-55d4-452d-aec7-06d0b5e523bb1534861259950",
                "file:///Users/jrieken/Code/vscode/build/perf",
                "file:///Users/jrieken/Code/vscode-perf-canary",
                "file:///Users/jrieken/Code/vscode-nls-dev-loader",
                "file:///Users/jrieken/Code/_samples/ConsoleAppDnx",
                "file:///Users/jrieken/Code/vscode-nls",
                "file:///Users/jrieken/Code/vscode-tools/extensions",
                "file:///Users/jrieken/Code/collab/VSCodeBeautify",
                "file:///Users/jrieken/Code/collab/node",
                "file:///Users/jrieken/Code/vscode-uri",
                "file:///Users/jrieken/Code/_samples/dummy-extension",
                "file:///Users/jrieken/Code/collab/electron-startup-perf-baseline",
                "remotehub://github.com/Microsoft/vscode/",
                "remotehub://github.com/OmniSharp/omnisharp-roslyn",
                "remotehub://github.com/OmniSharp/omnisharp-roslyn/",
                "remotehub://github.com/OmniSharp/omnisharp-roslyn/src/",
                "remotehub://github.com/OmniSharp/omnisharp-roslyn/test",
    
  5. removed
    info-needed
    on Aug 27, 2018
  6. bpasero commented on Aug 27, 2018

    @bpasero
    Contributor

    This could be electron/electron#11159 but I will try to reproduce with those data.

  7. added
    upstream
    electron
    and removed
    workbench-electron
    on Aug 28, 2018
  8. bpasero commented on Aug 28, 2018

    @bpasero
    Contributor

    I cannot reproduce this when running out of sources with the provided contents, so this seems to be the same as the reported one.

  9. changed the title [-][regression] Recent list on mac doc doesn't includes folders anymore[/-] [+]Recent list on mac doc doesn't includes folders anymore[/+] on Aug 28, 2018
  10. jrieken commented on Aug 28, 2018

    @jrieken
    ContributorAuthor

    Just saying that this used to work just fine for me and has only stopped to work recently

  11. jrieken commented on Aug 28, 2018

    @jrieken
    ContributorAuthor

    Benjamin Pasero (@bpasero) So what is the recommendation to get out of this and how could the change from working to broken be caused?

  12. 17 remaining items

  13. clshortfuse commented on Mar 7, 2019

    @clshortfuse

    Benjamin Pasero (@bpasero) When I first had the issue I had 1.30.1 stable (with its blue icon) working fine, but 1.31 Insider (green) not adding entries. It would cancel out the possibility of it being an OS issue if, at the same time, on version didn't have an issue while the other did. When I upgraded the stable build past 1.31, then both stopped working.

    this.labelService.onDidRegisterFormatter(() => this._onRecentlyOpenedChange.fire()); was removed.

    But _onRecentlyOpenedChange should still be fired eventually by onWorkspaceSaved.

    My stable is actually showing some issues right now and I haven't cleared the Recent list.

    There are entries in File=>Open Recent lists 5 workspaces and 7 files, while the Dock only lists 2 folders and no files. The 3 that aren't in listed in the dock are because they no longer exists.

    When I opened a new workspace (folder), Recents shows 6, and Dock shows 3. But still, none of the files are being listed in Dock. I haven't cleared anything yet, so we may be able to diagnose something. My guess is Electron/VS thinks the dock is full (reached max entries), but isn't accounting for Mac OS X is filtering out nonexistent folders/files.

    Edit: I figured it out. I used to have a nonexistent file at the top of the File => Recents list. When I clicked it, VSCode told me the file doesn't exist and removed it from the Recent list. After that, it seems it was removed from the Recents list. Now the Dock is showing all the files (as in Recents) that were under that nonexistent file.

    What's happening is either Electron, or Mac OS X, when it encounters a recent entry for a file/folder that doesn't exist doesn't process anything that happens after. This is on 1.31.1 Stable.

    Edit2: Messing around, opening a file in VSCode, closing it, then deleting the folder it was in in Finder, then trying to quit VSCode, I managed to crash it:

    Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes:       EXC_I386_GPFLT
    

    Edit3: Okay, I broke my recently cleared Insider build, the topmost workspace doesn't show up in Recents doesn't show up in the Dock, after all the creating and deleting shenanigans. And that folder exists because that's what I had opened when I was creating and deleting files. I'm trying to get a set of reproducible actions, but it's definitely related to nonexistent files.

  14. clshortfuse commented on Mar 7, 2019

    @clshortfuse

    Mac OS X won't add URLs that don't exist to Dock if using noteNewRecentDocumentURL which I can confirm is what Electron does: https://github.com/electron/electron/blob/6da939629b490e0a76d7a451bb9fb5ab4a0a1729/atom/browser/browser_mac.mm#L49

    VSCode thinks it has reached MAX_ENTRIES simply because it assumes calling app.addRecentDocument will guarantee an entry and that's not the case. If you want to add an item that doesn't exist, you have make it a menu item instead, as answered in this Stackoverflow question.

    I still found some peculiarities, but I think checking for the file to exist before adding to the Dock would be the first step.

  15. bpasero commented on Mar 7, 2019

    @bpasero
    Contributor

    Carlos Lopez (@clshortfuse) good point, yeah this could be an explanation for some of the issues we are seeing, not sure if all. Definitely worth to see if we can check the file for existence before adding it.

    Johannes Rieken (@jrieken) for you, clearing the list of recently opened did not help right?

  16. jrieken commented on Mar 7, 2019

    @jrieken
    ContributorAuthor

    Johannes Rieken (@jrieken) for you, clearing the list of recently opened did not help right?

    That's a long time ago... Not sure anymore, I do remember tho that it once recovered after a restart. Currently I am in a state where it shows something which is a mixture of stale and recent files/folders

  17. bpasero commented on Mar 7, 2019

    @bpasero
    Contributor

    Johannes Rieken (@jrieken) stale meaning they are not in the list of recently opened (e.g. from the File menu)?

  18. jrieken commented on Mar 7, 2019

    @jrieken
    ContributorAuthor

    No, file menu is correct but the dock menu is doing something else

  19. bpasero commented on Mar 8, 2019

    @bpasero
    Contributor

    Ok I think this is the issue we still have no real understanding about. I can at least look into not adding dock entries that do not exist on disk.

  20. added
    bug
    on Mar 11, 2019
  21. removed
    help wanted
    on Mar 11, 2019
  22. bpasero commented on Mar 11, 2019

    @bpasero
    Contributor

    Pushed a fix to not add paths to the dock that do not exist on disk, this seems to work much better.

  23. added
    verified
    on Mar 27, 2019
  24. PeterRock commented on Apr 19, 2019

    @PeterRock

    It can not work again
    #69754

  25. locked and limited conversation to collaborators on Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugelectronmacosupstreamverifiedworkbench-history

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions