question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: Request contains an invalid argument" on push and deploy

See original GitHub issue

Expected Behavior

Push code to script project

Actual Behavior

Request fails on clasp push and on clasp redeploy. Redeploy has a more verbose error report:

    at new RequestError (/usr/lib/node_modules/@google/clasp/node_modules/google-auth-library/lib/transporters.js:34:42)
    at Request._callback (/usr/lib/node_modules/@google/clasp/node_modules/google-auth-library/lib/transporters.js:96:27)
    at Request.self.callback (/usr/lib/node_modules/@google/clasp/node_modules/request/request.js:186:22)
    at Request.emit (events.js:159:13)
    at Request.<anonymous> (/usr/lib/node_modules/@google/clasp/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:159:13)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/@google/clasp/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:254:19)
    at IncomingMessage.emit (events.js:164:20)
    at endReadableNT (_stream_readable.js:1062:12)
  code: 400,
  errors:
   [ { message: 'Request contains an invalid argument.',
       domain: 'global',
       reason: 'badRequest' } ] }

The auth library fails, so i tried logging back in and out and into another account to no avail

Steps to Reproduce the Problem

  1. My current project directory looks like:
├── appsscript.json  
├── build  
├── node_modules  
├── package.json  
├── package-lock.json  
├── README.md  
└── src  

With src and build as directories. The main apps script in my project is called build/Main.gs and should be pushed from the build directory. 2. My build system is currently just using babel to transpile syntax and perform a simple bundle of the src directory. Besides that, I don’t know what’s out of the ordinary with my project. My Google account is personal, not organizational, so the auth issues don’t come from that…

Specifications

  • Node version (node -v): v9.3.0
  • Version (npm list | grep clasp): @google/clasp@1.0.7
  • OS (Mac/Linux/Windows): Windows 10, WSL running Ubuntu 16.04

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
grantcommented, Oct 9, 2018

Per https://github.com/google/clasp/issues/21#issuecomment-394829151, I created a basic appsscript.json JSON validator in https://github.com/google/clasp/commit/80f3f7c1acae4171c00af4ec97356bf0d5ff4abf.

It looks like this:

clasp push
Error: Your appsscript.json contains invalid JSON.

It only detects JSON errors like a trailing comma.

1reaction
thomasbholmancommented, Apr 26, 2018

If anyone else looks through this thread for the mysterious “Error: Request contains an invalid argument” , the issue that caused me recently to get this same error was that I did not have my .git file entered in the .claspignore file. If you have a .git file in that directory, you’ll want to place it in your .claspignore file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Cloud Error: ERROR: INVALID_ARGUMENT: Request ...
I get this: ERROR: (gcloud.projects.add-iam-policy-binding) INVALID_ARGUMENT: Request contains an invalid argument. Can anybody ...
Read more >
Supplemental Nest terms request contains an invalid argument
Hello, I'm trying to add a Nest doorbell (battery). But when I accept the "Supplemental Nest terms" I get the error: "request contains....
Read more >
"Request contains an invalid argument" - how to see what ...
I am using mutateCampaignCriteria to try to remove some IPs from a campaign's IP Exclusions List. This code in general works fine (it...
Read more >
google cloud container registry error: "Failed to trigger build ...
... question google cloud container registry error: "Failed to trigger build: Request contains an invalid argument. ... When I push , it builds...
Read more >
code=invalid_argument | The AI Search Engine You Control
this error type "Error: invalid BigNumber value(value=undefined)" indicates that you are passing "undefined", a wrong argument. And the error stack ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found