Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clasp push fails silently #255

Closed
paul-matthews opened this issue Jul 6, 2018 · 16 comments
Closed

Clasp push fails silently #255

paul-matthews opened this issue Jul 6, 2018 · 16 comments

Comments

@paul-matthews
Copy link

clasp push fails with no error log:

Expected Behavior

After clasp push, expect edits to be present in web interface.

Actual Behavior

Clasp push produces following output:
Push failed. Errors:
No errors are displayed.

Steps to Reproduce the Problem

  1. clasp clone <script ID>
  2. edit script file
  3. clasp push

Specifications

  • Node version (node -v): v7.5.0
  • Version (clasp -v): 1.4.0
  • OS (Mac/Linux/Windows): Mac OS 10.13.3
@IanWhalen
Copy link

@paul-matthews check to make sure you've enabled the apps script API?

https://script.google.com/home/usersettings

I hit the same issue less than 24 hours ago and that was the solution.

@paul-matthews
Copy link
Author

paul-matthews commented Jul 6, 2018

@IanWhalen solved, thank you.

Is there any chance this could be caught by the tool and reported?

I'll add a FR.

@jtt48
Copy link

jtt48 commented Jul 18, 2018

I have the same error, sadly I already have the apps script API enabled, so that is not a solution for me.

@ikedaosushi
Copy link

ikedaosushi commented Jul 24, 2018

Me too. The same error occurs although the apps script API is enabled.

ADD
Now, I updated to [email protected] (before 1.4), it no longer displays the error. However, it takes very long time and not push actually.
It display unexpected results as below.

$ clasp push
... (too long)
└─ node_modules/watch/test/test_monitorRootDirectory.js
└─ node_modules/watch/test/test_watchTree.js
└─ node_modules/which/which.js
└─ node_modules/wrappy/wrappy.js
└─ node_modules/yallist/iterator.js
└─ node_modules/yallist/yallist.js
└─ mycode.js

@campionfellin
Copy link
Collaborator

Hey @ikedaosushi , what does your .claspignore file look like?

@grant
Copy link
Contributor

grant commented Jul 26, 2018

Pushing many, many files could run into unknown issues (although it shouldn't.)
If you're able to target down which file is the problem, or if the problem is the number of files, that would help debug this issue.

@grant grant reopened this Jul 26, 2018
@grant
Copy link
Contributor

grant commented Jul 30, 2018

@jtt48 @ikedaosushi Is this still an issue? Have you been able to ignore the files that you don't want to push?

@frankcalpito
Copy link

Still an issue for me. Same number of files as my last n pushes but for some reason it is no longer working. my ignore file is empty.

@Blacksmoke16
Copy link

Blacksmoke16 commented Oct 1, 2018

I'm experiencing the same issue. Scripts API is on, and only pushing 4 files.

Push failed. Errors:

Pull works fine.

Node: 8.11.3
clasp: 1.6.0
OS: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

@grant
Copy link
Contributor

grant commented Oct 1, 2018

Can you provide examples of files that fail to push?

@Blacksmoke16
Copy link

@grant
Copy link
Contributor

grant commented Oct 4, 2018

@Blacksmoke16
I wan't able to reproduce the example you gave. This is my terminal output.

❤ clone [email protected]:Blacksmoke16/GESI.git
Cloning into 'GESI'...
Remote: Enumerating objects: 85, done.
remote: Counting objects: 100% (85/85), done.
remote: Compressing objects: 100% (61/61), done.
remote: Total 721 (delta 46), reused 55 (delta 22), pack-reused 636
Receiving objects: 100% (721/721), 7.99 MiB | 7.74 MiB/s, done.
Resolving deltas: 100% (330/330), done.
❤ clasp create
? Give a script title: Script
Created new script: https://script.google.com/d/1paaxs093YlZ4j8J1-viEdhMuhkK776A3N9HsTb4sDiscIwoLI1DNthuN/edit
timmerman @ ⎇ (master) ~/Documents/trash/gesi/GESI/src/script
❤ clasp push
└─ appsscript.json
└─ endpoints.ts
└─ functions.ts
└─ gesi.ts
└─ pollyfill.ts
Pushed 5 files.

I did use the latest build of clasp (from GitHub), not sure if that makes a difference.

@Blacksmoke16
Copy link

Yea i don't know what that was about. I installed latest clasp, rm -rf'd the repo directory, recloned it, and it worked.

🤷‍♂️

@grant
Copy link
Contributor

grant commented Oct 9, 2018

I've spend a few minutes on this issue today. I can't really reproduce the discussion above:

What if the API is not enabled?

We report this message if the API is disabled:

User has not enabled the Apps Script API. Enable it by visiting https://script.google.com/home/usersettings then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

What if the API returns an error?

If you have a syntax error, we report the error like this:

Push failed. Errors:
Syntax error: Missing ; before statement. line: 1 file: test
Files to push were:
└─ appsscript.json
└─ test.js

There's a lot of cases to test. The API reports errors in cases that pushing doesn't work. Also ignoring files may help.

I'm going to close this, but please report a new issue if you're still seeing something wrong.

@mageran
Copy link

mageran commented Mar 4, 2019

In my case, the reason for silent failure where backup files left behind by emacs (#somefile.js#). clasp status returned some useful message, which pointed me to that.

@ocramz
Copy link

ocramz commented Jun 4, 2020

Just had the same problem as mageran, fixed by saving all Emacs buffers related to the clasp project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants