quickstart.py fails when Firefox is default browser on Mac
Expected Behavior
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=xxx.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A63472%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&state=xxx&access_type=offline
Then browser opens URL and user authenticates to account then token.pickle gets created and the following gets displayed
Labels: CHAT SENT INBOX IMPORTANT TRASH DRAFT SPAM CATEGORY_FORUMS CATEGORY_UPDATES CATEGORY_PERSONAL CATEGORY_PROMOTIONS CATEGORY_SOCIAL STARRED UNREAD
Actual Behavior
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=xxx.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A63472%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&state=xxx&access_type=offline
Then browser opens URL and user authenticates to account
Traceback (most recent call last):
File "quickstart.py", line 53, in
token.pickle file is not created
Steps to Reproduce the Problem
- Set Firefox as default browser
- python3 quickstart.py
Specifications
- Python version (
python --version) Python 3.8.2 - OS (Mac 10.14.6)
- Firefox 76.0.1
Setting the default browser to Safari or Google Chrome achieved the expected behaviour