danthareja / node-google-apps-script

[DEPRECATED - use clasp instead] The easiest way to develop Google Apps Script projects
MIT License
353 stars 70 forks source link

upload command error: null #34

Closed jamespetersen closed 8 years ago

jamespetersen commented 8 years ago

Trying to push local changes up to the stand-alone drive file, but encountering this error:

Pushing back up to Google Drive... An error occured while running upload command: null Upload failed.

This happens on both my mac and PC. I have deleted the auth .json file and re-authorized. It will init the project without any issue, but can't seem to push back up to drive.

Any help would be greatly appreciated!

oshliaer commented 8 years ago

@jamespetersen How to the other projects (stand-alone drive file)?

hess-g commented 8 years ago

A couple things to troubleshoot. The following are scenarios where the Drive API throws a 500 error:

jamespetersen commented 8 years ago

I'm confident that I'm not encountering those errors. This error occurs when I initialize the project successfully (create a local copy of the project), then immediately try to push. There are no empty files, no syntax errors that I've added (since I'm not actually modifying the files in any way after init), and there are no syntax errors apparent, as I can save the project in Drive.

Where else should I begin looking?

oshliaer commented 8 years ago

@jamespetersen , could you share an example? a project?

jamespetersen commented 8 years ago

I've created a new project to demonstrate. It's called dummyProject, and contains the following code inside code.gs:

function myFunction() {
  // This project is solely for James to troubleshoot issues with node-gapps
  return Session.getEffectiveUser().getEmail();
}

I've run the function, and authorized the script. gapps init works fine, but gapps upload gives me the same error. Again, I haven't made any local changes to the file. Within the same terminal instance, I'm trying to execute the command. I've tried it both with and without the project key:

gapps upload gapps upload Meo52ftjAOMvr_wMuEiyKJswyeDNcnCYg

I continue to encounter the following error Pushing back up to Google Drive... An error occured while running upload command: null Upload failed.

0cjs commented 8 years ago

We really should be logging the details of errors in a log file, the way npm does.

jamespetersen commented 8 years ago

Is there a way to get more detailed error info, such as through npm?

oshliaer commented 8 years ago

Meo52ftjAOMvr_wMuEiyKJswyeDNcnCYg is project ID. You have to use file ID for node-google-apps-script https://github.com/danthareja/node-google-apps-script#31-an-existing-apps-script-project

jamespetersen commented 8 years ago

That fixed it! Thanks @oshliaer