cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [cordova-electron] aidanas edited a comment on issue #134: navigator.geolocation.getCurrentPosition always respond PositionErrorĀ {code: 2, message: ""} in cordova electron builds.
Date Mon, 01 Jun 2020 13:33:46 GMT

aidanas edited a comment on issue #134:

   I get the same issue for builds on MacOS. 
   Interestingly, I was getting same issue on basic plain electron app (no cordova) and the
solution was to add your `GOOGLE_API_KEY` to `process.env` within `main.js` file.  (as per
SO post and [this](
Electron doc)
   `process.env.GOOGLE_API_KEY = 'your key here';`
   However adding the same line to `cdv-electron-main.js` for cordova electron project did
not solve the issue. 
   Is there something special Cordova does to `cdv-electron-main.js` file which would make
settings `process.env` variables not available? 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message