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

Login failed #228

Open
leioukupo opened this issue Mar 16, 2022 · 9 comments
Open

Login failed #228

leioukupo opened this issue Mar 16, 2022 · 9 comments

Comments

@leioukupo
Copy link

udacimak settoken mykey
(node:941) [DEP0128] DeprecationWarning: Invalid 'main' field in '/www/server/nodejs/v16.14.1/lib/node_modules/udacimak/node_modules/user-settings/package.json' of 'dots.js'. Please either fix that or report it to the module author
(Use node --trace-deprecation ... to show where the warning was created)
✖ Validate Udacity authentication token via Udacity API
2022-03-16T12:53:45.121Z [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
}
]

Desktop (please complete the following information):

  • OS: [e.g. iOS] debain10 arm64
  • Node version: (node --version) v16.14.1
  • npm version: (npm --version) 8.5.4
  • Udacimak Version: (udacimak --version) latest
  • Browser [e.g. chrome, safari] firefox
@cwy3
Copy link

cwy3 commented Nov 28, 2022

Same problem but different result...

udacimak settoken <my_token>
✖ Validate Udacity authentication token via Udacity API
2022-11-28T17:18:28.256Z [error]: Failed to validate your Udacity token. Please try again. Here's the error message:
{}

when I try to login:

udacimak login
? Email: <my email>
? Password: [hidden]
undefined

MacOS Catalina
v10.15.7

node --version
v14.6.0

npm --version
6.14.6

udacimak --version
v1.6.6

@udacimak, could you please kindly look into this?

@miguelusque
Copy link

miguelusque commented Dec 7, 2022

Same here. @udacimak, could you please have a look at it? Thanks!

@Shaifff
Copy link

Shaifff commented Dec 26, 2022

same here

@rkvoid2021
Copy link

Udacity redesigned its website, api and its structure. So udacimak is not working the same as before.

Solution, which worked for me:
In udacimak main folder (e.g. "C:\Users\Me\AppData\Roaming\npm\node_modules\udacimak")...then in the "\lib\config\apiEndpointsUdacity.js" file change the global variable

from
const API_ENDPOINTS_UDACITY_GRAPHQL = 'https://classroom-content.udacity.com/api/v1/graphql';
to
const API_ENDPOINTS_UDACITY_GRAPHQL = 'https://learn.udacity.com/api/classroom-content/v1/graphql';

Also in the file "\lib\api\fetchApiUdacityGraphql.js" change the headers object to:

  const headers = {
    Accept: '*/*',
    Authorization: `Bearer ${udacityAuthToken}`,
    'Content-Type': 'application/json',
    Host: 'learn.udacity.com',
    Connection: 'keep-alive',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
  };

Hope it works

@wongd-hub
Copy link

wongd-hub commented Jan 17, 2023

Thank you for this, however doing this alone appears to no longer be working with the following error message (possibly linked to #220)

✖ Validate Udacity authentication token via Udacity API
2023-01-17T22:26:29.662Z [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
    }
]

What got the authentication working for me was doing a fresh install of udacimak, following the instructions in this comment in #192, then following your instructions (updating \lib\config\apiEndpointsUdacity.js and \lib\api\fetchApiUdacityGraphql.js). udacimak settoken AUTH_KEY works after this.

While we're at it - I had an issue with Youtube downloads failing too fast; relevant workaround for this has been posted here #209 (comment) (I had to increase to 10000000ms for the data scientist nanodegree)

@cwy3
Copy link

cwy3 commented Feb 28, 2023

Thank you for this, however doing this alone appears to no longer be working with the following error message (possibly linked to #220)

✖ Validate Udacity authentication token via Udacity API
2023-01-17T22:26:29.662Z [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
    }
]

What got the authentication working for me was doing a fresh install of udacimak, following the instructions in this comment in #192, then following your instructions (updating \lib\config\apiEndpointsUdacity.js and \lib\api\fetchApiUdacityGraphql.js). udacimak settoken AUTH_KEY works after this.

While we're at it - I had an issue with Youtube downloads failing too fast; relevant workaround for this has been posted here #209 (comment) (I had to increase to 10000000ms for the data scientist nanodegree)

Thanks for the above, the login and downloading is working now... but the rendering of youtube-dl is not working, see the new issue here: #236

@udacimak please kindly follow up and advice.

@10daer
Copy link

10daer commented Apr 30, 2023

Thank you for this, however doing this alone appears to no longer be working with the following error message (possibly linked to #220)

✖ Validate Udacity authentication token via Udacity API
2023-01-17T22:26:29.662Z [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
    }
]

What got the authentication working for me was doing a fresh install of udacimak, following the instructions in this comment in #192, then following your instructions (updating \lib\config\apiEndpointsUdacity.js and \lib\api\fetchApiUdacityGraphql.js). udacimak settoken AUTH_KEY works after this.

While we're at it - I had an issue with Youtube downloads failing too fast; relevant workaround for this has been posted here #209 (comment) (I had to increase to 10000000ms for the data scientist nanodegree)

after i did this i am still getting undefined
C:\Users\USER>udacimak login
? Email:
? Password: [hidden]
undefined

@10daer
Copy link

10daer commented Apr 30, 2023

Thank you for this, however doing this alone appears to no longer be working with the following error message (possibly linked to #220)

✖ Validate Udacity authentication token via Udacity API
2023-01-17T22:26:29.662Z [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
    }
]

What got the authentication working for me was doing a fresh install of udacimak, following the instructions in this comment in #192, then following your instructions (updating \lib\config\apiEndpointsUdacity.js and \lib\api\fetchApiUdacityGraphql.js). udacimak settoken AUTH_KEY works after this.
While we're at it - I had an issue with Youtube downloads failing too fast; relevant workaround for this has been posted here #209 (comment) (I had to increase to 10000000ms for the data scientist nanodegree)

after i did this i am still getting undefined C:\Users\USER>udacimak login ? Email: ? Password: [hidden] undefined

okay i am now getting this
C:\Windows\System32>udacimak login
? Email:
? Password: [hidden]
Error: getaddrinfo ENOTFOUND user-api.udacity.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'user-api.udacity.com'
}

and the user-api.udacity.com is replying with page not found

@elkallali
Copy link

Thank you for this, however doing this alone appears to no longer be working with the following error message (possibly linked to #220)

✖ Validate Udacity authentication token via Udacity API
2023-01-17T22:26:29.662Z [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
    }
]

What got the authentication working for me was doing a fresh install of udacimak, following the instructions in this comment in #192, then following your instructions (updating \lib\config\apiEndpointsUdacity.js and \lib\api\fetchApiUdacityGraphql.js). udacimak settoken AUTH_KEY works after this.
While we're at it - I had an issue with Youtube downloads failing too fast; relevant workaround for this has been posted here #209 (comment) (I had to increase to 10000000ms for the data scientist nanodegree)

after i did this i am still getting undefined C:\Users\USER>udacimak login ? Email: ? Password: [hidden] undefined

okay i am now getting this C:\Windows\System32>udacimak login ? Email: ? Password: [hidden] Error: getaddrinfo ENOTFOUND user-api.udacity.com at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'user-api.udacity.com' }

and the user-api.udacity.com is replying with page not found

did you resolved this problem

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

8 participants