Clasp: Clasp push fails silently

Created on 6 Jul 2018  ยท  16Comments  ยท  Source: google/clasp

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

All 16 comments

@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.

@IanWhalen solved, thank you.

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

I'll add a FR.

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

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

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

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.

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

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.

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

Can you provide examples of files that fail to push?

@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.

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

:man_shrugging:

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arichardsmith picture arichardsmith  ยท  6Comments

freddy-daniel picture freddy-daniel  ยท  7Comments

grant picture grant  ยท  4Comments

PopGoesTheWza picture PopGoesTheWza  ยท  4Comments

Haris-Jamil picture Haris-Jamil  ยท  6Comments