react-native-track-player throws {"error": {"code": "android-io-network-connection-failed", "message": "Source error"}, "state": "error"}

86 views Asked by At
  1. Check Network Connection in the emulator by checking the browser for random stuff.
  2. Check Permissions for android and included in AndroidManifest.xml file.
  3. checked link to my mp3 player.It is https.
  4. Also checked in the actual device. 5.Problem occurs only on Android.IOS device works fine.

using react native 0.72 and react native track player version ^4.0.1

Event.PlaybackState {"state": "stopped"}
 LOG  Event.PlaybackState {"state": "stopped"}
 LOG  Event.PlaybackPlayWhenReadyChanged {"playWhenReady": false}
 LOG  Event.PlaybackPlayWhenReadyChanged {"playWhenReady": false}
 LOG  Event.PlaybackActiveTrackChanged {"index": 0, "lastIndex": 0, "lastPosition": 0, "lastTrack": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"}, "track": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"}}
 LOG  Event.PlaybackActiveTrackChanged {"index": 0, "lastIndex": 0, "lastPosition": 0, "lastTrack": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"},, "track": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"},}
 LOG  Event.PlaybackActiveTrackChanged {"index": 0, "lastIndex": 0, "lastPosition": 0, "lastTrack": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"},, "track": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"},}
 LOG  Event.PlaybackActiveTrackChanged {"index": 0, "lastIndex": 0, "lastPosition": 0, "lastTrack": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"}, "track": {"artist": "artist", "artwork": "local image", "duration": "217574", "id": "CD-NEW13-6", "title": "title", "url": "https link to the mp3 player"},}
 LOG  Event.PlaybackState {"state": "loading"}
 LOG  Event.PlaybackState {"state": "loading"}
 LOG  Event.PlaybackPlayWhenReadyChanged {"playWhenReady": true}
 LOG  Event.PlaybackPlayWhenReadyChanged {"playWhenReady": true}
 LOG  Event.PlaybackState {"state": "buffering"}
 LOG  Event.PlaybackState {"state": "buffering"}
 LOG  Event.PlaybackState {"error": {"code": "android-io-network-connection-failed", "message": "Source error"}, "state": "error"}
0

There are 0 answers