udacimak: Failed to validate your Udacity token.

Describe the bug Hi, Both using Method 1 (login: username and password) and Method 2 (settoken), I am getting the following error: ✖ Validate Udacity authentication token via Udacity API 2021-03-01T17:29:19.377Z [error]: Failed to validate your Udacity token. Please try again. Here’s the error message: [ { “message”: “Unknown argument "include_free_preview" on field "nanodegrees" of type "User".”, “status”: null }, {“message”: “Cannot query field "version_upgrade_details" on type "Nanodegree".”, “status”: null } ]

To Reproduce Steps to reproduce the behavior:

  1. login by “udacimak login”
  2. type username and password

Expected behavior The expectation was that the token or login will be validated

Udacimak Log no .log file was found

INSERT_LOG_HERE

Desktop (please complete the following information):

  • OS: Ubuntu 16.04 through WSL2 Windows 10
  • Node version: 14.7.0
  • npm version: 6.14.7
  • Udacimak Version: 1.6.6
  • Browser :chrome

Course Information

  • Nanodegree or Course name: [Data Analyst Nanodegree]
  • Version:
  • Locale: en-us

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 14
  • Comments: 40

Most upvoted comments

Hi guys replace the files in your ~\node_modules\udacimak\lib\api folder with these files (api.zip). You will have to find a way to locate your node modules folder as it differs for most systems. I made changes to the code and they work fine for me. You can first make a backup of your old files before replacing.

I still cannot login via udacimak login or settoken <TOKEN> tried Windows and WSL both (with api.zip replacement and google drive link shared above). Any help would be appreciated 2022-08-06_21h57_231

@amoat7 You can use npm root -g command to find the path to the node_modules directory =)

i was finally able to fix mine. It seems the schema for the udacity api as changed. You need to locate the udacimak library installed on your pc. go into the api folder, search through the files and delete any fields that throw an error.

For login that will be “fetchUdacityUserInfo.js”

I’m using windows and the api files are located in this folder: “~\Continuum\anaconda3\node_modules\udacimak\lib\api”

Guys the workaround is instead of replacing the api.zip replace in the node module, here is the directory that I have used and it will definitely help you out replace the whole node module, remember one thing when you extract there will be node_module inside node_module so copy the second node module folder with all the files like I can say either extract in another directory and directly copy in your node module location: https://drive.google.com/file/d/1FwqodHIRIedyb_Z3s8os53UfLDxqB5AL/view?usp=sharing Let me know if this helps 😃 I have made it worked several times, let me know if anyone gets any issue.