Giter Site home page Giter Site logo

reactioncommerce / meteor-google-spreadsheets Goto Github PK

View Code? Open in Web Editor NEW
53.0 26.0 16.0 270 KB

Google Spreadsheets for Meteor

Home Page: https://atmospherejs.com/ongoworks/google-spreadsheets

License: MIT License

JavaScript 100.00%
google-spreadsheet meteor meteor-google-spreadsheets

meteor-google-spreadsheets's Issues

Problem with .pem key

Since last week I am getting some errors:

Error: SignFinal error
W20160427-12:42:39.368(3)? (STDERR) 139835110377344:error:0906D06C:PEM routines:PEM_read_bio:no start line:../deps/openssl/openssl/crypto/pem/pem_lib.c:696:Expecting: ANY PRIVATE KEY

I think something went wrong mby with some last updates or etc, coz earlier everything was good.
And my code looks like this:

 serverRoot = fs.realpathSync(process.cwd())
 key = serverRoot + '/assets/app/google-key.pem'
 drive = googleapis.drive('v2')
 myMail = Meteor.settings.googleSpreadsheet.mail
 serviceMail = Meteor.settings.googleSpreadsheet.serviceMail
 authClient = new (googleapis.auth.JWT)(serviceMail, key, 'key',['https://www.googleapis.com/auth/drive'], myMail)
 authClient.authorize (err, tokens) ->
    if err
      log.info 'There is error with authorize: ' + err
    else
      console.log 'everything is good'

windows build

building for windows has errors.

"install"
npm ERR! node v0.10.36
npm ERR! npm  v2.7.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the iconv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls iconv
npm ERR! There is likely additional logging output above.

Using spreadsheetId instead of spreadsheetName

First of all thanks for putting together this package. It's pretty handy and I'm using it to manage keys for i18n purpose.

EditGoogleSpreadsheet.load({
      //debug: true,
      spreadsheetId: spreadsheetName,
...

I needed to change the package to use the spreadsheetId instead of the name. I'm using subfolders in google drive etc. so using simply the name didn't work. Now I'm wondering if it's not the better solution using the ID anyways?

Not sure if this package is still under development but just in case :)

Current package cannot be added on Windows

When attempting to add your package from Windows I get:

 => Errors while adding packages:

While checking for ongoworks:[email protected]:
error: No compatible binary build found for this package. Contact the package author and ask
them to publish it for your platform.

Version 0.1.0 is the most recent version I can add, but this version doesn't have the 0.4.0 updates to node-google.spreadsheets necessary to work with Googles newer API.

exit code 3 troubleshooting

I was having success importing a large (42k row) Google Spreadsheet, it stopped working today. I have made no changes to either my code, my sheet's sharing, or my Google service account and I am finding no clues anywhere.

I have a console.log just before and just after my call to "spreadsheet/fetch2" so I know what line of code is triggering the error, which worked perfection find the other day with the same hard coded variables:

 ssheet = Meteor.call("spreadsheet/fetch2", ssName, "1", {
    email: serviceEmail
  });

The console output is a bit odd. I see my "before" log entry. Then the error, which has the same format as a message coming directly from the meteor command: => Exited with code: 3. Then it seems to restart, because I'm getting my normal app start log messages again. (I don't get the problem the second time because I'm using migrations and since it crashed during a migration, the migration lock prevents a second try).

The debugging steps I've tried:

  1. rename the original sheet (and the name assigned to ssName) - no effect
  2. tried a different, smaller sheet that I've used before from the same Google Drive location - works
  3. tried giving it a bad sheet name to see what happens. - logs that it couldn't find my name.
  4. tried to no avail to figure out if these were any debugging logs or way of listing shared documents from the Google service account console.

I don't think it is an error in your code, because all the error checks I've seen seem to create a log entry, but Is it possible? If not, how do I even start to figure out where the exit is being generated from and why?

Not working on Modulus with Meteor 1.2.x

After update to 1.2, must remove this package for app to work.
Do you have a sense of when you might be able to resolve this? This is mission-critical for us.

Thank you for your help, and your helpful package.

Ideas

@aaronjudd

We should figure out what direction this should take. Since I needed to do read/write, my new stuff ended up using a different NPM package, which is also nice because it handles the oauth stuff for us. (See the new "option 2" section in the readme.) But it's currently using the "rows" api instead of "cells", which it seems has the downside of sending over the cell formulas as strings rather than as the calculated values of the formulas. I read somewhere that the cells api can handle formulas, but haven't tested.

Either way, we might want to convert your stuff to use the NPM pkg that mine is using?

We might also want to export an object with API methods instead of or in addition to the server methods. I had mentioned elsewhere that we could move the collection updating code into this package and potentially do it on the collection prototype. So the API could be something like this:

Steps = new Meteor.Collection("steps");
Steps.pullFromGSheet("Steps", {email: serviceEmailAddress});
Steps.pushToGSheet("Steps", {email: serviceEmailAddress});

And those would call methods similar to the examples in the readme, so they could be called on either client or server.

Can't use in Reaction

This does not have any checks implemented which means you get the following error when trying to use it in Reaction

I20150410-15:19:07.273(5.5)? Exception while invoking method 'spreadsheet/fetch' Error: Did not check() all arguments during call to 'spreadsheet/fetch'
I20150410-15:19:07.273(5.5)?     at [object Object]._.extend.throwUnlessAllArgumentsHaveBeenChecked (packages/check/match.js:357:1)
I20150410-15:19:07.273(5.5)?     at Object.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:112:1)
I20150410-15:19:07.273(5.5)?     at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150410-15:19:07.273(5.5)?     at packages/ddp/livedata_server.js:648:1
I20150410-15:19:07.273(5.5)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150410-15:19:07.273(5.5)?     at packages/ddp/livedata_server.js:647:1
I20150410-15:19:07.273(5.5)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150410-15:19:07.273(5.5)?     at [object Object]._.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150410-15:19:07.274(5.5)?     at packages/ddp/livedata_server.js:546:1

Do you want me to implement check package and send a PR?

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.