Skip to content

Editor integration can cache incorrect path if update occurs while enumerating #6324

Closed as not planned

Description

@adamreisnz

Description

It appears Github Desktop doesn't like Atom Nightly much.
After I updated Atom to the latest version, Github Desktop complains it can't open the external editor:

I don't know why it's looking in my Caches for the app:

image

When I open preferences it's marked correctly:

image

Any tips on how to fix this issue or prevent it from happening again after an updated?

Version

  • GitHub Desktop: 1.5.0
  • Operating system: OS X

Logs

Logs didn't contain any related errors or info.

Activity

  1. adamreisnz commented on Dec 1, 2018

    @adamreisnz
    Author

    In the end I had to re-install the shell commands for Atom and restart Github Desktop a few times to get this to work again.

  2. billygriffin commented on Dec 3, 2018

    @billygriffin
    Contributor

    Huh, that is strange @adamreisnz. @desktop/engineering or @desktop/support any ideas why this would happen?

    @adamreisnz Would you mind letting us know if the next time you update Atom you experience the same issue?

  3. added
    more-info-needed
    on Dec 3, 2018
  4. adamreisnz commented on Dec 3, 2018

    @adamreisnz
    Author
  5. billygriffin commented on Dec 3, 2018

    @billygriffin
    Contributor

    Not at the moment, just that would be helpful for now. Thank you!

  6. say25 commented on Dec 4, 2018

    @say25
    Member

    I wonder if we need to support Atom Nightly like we do VS Code Insiders?

    https://github.com/desktop/desktop/blob/development/app/src/lib/editors/linux.ts#L7. I can take a look tonight and see if that might resolve it.

  7. billygriffin commented on Dec 4, 2018

    @billygriffin
    Contributor

    That'd be great if you wouldn't mind looking into it @say25. Thanks!

  8. say25 commented on Dec 5, 2018

    @say25
    Member

    It would appear to me that our current integration can not distinguish between Atom, Atom Beta and Atom Nightly particularly on macOS where they all have a bundle identifier of com.github.atom.

  9. adamreisnz commented on Dec 15, 2018

    @adamreisnz
    Author

    @billygriffin It's happened again, on my laptop this time.

  10. shiftkey commented on Dec 17, 2018

    @shiftkey
    Member

    The best theory I have about this is that our detection of Atom doesn't work well when we query for it while it's being updated. The error message there contains the path com.github.atom.ShipIt which suggests when the app queried for the install location the files were in a temporary location, so perhaps we should ignore this path and not cache it.

    I think there's some other potential headaches here because once we do this initial check we cache the values, so we'd consider Atom "missing" rather than try and look for it again. #6114 has some extra context about how to handle changes to editors without restarting Desktop.

  11. added
    investigation-needed
    and removed
    more-info-needed
    on Dec 17, 2018
  12. adamreisnz commented on Dec 17, 2018

    @adamreisnz
    Author

    I think that theory makes sense. Sometimes what happens as well, is that Github desktop opens a "different" version of Atom than what I already have open and running. Presumably this also happens after an update. So that leaves me with two distinct instances of Atom running.

    Let me know if there's anything else I can do to help investigate.

  13. added
    integrations
    on May 24, 2019
  14. added and removed
    investigation-needed
    on Jul 30, 2019
  15. shiftkey commented on Jul 30, 2019

    @shiftkey
    Member

    It would appear to me that our current integration can not distinguish between Atom, Atom Beta and Atom Nightly particularly on macOS where they all have a bundle identifier of com.github.atom.

    There's been some packaging changes to the Atom beta and nightly channels recently, and I was hoping this was no longer the case, but it still appears they are the same bundle id:

    $ mdfind kMDItemCFBundleIdentifier = "com.github.atom"
    /Applications/Atom Beta.app
    /Applications/Atom Nightly.app
    /Applications/Atom.app
    

    This is also an additional pain, because the current app behaviour is probably not what you expect when you have all three installed:

    Ideally I'd love for each channel to be an option here that we can detect, but that requires asking the Atom team to break their beta and nightly channels to change the bundle identifiers.

    Putting that aside, I think there's two potential solutions here:

    • address the caching of editors - Allow user to manually check for installed Editors  #6114 - this means we'd be able to detect the paths changing as part of an update
    • don't cache paths that we know don't make sense, for that situation where an update is happening. This feels a bit editor specific, but maybe there are other situations where we'd also need to do this

    I'm going to update the issue to indicate this is related to updates and caching paths, rather than the specific editor channel.

  16. changed the title [-]Github Desktop doesn't like Atom Nightly[/-] [+]Editor integration can cache incorrect path if update occurs while enumerating[/+] on Jul 30, 2019
  17. dboyce-gh commented on Oct 9, 2020

    @dboyce-gh

    It may help to add another data point to this issue. I have experienced the equivalent error for the VS Code editor, because I moved Visual Studio Code.app from Downloads (where GitHub Desktop is looking for it) to Applications (where launcher finds it, but not GHD).

  18. sarankani commented on Oct 29, 2021

    @sarankani

    I got this error
    image

  19. added
    not-planned
    on Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementintegrationsnot-planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions