87309

Error retrieving access token: TypeError: Cannot read property 'project_id' of undefined

<h3>Question</h3>

I am new to clasp.

After the initial login via: clasp login I am able to login to script.google.com Next, I have created a project and pushed the file via: clasp push

Now, I have logged out using: clasp logout

Help required here: Now, if I am trying:

clasp login --creds ./.clasp.json

I am getting, "Error retrieving access token: TypeError: Cannot read property 'project_id' of undefined".

Please guide me on how to login via --creds?


<h3>Answer1:</h3>

TLDR: You're using the config file (.clasp.json), and not a credentials file (creds.json or other) from the Google Cloud Project console.

<hr />

When you log in, the default storage of credentials is in a file named .clasprc.json in the ~ directory (C:\Users\<user>\ on Windows):

$ clasp login Logging in globally...

Recommend

  • Spring cache for a given request
  • “this” keyword in Object method points to Window
  • Kubernetes - The connection to the server localhost:8080 was refused - did you specify the right hos
  • Calculating the coordinates for the center of a circle in an image
  • How to spy on a default exported function
  • How to attach a file to an email with PowerShell
  • How can I convert a hex string to a u8 slice?
  • Not able to emulate ios with Cordova
  • Pass variable to a detail view controller using a table in UIViewController (not UITableViewControll
  • MVC5 Render View (with parameters) as String
  • Get a class as javax.lang.model.element.Element in junit tests
  • Pimcore where does code go
  • How to change node value using node's current value in SQL with XQuery (SQL Server)
  • OWL Api, move class from parent A to B
  • How to get full url in Angular?
  • Delete file on sd card from a listview
  • Variable with usage COMP in COBOL
  • about iOS target version and SDK version
  • Train two models concurrently
  • Insert inline image into Lotus Notes message
  • Intersection of characters in two strings
  • Python read xml with related child elements
  • How to debug iBeacons and Passbook
  • Modifying native query cannot have named parameter bindings?
  • Adding native code to an existing Worklight hybrid app
  • Unable to start a WebView from an AsyncTask
  • how to add dashed border on highcharts “area” graph for every point
  • Swift manually rotate view controller
  • How to resolve this in PHPUnit where it is asking me to set KERNEL_DIR in my phpunit.xml?
  • Year over Year Stats from a Crossfilter Dataset
  • java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/SpringDispatcher-ser
  • Ruby regex for matching simpliest Ruby's regexes
  • Why is ordered choice in pyparsing failing for my use case?
  • I am consuming a WCF service that requires headers from a .NET 2 website. How can I programmatically
  • Unable to create Access token grant type in wso2 API manager store to test API
  • Google App Engine Datastore: Dealing with eventual consistency
  • Unity3d lost directional light shadows after generate assetBundle (.unity3d file)