Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't establish remote connection - delegate does not provide errors #73

Closed
martinobonfiglioli opened this issue Jan 9, 2019 · 2 comments

Comments

@martinobonfiglioli
Copy link

Got this error and delegate never response

[BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C30.1:2][0x10b990500] get output frames failed, state 8196

It's happens most of the time 8/10 I can't understand reason

SPTConfiguration init

_remoteConfiguration = [[SPTConfiguration alloc] initWithClientID:kMXMSpotifyClientId
                                                      redirectURL:kMXMSpotifyCallbackURL];
_remoteConfiguration.playURI = @"";
_remoteConfiguration.tokenSwapURL = kMXMSpotifySwapURL;
_remoteConfiguration.tokenRefreshURL = kMXMSpotifyTokenRefreshServiceURL;

SPTAppRemote init

_appRemote = [[SPTAppRemote alloc] initWithConfiguration:_remoteConfiguration
                                                 logLevel:SPTAppRemoteLogLevelDebug];
_appRemote.connectionParameters.accessToken = [self getAccessToken];
_appRemote.delegate = self;

On applicationDidBecomeActive

if (self.appRemote.connectionParameters.accessToken && !self.appRemote.connected) {
    [self.appRemote connect];
}

Same error even if I try to do manual connect

[self.appRemote authorizeAndPlayURI:@""];

The other 2/10 times everything works perfect!

Anyone had same issue? There's something I can do to solve it?

@martinobonfiglioli
Copy link
Author

I solved my issue by adding a delay on connect call when application did become active
I know that this SDK isn't thread safe and all the API work in the main thread but for some reason I cant start the connection process immediately after the app startup, I need to wait some second

@sslash
Copy link

sslash commented Jul 21, 2019

I solved my issue by adding a delay on connect call when application did become active
I know that this SDK isn't thread safe and all the API work in the main thread but for some reason I cant start the connection process immediately after the app startup, I need to wait some second

This is so strange. I could not get appRemoteDidEstablishConnection to trigger unless I added a 1 second delay before calling appRemote.connect(). Are you doing this in a production app? Seems a bit dangerous to rely on doing this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants