cjam / cjam/react-native-spotify-remote

The operation couldn’t be completed. Connection refused

Open
#75 19 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
283
Forks
110
PR merge metrics
No merged PRs in 30d

Description

Below is my code. I got accessToken but when I call SpotifyRemote.connect(session.accessToken), I got this error

> Possible Unhandled Promise Rejection (id: 2):
> Error: Connection attempt failed.
> Stream error.
> The operation couldn’t be completed. Connection refused

```
SpotifyAuth.getSession().then((session) => {
if (session != undefined && session.accessToken != undefined) {
SpotifyRemote
.connect(session.accessToken)
.then(() => {
SpotifyRemote.playUri(`spotify:track:${songId}`);
})
.catch(this.onError);
} else {
console.log("session failed.=============")
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.