facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
405 stars 53 forks source link

Stop Working after Catelina and Sublime Text Update on Mac #92

Closed mchavezi closed 4 years ago

mchavezi commented 4 years ago

Was working before MacOs and Sublime text update.

Now when I do shift cmd p, and then select Markdown Preview: Preview in Browser and Github, Gitlab or Markdown; nothing happens. Before it would open a browser tab with the preview.

This could be something with my system because i cleaned up a bunch of space on my computer to make room for the Catelina update. Opening an issue in case its not.

Info:

sublime text 3.2.2, build 3211

macOS Catalina, version 10.15

tdegeus commented 4 years ago

Same here! I think it may have to do with a bunch of permission changes in Catalina.

tdegeus commented 4 years ago

My hunch might not be right, as manually specifying the browser in the user preferences resolves the issue:

{
  "browser": "/Applications/Safari.app",
}

(Also works with "/Applications/Google Chrome.app")

facelessuser commented 4 years ago

It may be the way we determine the default browser no longer works. I don't have a Catalina macOS currently, mine is way too old to install it 😞. If I can get a hold of one and do some testing, I can hopefully figure out what is going awry.

tdegeus commented 4 years ago

@facelessuser If you give me some hints I can also give it a try.

kxxdhdn commented 4 years ago

My hunch might not be right, as manually specifying the browser in the user preferences resolves the issue:

{
  "browser": "/Applications/Safari.app",
}

(Also works with "/Applications/Google Chrome.app")

Works for me. Thanks!

facelessuser commented 4 years ago

@tdegeus, basically, this is how the default browser is currently being detected. I did not write this portion of the code, usually I approach this differently, so what I am looking to know, is whether this portion of the code is finding anything. Are we failing? Or are we getting some kind of erroneous value? If we can determine that, I can offer some alternatives. Here is the area in the code:

https://github.com/facelessuser/MarkdownPreview/blob/master/markdown_preview.py#L1149

kennith commented 4 years ago

@facelessuser It looks like this line is failing

https://github.com/facelessuser/MarkdownPreview/blob/master/markdown_preview.py#L1157

Can't locate Mac/InternetConfig.pm in @INC (you may need to install the Mac::InternetConfig module)

facelessuser commented 4 years ago

Cool, I'll post a method I usually use and maybe someone can try it out.

facelessuser commented 4 years ago

You can try workaround here: https://github.com/facelessuser/MarkdownPreview/tree/bug/catelina

kennith commented 4 years ago

@facelessuser I confirm it is working. Thanks!

facelessuser commented 4 years ago

@kennith, thanks for taking the time. I'll clean up the code and get a release out tonight. I figure it is severe enough to warrant a patch ASAP for the Catalina folks :slightly_smiling_face: .

I actually thought about replacing this area of code before as this isn't the approach I normally take, but I figured it worked so :man_shrugging:. But now that it doesn't, we'll go ahead and replace it.