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

Could not create google default credentials - No such file or directory #33

Open
yarns123 opened this issue Nov 20, 2019 · 1 comment
Open

Comments

@yarns123
Copy link

Hi,

i copied json file to svc_key.json.

pbx*CLI> gdfe show config
[general]
service_key = {
  "type": "service_account",
  "project_id": "pierwszy-XXXX",
  "private_key_id": "DELETED",
  "private_key": "-----BEGIN PRIVATE
KEY-----\nDELETED\n-----END
PRIVATE KEY-----\n",
  "client_email": "pierwszy-XXXX@appspot.gserviceaccount.com",
  "client_id": "10899825XXXXX",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/pierwszy-XXXX%40appspot.gserviceaccount.com"
}

endpoint =
vad_voice_threshold = 1024
vad_voice_minimum_duration = 100
vad_silence_minimum_duration = 100
vad_barge_minimum_duration = 300
vad_end_of_speech_silence_duration = 500
endpointer_cache_audio_pretrigger_ms = 100
default_incomplete_timeout = 0
default_no_speech_timeout = 0
default_maximum_speech_timeout = 90000
call_log_location = /var/log/dialogflow/${APPLICATION}/${STRFTIME(,,%Y/%m/%d/%H)}/
enable_call_logs = Yes
enable_preendpointer_recordings = No
enable_postendpointer_recordings = No
record_preendpointer_on_demand = No
enable_sentiment_analysis = default
stop_writes_on_final_transcription = Yes
start_recognition_on_start = No
recognition_start_failure_retries = 4
recognition_start_failure_retry_max_time_ms = 1000
start_failure_retry_codes = ,14,
synthesize_fulfillment_text = No
model =
use_internal_endpointer_for_end_of_speech = No
hints =

but still getting this error:

[Nov 20 07:33:39] WARNING[125302] src/core/lib/security/credentials/google_default/google_default_credentials.cc: Could not create google default credentials.
[Nov 20 07:33:39] WARNING[125302] src/core/lib/security/credentials/google_default/google_default_credentials.cc: grpc_google_default_credentials_create: {"created":"@1574253219.639110426","description":"Failed to create Google credentials","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":227,"referenced_errors":[{"created":"@1574253219.639116826","description":"creds_path unset","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":170},{"created":"@1574253219.639142126","description":"Failed to load file","file":"src/core/lib/iomgr/load_file.cc","file_line":71,"filename":"/root/.config/gcloud/application_default_credentials.json","referenced_errors":[{"created":"@1574253219.639139426","description":"OS Error","errno":2,"file":"src/core/lib/iomgr/load_file.cc","file_line":45,"os_error":"No such file or directory","syscall":"fopen"}]}]}
[Nov 20 07:33:39] WARNING[125302] src/core/ext/filters/client_channel/channel_connectivity.cc: grpc_channel_check_connectivity_state called on something that is not a client channel, but 'lame-client'
[Nov 20 07:33:39] DEBUG[125302] libdfegrpc.cc: Channel to dialogflow.googleapis.com created for 1574253219.3
[Nov 20 07:33:39] DEBUG[125302] libdfegrpc.cc: Session 1574253219.3 performing event recognition on projects/pierwszy-XXXX/agent/sessions/1574253219.3
[Nov 20 07:33:39] NOTICE[125302] libdfegrpc.cc: Session 1574253219.3 got error performing event detection on pierwszy-XXXX: lame client channel (2: )
[Nov 20 07:33:39] WARNING[125302] res_speech_gdfe.c: Error recognizing event on 0@1574253219.3

Why i need this file "/root/.config/gcloud/application_default_credentials.json" ?
Even if i created this file it still dont work:
[Nov 20 07:50:29] WARNING[126245] src/core/lib/security/credentials/google_default/google_default_credentials.cc: grpc_google_default_credentials_create: {"created":"@1574254229.948937302","description":"Failed to create Google credentials","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":227,"referenced_errors":[{"created":"@1574254229.948953302","description":"creds_path unset","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":170},{"created":"@1574254229.949101600","description":"Failed to parse JSON","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":182,"raw_bytes":"type\u0000service_account\u0000project_id\u0000pierwszy-XXXX\u0000private_key_id\uDELETED\u0000private_key\u0000-----BEGIN PRIVATE ivate_key": "-----BEGIN PRIVATE \nKEY-----\nDELETED\n-----END \nPRIVATE KEY-----\n",\n "client_email": "pierwszy-4d56a@appspot.gserviceaccount.com",\n "client_id": "DELETED",\n "auth_uri": "https://accounts.google.com/o/oauth2/auth",\n "token_uri": "https://oauth2.googleapis.com/token",\n "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",\n "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/pierwszy-XXXXX%40appspot.gserviceaccount.com"\n}\n"}]}

Will be gratefull for any tips....

@Happyman1974
Copy link

Happyman1974 commented Nov 28, 2020

I have the same issue.

[Nov 28 16:06:40] WARNING[21747]: src/core/lib/security/credentials/google_default/credentials_generic.cc:34 grpc: Could not get HOME environment variable.
[Nov 28 16:06:40] WARNING[21747]: src/core/lib/security/credentials/google_default/google_default_credentials.cc:285 grpc: Could not create google default credentials.
[Nov 28 16:06:40] WARNING[21747]: src/core/lib/security/credentials/google_default/google_default_credentials.cc:290 grpc: grpc_google_default_credentials_create: {"created":"@1606568800.705346539","description":"Failed to create Google credentials","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":227,"referenced_errors":[{"created":"@1606568800.705352328","description":"creds_path unset","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":170},{"created":"@1606568800.705364604","description":"creds_path unset","file":"src/core/lib/security/credentials/google_default/google_default_credentials.cc","file_line":170}]}
[Nov 28 16:06:40] WARNING[21747]: src/core/ext/filters/client_channel/channel_connectivity.cc:49 grpc: grpc_channel_check_connectivity_state called on something that is not a client channel, but 'lame-client'
[Nov 28 16:06:40] NOTICE[21747]: libdfegrpc.cc:564 int df_recognize_event(dialogflow_session*, const char*, const char*, int): Session 1606568800.0 got error performing event detection on 5555: lame client channel (2: )
[Nov 28 16:06:40] WARNING[21747]: res_speech_gdfe.c:1615 start_dialogflow_recognition: Error recognizing event on 0@1606568800.0

no idea how to resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants