matrix-hacks / matrix-puppet-skype

23 stars 12 forks source link

Unable to find token (node index.js first run) #21

Closed mcrosson closed 4 years ago

mcrosson commented 6 years ago

When first running a fresh install the Skype client bombs out trying to find the login token. Microsoft recently updated the login workflow. Maybe a dependency needs a version bump?

node index.js Unable to load crypto module: crypto will be disabled: Error: global.Olm is not defined starting matrix client Got push rules synced starting skype client { MicrosoftAccountLogin: Unable to login with MicrosoftAccount. caused by GetLiveToken: Unable to get the Live token for Skype caused by LiveTokenNotFound: Unable to find the Live token. This token is normally found in the HTML response as the value of the element with the id "t". This error may be caused by a change in the Microsoft login workflow. HTM L page:

shviller commented 6 years ago

A combination of force-updating skype-http dependency to 0.0.15 in package.json (and for some reason it seemed useful to bump debug to 2.6.9) and doing things recommended in https://github.com/ocilo/skype-http/issues/100 helped (I did have date of birth and country entered, but clicking 'edit' and saving without changing did somehow make a difference). I don't know whether the second step alone suffices.

nr23730 commented 4 years ago

Solved with aa61b4f

ericmigi commented 4 years ago

I'm still getting this error, even with the latest commits, debug at 2.6.9 and having entered my date of birth and country.

Any thing else I could try?

Checking lazy load status...
Checking whether lazy loading has changed in store...
Storing client options...
Stored client options
Getting filter...
Sending first sync request...
Waiting for saved sync before starting sync processing...
synced
starting skype client
{ MicrosoftAccountLogin: Unable to login with MicrosoftAccount.
  caused by GetLiveToken: Unable to get the Live token for Skype
  caused by LiveTokenNotFound: Unable to find the Live token. This token is normally found in the HTML response as the value of the element with the id "t". This error may be caused by a change in the Microsoft login workflow. HTML page: "<html><head><noscript>JavaScript required to sign in<meta http-equiv=\"Refresh\" content=\"0; URL=https://login.live.com/jsDisabled.srf?mkt=EN-US&lc=1033&uaid=9db7aaf0ff714f74b98ab00d4e1d264b&client_flight=ReservedFlight33,ReservedFligh\"/></noscript><title>Continue</title><script type=\"text/javascript\">function OnBack(){}function OnNext(){}function DoSubmit(){var subt=false;if(!subt){subt=true;document.fmHF.submit();}}</script></head><body onload=\"javascript:DoSubmit();\"><form name=\"fmHF\" id=\"fmHF\" action=\"https://account.live.com/identity/confirm?mkt=EN-US&uiflavor=web&id=293290&ru=https://login.live.com/login.srf%3fid%3d293290%26opid%3dB4BB61A74EB03A79%26opidt%3d1588515\" method=\"post\" target=\"_top\"><input type=\"hidden\" name=\"client_flight\" id=\"client_flight\" value=\"ReservedFlight33,ReservedFligh\"><input type=\"hidden\" name=\"ipt\" id=\"ipt\" value=\"DT0ovk9435d16D0HltbEy6pZFespr6b1n2FcOD0G0ykyLm36Vd2seuSDzhgHyCYTtaDLiFuclqjloPqtFlALXGhgFBmCKx4bRmJopiAEwjz5kRbL2g30mk!rbAc51T!5pCKGQdPEqPcyEVVmIyLfX8zE6zIJi0Je4cc7ZcYiijCC6vWCwBW4vjdPGDL0BJ90OGt49nUzx4O*1qY7*52w8AYAbUdHBi12oDO9htDfsrLeSilFoAC!fRjnmgP0vtP2GI7lGcCoShUAh9JylqpM5VnCgllqIEM7rYgGBzcApsHjBUv6btLYP5P8GuW2XCkaZEYTuTsWjWmmg3R*Jp!gZv29nR!O9jJCsNxmIFSk5VpXncaMY25vwh!*9rut!VRh5WwgB!LOtT7Vkc4TcZsmyP9PrP8u!ra5L8abPsOHnK!3BhL0HLS2jOBq!Dhw5muhSDrjjs0lz287dSg$\"><input type=\"hidden\" name=\"pprid\" id=\"pprid\" value=\"648972d65b1c7e\"><input type=\"hidden\" name=\"uaid\" id=\"uaid\" value=\"9db7aaf0ff714f74b9800d4e1d264b\"></form></body></html>"
    at Object.create (/home/ubuntu/pi-matrix/bridges/matrix-puppet-skype/node_modules/skype-http/errors/microsoft-account/get-live-token.js:17:16)
    at scrapLiveToken (/home/ubuntu/pi-matrix/bridges/matrix-puppet-skype/node_modules/skype-http/providers/microsoft-account.js:216:61)
    at getLiveToken (/home/ubuntu/pi-matrix/bridges/matrix-puppet-skype/node_modules/skype-http/providers/microsoft-account.js:138:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'MicrosoftAccountLogin',
  data: {},