Giter Club home page Giter Club logo

dialogflow-name-psychic-nodejs's Issues

Should we save only the name to the DB?

We currently save the name and the location, but that means the location will always be the first one read, and it can create confusion as seen in #3.
We could re-write the sample to save only the name to the db, and get a fresh location every time it's requested.

@smishra2 @entertailion

Unable to deploy to gcloud

I have been trying to deploy this to gcloud but I keep getting the same errors. Please help!

sh: 1: functions: not found

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.0.0
npm ERR! npm v3.8.6
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: functions deploy namePsychic --trigger-http
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script 'functions deploy namePsychic --trigger-http'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the name-psychic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! functions deploy namePsychic --trigger-http
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs name-psychic
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls name-psychic
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log

Query pattern missing

@Fleker Why I'm getting this error while publishing app for Production.

Query pattern is missing for custom intent 'handle_permission

Update readme.md

Please, update the readme.md to reflect the idea of the project and main purpose

missing key prop on the config object.

Following the instructions, i was getting this:

actions-on-google/dialogflow-name-psychic-nodejs/functions
> eslint --fix "**/*.js"

✔  functions: Finished running predeploy script.
i  functions: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...

Error: Error occurred while parsing your function triggers.

TypeError: Cannot read property 'key' of undefined
    at Object.<anonymous> (/Users/baskint/src/actions-on-google/dialogflow-name-psychic-nodejs/functions/index.js:25:25)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at /usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js:18:11
    at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js:38:3)

Upon inspection, if we change the line 25 of functions/index.js file to this, we get our API key back.
key: config.map.key
After this change, I was able to deploy the firebase function.

  functions: Finished running predeploy script.
i  functions: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (42.29 KB) for uploading
✔  functions: functions folder uploaded successfully
i  functions: creating function namePsychic...
✔  functions[namePsychic]: Successful create operation.
Function URL (namePsychic): https://***

✔  Deploy complete!

Now test simulator is crapped out, but that is across all the Google Action projects. Oh well.

Default welcome Intent

Is it possible to comment out Default welcome Intent in index.js and let Dialogflow handle Welcome Intent. I'm getting an error when I comment out line 154-159 in index.js

Error: Dialogflow IntentHandler not found for intent:
...
...
...

Hi @salismt,

Hi Silvano,

I must say first I just started Firebase and Action on Google.

Apparenlty I experience the same issue. But I think I might miss a step while deploying.
Here the steps I took at deployment
In the command window

  1. npm install -g firebase-tools
  2. firebase login
  3. firebase init functions -> Javascript -> all defaults
  4. firebase functions:config:set maps.key=""
  5. firebase deploy --only functions

You mentioned above, " removing data from the associated Firebase DB", however in the firebase console, firebase DB is not in use.....What am I missing?

Thanks

Originally posted by @silvolu in #3 (comment)

i am getting these errors after clicking deploy , i have copied code from index.js and pack.js

The deployment of your Cloud Function failed:
Function load error: Code in file index.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module './util'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/user_code/index.js:25:16)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)

multi-user compatible?

Is the intention that this will work for multiple different users on the same device? When my wife and I each just ask GH what our name are, it gets it right. However, when she uses name psychic it gets it wrong. Does the code need to change to support multi-users?

Thanks!

Default location?

I only receive Mountain View as my location? I get the location request as expected and the cloud function writes to the Firebase database but always Mountain View. Tested on Android and iOS version of the Google Assistant.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.