docs icon indicating copy to clipboard operation
docs copied to clipboard

Update troubleshooting.rst

Open anx-ag opened this issue 1 year ago • 3 comments

OSX Monterey Logpaths are different

Summary

Ticket Link

anx-ag avatar Aug 05 '22 14:08 anx-ag

Hello @anx-ag,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement? Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

mattermod avatar Aug 05 '22 14:08 mattermod

/check-cla

justinegeffen avatar Aug 05 '22 15:08 justinegeffen

Hey, you're right, I just tried it out on my Monterey VM and if I use the .dmg, the application uses the logs as outlined in the documentation, so the comment I proposed is wrong, since the log location is not dependent on the OSX version, but on the installation method. I think we should change it to f.ex.

  • MacOS: ~/Library/Logs/Mattermost (DMG install) OR ~Library/Containters/Mattermost.Desktop/Data/Library/Logs/Mattermost (Appstore Install)

Not sure if I should open a new request here for that, but I think my PR should be modified again.

anx-ag avatar Aug 06 '22 16:08 anx-ag

Hey, you're right, I just tried it out on my Monterey VM and if I use the .dmg, the application uses the logs as outlined in the documentation, so the comment I proposed is wrong, since the log location is not dependent on the OSX version, but on the installation method. I think we should change it to f.ex.

* **MacOS:** `~/Library/Logs/Mattermost` (DMG install) OR `~Library/Containters/Mattermost.Desktop/Data/Library/Logs/Mattermost` (Appstore Install)

Not sure if I should open a new request here for that, but I think my PR should be modified again.

You can definitely update this PR. Just wanted to confirm that the directory is called "Containters" and not "Containers". :)

justinegeffen avatar Aug 08 '22 08:08 justinegeffen

Sorry again - typo, bad english and wrong information. A perfect first PR (updated now, btw).

anx-ag avatar Aug 08 '22 12:08 anx-ag

Great minds think alike, @anx-ag! :) I recently staged a similar change for our upcoming v7.2 release: https://github.com/mattermost/docs/pull/5802/files

In my PR, I'm calling out a distinction based on the macOS version the user has. In your PR, you're calling out a distinction based on how the client was deployed. I feel that users will benefit from a combination of both your PR and my PR. What do you think?

cwarnermm avatar Aug 08 '22 15:08 cwarnermm

This was also my first assumption, but what @coltoneshaw said is correct: It does not depend on the OSX version, but only on the deployment model. I spun up a Monterey virtual machine and used the DMG installer from Github and was immediately put back to the original Logfile location. As soon as you install the app out of the appstore, the log file location changes to the Containers subdirectory.

anx-ag avatar Aug 08 '22 15:08 anx-ag

Changes look good to me!

coltoneshaw avatar Aug 08 '22 16:08 coltoneshaw

Thank you @anx-ag and @coltoneshaw! @nab-77 - We've got a case where log paths change depending on the distribution method. Is this by design and intended?

cwarnermm avatar Aug 09 '22 12:08 cwarnermm

It's by design and how electron and Apple handle log paths. The desktop team recently submitted our desktop app to the macOS store for v5.1 and above. When you install the app from the store then Apple by default containerizes the application, which also means a new log path is used.

Electron logs in the log path available to the application, which will be different based on the installation method.

So, based on how the user and their organization choose to distribute the Mattermost app Will dictate where the logs are stored. Unfortunately, when it comes to Apple this is just how it works and cannot be easily worked around.

coltoneshaw avatar Aug 09 '22 12:08 coltoneshaw

Thanks, @coltoneshaw! This is great context!

cwarnermm avatar Aug 09 '22 13:08 cwarnermm

Ah, I didn't check it in real-life obviously - the text is so long now that the line gets wrapped :-/ Should we revert to (DMG install) and (Appstore Install) to save some characters (in the hope, that it will not wrap the text then)?

anx-ag avatar Aug 09 '22 14:08 anx-ag