react-spotify-player icon indicating copy to clipboard operation
react-spotify-player copied to clipboard

Can't find the data items

Open RobertJanVlak opened this issue 4 years ago • 4 comments

When i try to run the code i get the following error: "TypeError: Cannot read property 'item' of undefined"

It's about this piece of code: success: data => { this.setState({ item: data.item, is_playing: data.is_playing, progress_ms: data.progress_ms });

So all the steps are working perfect. I get the autentication screen from spotify, and the moment i click accept i get this error and i can't seem to find the solution for it.

RobertJanVlak avatar Apr 17 '20 08:04 RobertJanVlak

You need to be listening to something on your Spotify account so that this error does not occur. I will be sending an update.

yepMad avatar Apr 19 '20 07:04 yepMad

Confirmed that this is indeed the issue - does someone want to put in better error handling incase you are not listening to music?

JoeKarlsson avatar May 20 '20 18:05 JoeKarlsson

Same error but i don't know how to fix it.

Caotrungthanh avatar Jun 15 '20 04:06 Caotrungthanh

I sent a pull request! #12

yepMad avatar Jun 15 '20 06:06 yepMad