Spotify-Headless icon indicating copy to clipboard operation
Spotify-Headless copied to clipboard

Error: Evaluation failed: TypeError: Cannot read property 'text' of null

Open poka-IT opened this issue 3 years ago • 2 comments

When execute token.js, , or play.js too, I got this error:

$ node token.js 
Previous token expired or not found, generating a new one.
302
Refresh token has expired or was not retrieved.
Logging on to Spotify.
/home/poka/dev/spotify-hack/headless/node_modules/puppeteer/lib/ExecutionContext.js:66
      throw new Error('Evaluation failed: ' + helper.getExceptionMessage(exceptionDetails));
            ^

Error: Evaluation failed: TypeError: Cannot read property 'text' of null
    at <anonymous>:3:35
    at ExecutionContext.evaluateHandle (/home/poka/dev/spotify-hack/headless/node_modules/puppeteer/lib/ExecutionContext.js:66:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/home/poka/dev/spotify-hack/headless/node_modules/puppeteer/lib/ExecutionContext.js:37:20)
    at async tokenValidator.generate (/home/poka/dev/spotify-hack/headless/src/tokenValidator.js:100:21)
    at async main (/home/poka/dev/spotify-hack/headless/token.js:10:3)

I'm using node 16.15.0, same issue with node 12.

poka-IT avatar May 06 '22 15:05 poka-IT

I have this same issue using node 16.16.0

leandroembu avatar Aug 03 '22 16:08 leandroembu

The same issue using node v18.7.0

Previous token expired or not found, generating a new one.
302
Refresh token has expired or was not retrieved.
Logging on to Spotify.
/home/leandro/Spotify-Headless/node_modules/puppeteer/lib/ExecutionContext.js:66
      throw new Error('Evaluation failed: ' + helper.getExceptionMessage(exceptionDetails));
            ^

Error: Evaluation failed: TypeError: Cannot read property 'text' of null
    at <anonymous>:3:35
    at ExecutionContext.evaluateHandle (/home/leandro/Spotify-Headless/node_modules/puppeteer/lib/ExecutionContext.js:66:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (/home/leandro/Spotify-Headless/node_modules/puppeteer/lib/ExecutionContext.js:37:20)
    at async tokenValidator.generate (/home/leandro/Spotify-Headless/src/tokenValidator.js:100:21)
    at async main (/home/leandro/Spotify-Headless/token.js:10:3)

Node.js v18.7.0

leandroembu avatar Aug 03 '22 16:08 leandroembu