transistorsoft / background-geolocation-console

A field-testing & analysis server for the Background Geolocation plugin
MIT License
148 stars 156 forks source link

JavaScript Error: You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at .... #72

Open upendrasiripurapu opened 4 years ago

upendrasiripurapu commented 4 years ago

I have already enabled billing to my google cloud project but still I'm getting this error. How can I resolve this?

You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started

I have installed the web app on Heroku and added the environmental variables as specified in the documentation.

rolfb commented 4 years ago

Having the same issue. Is there an example of how the referrer should be added? Or more details on how create the API key properly? It is the Maps Javascript API in Google Cloud Console which is correct? Or do you need more APIs?

Sigura commented 4 years ago

Hello,

Yeah, it's it.

Sorry, but Google can change it at any time for any reason, that is why we don't do it.

background-geolocation-console can be used with three databases: firestore, postgres, sqllite; and various modifications: shared dashboard, etc.

Please use README.md to identify your modification.

rolfb commented 4 years ago

@Sigura Thanks, it was not database related, just Google Maps-related - but I got it fixed, see below.

@upendrasiripurapu It seems like the key is only read from heroku environment when you build the app, so if you changed the GOOGLE_MAPS_API_KEY on Heroku you need to push to Heroku in order for it to rebuild and use the new API key.

rolfb commented 4 years ago

@Sigura on that note, the server should read the value of GOOGLE_MAPS_API_KEY each time it is started, not just on build?

Sigura commented 4 years ago

@rolfb GOOGLE_MAPS_API_KEY add to compiled by webpack on build

jsvinueza commented 4 years ago

hello, please help me

I try to install console on my server, I did the follow steps , but I can not to get success

  1. npm run server
  2. The browser show me: Cannot GET /
Sigura commented 4 years ago

@jsvinueza please try those steps:

  1. npm i
  2. export DATABASE_URL=postgres://postgres:...@localhost:5432/geolocation && export GOOGLE_MAPS_API_KEY=AIz...Nkg && export SHARED_DASHBOARD= && export ADMIN_TOKEN= && export PASSWORD= && export FIREBASE_URL= && export FIREBASE_PRIVATE_KEY= && export FIREBASE_PROJECT_ID= && export FIREBASE_CLIENT_EMAIL= && NODE_ENV=production
  3. npm run build
  4. npm run server
  5. open: http://localhost:9000

NB!: NODE_ENV=production for not a dev server, and JWT_PRIVATE_KEY with JWT_PUBLIC_KEY.

additional option: please try docker-compose up.