codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
229 stars 64 forks source link

botium-cli: Unable to import dialogflow #92

Closed amyli071 closed 6 years ago

amyli071 commented 6 years ago

When running botium-cli import dialogflow-conversations I get the following error:

botium-cli import dialogflow-conversations
FAILED: TypeError: Cannot read property 'charCodeAt' of undefined
(node:51979) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
(node:51979) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'charCodeAt' of undefined
    at peg$parsetemplate (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/google-gax/lib/path_template_parser.js:309:17)
    at Object.peg$parse [as parse] (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/google-gax/lib/path_template_parser.js:640:18)
    at new PathTemplate (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/google-gax/lib/path_template.js:52:47)
    at /Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/google-gax/lib/path_template.js:139:17
    at Array.forEach (<anonymous>)
    at PathTemplate.render (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/google-gax/lib/path_template.js:129:17)
    at AgentsClient.projectPath (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/dialogflow/src/v2beta1/agents_client.js:918:52)
    at async.series (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/src/import/dialogflowintents.js:213:66)
    at /Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/async/dist/async.js:3880:24
    at replenish (/Users/amyxxli/.npm-global/lib/node_modules/botium-cli/node_modules/async/dist/async.js:1011:17)
(node:51979) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:51979) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

System: macOS High Sierra v10.13.6 Node: v8.11.2

kacha00 commented 6 years ago

I have the same problem. Any solution?

FAILED: TypeError: Cannot read property 'charCodeAt' of undefined (node:21832) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'charCodeAt' of undefined (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. (node:21832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.

codeforequity-at commented 6 years ago

I provided a fix in the latest botium-cli build!