udacimak icon indicating copy to clipboard operation
udacimak copied to clipboard

Failed to validate your Udacity token.

Open japisingh opened this issue 3 years ago • 40 comments

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

japisingh avatar Mar 01 '21 17:03 japisingh

I'm having the exact same issue !

VeneratioVitae avatar Mar 02 '21 03:03 VeneratioVitae

i am facing same problem

yogesh-sirsat avatar Mar 02 '21 04:03 yogesh-sirsat

facing the same problem

amoat7 avatar Mar 03 '21 00:03 amoat7

having same issue any solution here

chinmaydas96 avatar Mar 03 '21 12:03 chinmaydas96

observing the same issue, kindly look into it

KSanjayReddy avatar Mar 03 '21 13:03 KSanjayReddy

Same here

josancamon19 avatar Mar 04 '21 16:03 josancamon19

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"

amoat7 avatar Mar 04 '21 19:03 amoat7

@amoat7 yes it works, at least login successful. This is the updated file.

"use strict";

Object.defineProperty(exports, "__esModule", { value: true }); exports.default = fetchUdacityUserInfo;

var _config = require("../config");

var _ = require(".");

/**

  • Fetch User information from Udacity API
  • @param {string} udacityAuthToken Udacity authentication token */ function fetchUdacityUserInfo(udacityAuthToken) { const queryGraphql = '{"query":"\n query UserBaseQuery {\n user {\n id\n first_name\n last_name\n email\n nickname\n preferred_language\n affiliate_program_key\n can_see_professional_profile\n can_edit_content\n \n email_preferences {\n receive_marketing\n }\n\n \n settings {\n skip_classroom_welcome\n dismissed_upgrade_ids\n onboarding_completed_keys\n }\n\n social_logins {\n provider\n id\n }\n user_tags {\n namespace\n tag\n }\n nanodegrees(start_index: 0, is_graduated: false) {\n id\n key\n title\n locale\n version\n semantic_type\n user_state {\n last_viewed_at\n }\n }\n graduated_nanodegrees: nanodegrees(is_graduated: true) {\n id\n key\n locale\n version\n }\n courses(start_index: 0, is_graduated: false) {\n id\n key\n title\n locale\n version\n semantic_type\n user_state {\n last_viewed_at\n }\n }\n graduated_courses: courses(is_graduated: true) {\n id\n key\n locale\n version\n }\n }\n }\n ","variables":null,"locale":"en-us"}'; return (0, _.fetchApiUdacityGraphql)(_config.API_ENDPOINTS_UDACITY_GRAPHQL, queryGraphql, udacityAuthToken); }

chinmaydas96 avatar Mar 05 '21 02:03 chinmaydas96

@amoat7 did you change all the files, if yes can you share the files? Cant download after login also.

chinmaydas96 avatar Mar 05 '21 02:03 chinmaydas96

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.

amoat7 avatar Mar 05 '21 03:03 amoat7

sure thanks so far it is working for me.

chinmaydas96 avatar Mar 05 '21 04:03 chinmaydas96

Thank you so much @amoat7 . I replaced the files in api directory with your uploaded files and they worked perfectly !

FadyMorris avatar Mar 05 '21 16:03 FadyMorris

@amoat7, thank you so much!

leandro-marcelino avatar Mar 20 '21 03:03 leandro-marcelino

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.

Yes it's solved.... Thanks @amoat7

fisal77 avatar Mar 26 '21 16:03 fisal77

Yes definitely that solved the issue Thanks @amoat7

SJ029626 avatar Mar 27 '21 09:03 SJ029626

Thanks a lot, @amoat7.

dembeckh avatar Apr 22 '21 08:04 dembeckh

hey @amoat7, can you please provide us any hint on how to install udacimak, as it's not installing any more?

image

GhaziXX avatar Apr 26 '21 17:04 GhaziXX

doesn't work for me tried today. I think they changed the response structure again. Anyone tried recently?

maximshepin avatar Apr 30 '21 04:04 maximshepin

doesn't work for me tried today. I think they changed the response structure again. Anyone tried recently?

i have the same issue

grupobancamovilmt avatar May 01 '21 16:05 grupobancamovilmt

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.

You are awesome!

Do you resolve the problem?

jatobrun avatar May 01 '21 16:05 jatobrun

hey @amoat7, can you please provide us any hint on how to install udacimak, as it's not installing any more? image

@GhaziXX first uninstall python (you can reinstall later), after that in terminal npm remove -g udacimak && remove -g youtube-dl && npm install -g udacimak

@nenericamarius Tried this, doesn't work. Produces the same errors after removing Python.

rohitsathish avatar May 02 '21 13:05 rohitsathish

hey @amoat7, can you please provide us any hint on how to install udacimak, as it's not installing any more? image

@GhaziXX first uninstall python (you can reinstall later), after that in terminal npm remove -g udacimak && remove -g youtube-dl && npm install -g udacimak

@nenericamarius Tried this, doesn't work. Produces the same errors after removing Python.

Delete in your user directory the dir "node_modules" and file "package-lock.json". After that execute: npm install

@nenericamarius Thanks for your input. But since the installation fails, it doesn't create a udacimak folder in node_modules. And even if you remove package-lock.json, it will throw up an error since it doesn't know where to load the packages from.

But I'm a novice with npm and node, maybe I misunderstood what you're saying.

rohitsathish avatar May 03 '21 13:05 rohitsathish

Try to install with yarn

Sent from my iPhone

On May 3, 2021, at 8:46 AM, Rohit @.***> wrote:



hey @amoat7https://github.com/amoat7, can you please provide us any hint on how to install udacimak, as it's not installing any more? [image]https://user-images.githubusercontent.com/24620184/116125064-f76b5100-a6bc-11eb-9aa7-79c310f93b3d.png

@GhaziXXhttps://github.com/GhaziXX first uninstall python (you can reinstall later), after that in terminal npm remove -g udacimak && remove -g youtube-dl && npm install -g udacimak

@nenericamariushttps://github.com/nenericamarius Tried this, doesn't work. Produces the same errors after removing Python.

Delete in your user directory the dir "node_modules" and file "package-lock.json". After that execute: npm install

@nenericamariushttps://github.com/nenericamarius Thanks for your input. But since the installation fails, it doesn't create a udacimak folder in node_modules. And even if you remove package-lock.json, it will throw up an error since it doesn't know where to load the packages from.

But I'm a novice with npm and node, maybe I misunderstood what you're saying.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/udacimak/udacimak/issues/192#issuecomment-831269616, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKEHYC4ZALJTN7PR3BFLKN3TL2SJPANCNFSM4YM7XRZA.

jatobrun avatar May 03 '21 16:05 jatobrun

maksimshepin@Maksims-MacBook-Pro ~ % udacimak login ? Email: ? Password: [hidden] ✖ Validate Udacity authentication token via Udacity API 2021-05-03T23:46:43.051Z [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 } ] maksimshepin@Maksims-MacBook-Pro ~ %

no luck after replacing all files in API folder - same error - please help

maximshepin avatar May 03 '21 23:05 maximshepin

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.

Please create a PR for this fix please or fork

mmphego avatar May 05 '21 05:05 mmphego

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.

It worked for me. Thank you so much

dishantTanwar avatar May 07 '21 18:05 dishantTanwar

no luck after replacing all files in API folder - same error - please help

maximshepin avatar May 11 '21 00:05 maximshepin

Same here, no luck after replacing all files in the API folder - same error! Please help!

anikchowdhury1 avatar May 18 '21 03:05 anikchowdhury1

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.

SJ029626 avatar May 19 '21 08:05 SJ029626

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.

@SJ029626 , are you able to download youtube videos? using this modules I can download everything expect youtube videos.

anikchowdhury1 avatar May 19 '21 12:05 anikchowdhury1