Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to validate your Udacity token. #192

Open
japisingh opened this issue Mar 1, 2021 · 40 comments
Open

Failed to validate your Udacity token. #192

japisingh opened this issue Mar 1, 2021 · 40 comments

Comments

@japisingh
Copy link

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
@VeneratioVitae
Copy link

I'm having the exact same issue !

@yogesh-sirsat
Copy link

i am facing same problem

@amoat7
Copy link

amoat7 commented Mar 3, 2021

facing the same problem

@chinmaydas96
Copy link

having same issue any solution here

@KSanjayReddy
Copy link

observing the same issue, kindly look into it

@josancamon19
Copy link

Same here

@amoat7
Copy link

amoat7 commented Mar 4, 2021

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"

@chinmaydas96
Copy link

chinmaydas96 commented Mar 5, 2021

@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
Copy link

chinmaydas96 commented Mar 5, 2021

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

@amoat7
Copy link

amoat7 commented Mar 5, 2021

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.

@chinmaydas96
Copy link

sure thanks so far it is working for me.

@FadyMorris
Copy link

FadyMorris commented Mar 5, 2021

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

@leandro-marcelino
Copy link

@amoat7, thank you so much!

@fisal77
Copy link

fisal77 commented Mar 26, 2021

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

@SJ029626
Copy link

SJ029626 commented Mar 27, 2021

Yes definitely that solved the issue Thanks @amoat7

@dembeckh
Copy link

Thanks a lot, @amoat7.

@GhaziXX
Copy link

GhaziXX commented Apr 26, 2021

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

image

@maximshepin
Copy link

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

@grupobancamovilmt
Copy link

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

i have the same issue

@jatobrun
Copy link

jatobrun commented May 1, 2021

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?

@rohitsathish
Copy link

rohitsathish commented May 2, 2021

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
Copy link

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.

@jatobrun
Copy link

jatobrun commented May 3, 2021 via email

@maximshepin
Copy link

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

@mmphego
Copy link

mmphego commented May 5, 2021

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

@dishantTanwar
Copy link

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

@maximshepin
Copy link

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

@anikchowdhury1
Copy link

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

@SJ029626
Copy link

SJ029626 commented May 19, 2021

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.

@anikchowdhury1
Copy link

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.

@SJ029626
Copy link

SJ029626 commented May 19, 2021

@nikitow1 yes there is a dll file which is missing from system32 folder in c drive on your side if X32 architecture otherwise from syswow64 if x64 architecture and that file is this: https://www.dll-files.com/msvcr100.dll.html . You can download from here.

@anikchowdhury1
Copy link

@nikitow1 yes there is a dll file which is missing from system32 folder in c drive on your side if X32 architecture otherwise from syswow64 if x64 architecture and that file is this: https://www.dll-files.com/msvcr100.dll.html . You can download from here.

@SJ029626 oh! I am mac user, I am not using windows.

@SJ029626
Copy link

SJ029626 commented May 19, 2021

@nikitow1 yes there is a dll file which is missing from system32 folder in c drive on your side if X32 architecture otherwise from syswow64 if x64 architecture and that file is this: https://www.dll-files.com/msvcr100.dll.html . You can download from here.

@SJ029626 oh! I am mac user, I am not using windows.

@nikitow1 still there is a file missing and that is the reason of videos not being getting downloaded. check for the mac thing and post it here if worked out for you :)
I debugged the whole part and found it out.

@Ngai-E
Copy link

Ngai-E commented Jun 3, 2021

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.

works like a charm

@Ngai-E
Copy link

Ngai-E commented Jun 3, 2021

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

image

@Ngai-E
Copy link

Ngai-E commented Jun 3, 2021

@GhaziXX I had same issues. I updated my npm and node versions then reinstalled youtube-dl (I set my default python version for npm to be 2.7 with this command npm config set python python2.7 before reinstalling. Feel free to run the steps with any version >=2.7, though for some reason mine was failing) finally installed udacimak like this npm install -g udacimak --force.

@fisal77
Copy link

fisal77 commented Oct 20, 2021

Fixed #192 - by @amoat7 - #192 (comment)

@alihussainia
Copy link

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

@gillmoni
Copy link

gillmoni commented Aug 7, 2022

I still cannot login via udacimak login or settoken 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

@Tarek-Bohdima
Copy link

here is the fix that helped me #230 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests