alexdlaird / pyngrok

A Python wrapper for ngrok
https://pyngrok.readthedocs.io
MIT License
421 stars 59 forks source link

fix: Fetch default config path based on system #98

Closed ChillarAnand closed 2 years ago

ChillarAnand commented 2 years ago

Description Currently, pyngrok is looking at incorrect directory for config file in MacOS. It should fetch default config path based on the system.

Type of Change

alexdlaird commented 2 years ago

This is not universally true, so this PR would break things. Can you provide the Mac and ngrok version you're using, as something is different if the default config path has changed for some version.

ChillarAnand commented 2 years ago

MacOS - 12.3.1

Screenshot 2022-05-12 at 18 56 05

Even the official docs show the same path?

https://ngrok.com/docs/ngrok-agent/config

alexdlaird commented 2 years ago

So this is a breaking change in ngrok 3.x, which was just released. pyngrok is not yet compatible with 3.x, so this change along with several others would need to be part of a larger effort for 3.x compatibility.

This issue should only surface if you're manually managing the ngrok binary instead of letting pyngrok handle it for you. So either use pyngrok's own binary, or download ngrok's 2.x binary manually when changing the bin path (as pyngrok does, you can find the download paths it uses here).