Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token.json missing error on VPS #31

Closed
leonard4546 opened this issue Dec 21, 2022 · 9 comments
Closed

Token.json missing error on VPS #31

leonard4546 opened this issue Dec 21, 2022 · 9 comments
Labels
bug Something isn't working solved Issue fixed

Comments

@leonard4546
Copy link

leonard4546 commented Dec 21, 2022

app_1 | 2022-12-21 16:29:27,200 - bot - ERROR - The token.json file is missing
app_1 | 2022-12-21 16:29:27,205 - google.auth._default - WARNING - Authentication failed using Compute Engine authentication due to unavailable metadata server.
app_1 | 2022-12-21 16:29:27,206 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
app_1 | Traceback (most recent call last):
app_1 | File "/usr/local/lib/python3.8/dist-packages/telegram/ext/utils/promise.py", line 96, in run
app_1 | self._result = self.pooled_function(*self.args, **self.kwargs)
app_1 | File "/usr/src/app/bot/modules/list.py", line 20, in list_drive
app_1 | gd = GoogleDriveHelper()
app_1 | File "/usr/src/app/bot/helper/drive_utils/gdriveTools.py", line 68, in init
app_1 | self.__service = self.__authorize()
app_1 | File "/usr/src/app/bot/helper/drive_utils/gdriveTools.py", line 104, in __authorize
app_1 | return build('drive', 'v3', credentials=creds, cache_discovery=False)
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
app_1 | return wrapped(*args, **kwargs)
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/discovery.py", line 298, in build
app_1 | service = build_from_document(
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
app_1 | return wrapped(*args, **kwargs)
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/discovery.py", line 580, in build_from_document
app_1 | credentials = _auth.default_credentials(
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/_auth.py", line 57, in default_credentials
app_1 | credentials, _ = google.auth.default(
app_1 | File "/usr/local/lib/python3.8/dist-packages/google/auth/_default.py", line 653, in default
app_1 | raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
app_1 | google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://cloud.google.com/docs/authentication/getting-started

I'm getting this error, I'm hosting it on VPS. Bot is starting but throwing this error if I try to find something.

token.json file is present in directory as well as in config.

@l3v11 l3v11 added the bug Something isn't working label Dec 21, 2022
@l3v11
Copy link
Owner

l3v11 commented Dec 21, 2022

Are you using the latest commit?
And how did you generate the token.json file?

@leonard4546
Copy link
Author

Are you using the latest commit? And how did you generate the token.json file?

I'm using same from my mirror bot, and converted it to json using your script.

@l3v11
Copy link
Owner

l3v11 commented Dec 21, 2022

Probably your token has been expired. Regenerate it again.

@leonard4546
Copy link
Author

Probably your token has expired. Regenerate it again.

I regenerated it, still same error. I tried generating using your scrip. but not able to understand Ui on linux terminal.

@l3v11
Copy link
Owner

l3v11 commented Dec 21, 2022

Run the script on your computer, not on VPS

@leonard4546
Copy link
Author

Run the script on your computer, not on VPS

Okk, Generated on computer, and yet same error

@l3v11
Copy link
Owner

l3v11 commented Dec 21, 2022

What don't you understand? I don't get it.

@l3v11
Copy link
Owner

l3v11 commented Dec 21, 2022

Send me your token.json file at @l3v11 and I will take a look.

@l3v11
Copy link
Owner

l3v11 commented Dec 22, 2022

Closing this issue as further help is not required it seems.

@l3v11 l3v11 closed this as completed Dec 22, 2022
@l3v11 l3v11 added the solved Issue fixed label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solved Issue fixed
Projects
None yet
Development

No branches or pull requests

2 participants