INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: BB10 remote: MCWS + Authentication = "Bound address already in use"  (Read 6806 times)

Soul_Rvr911

  • Galactic Citizen
  • ****
  • Posts: 334

Hello!

I've been developing a BlackBerry 10 remote for Media Center using MCWS, but I'm having trouble making connections when authentication is enabled.

The current flow of my app is:

1) Make a Browse request, ID=0
2) Get an "Auth Required" response from MCWS
3) Get the stored credentials from the settings (or prompt user to go to settings if there are no credentials)
4) Make an Authenticate request with the credentials, retrieving an Auth token which is appended to all future calls
5) Make the Browse request again (with the token)

When I make the 2nd Browse request, I get a "Bound address already in use" error from the platform. It seems if I wait a bit and retry the Browse request, the request will return a response. I have also tried configuring my QNetworkAccessManager to handle authentication on its own - without calling MCWS' Authenticate - but I experience the same failure. I believe QNAM just caches the credentials and passes them when the server requests them.

Even after I get a response from the Browse request, sometimes other requests fail sporadically. My app makes a relatively large number of connections in a short time frame when browsing because it needs to pull down all of the images. Cascades doesn't require images for all of the items as soon as the page loads, but it does buffer the items on screen + a few ahead and behind in the list. The QNetworkAccessManager handles request queuing internally, making at most 6 connections to a single host in parallel. But it seems when authentication is enabled MCWS can't keep up and some of the requests fail.

I just experienced a similar issue with Chrome. I tried hitting http://localhost:52199/MCWS/v1/ and was prompted for credentials, but when I entered them Chrome immediately returned a connection error and the page didn't load.

All this being said, when I turn authentication off, I don't experience any issues. Has anyone else experienced anything similar?

Thanks!

-Lenny

PS- thank you very much for making these APIs, and for making them so simple to use! I've been having a lot of fun toying around while creating this app over the past few weeks.
Logged
Check out my JRiver remote application eos, available for Android and BlackBerry 10!
Android: http://yabb.jriver.com/interact/index.php?topic=89392.0
BB10: http://yabb.jriver.com/interact/index.php?topic=79677.0

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: BB10 remote: MCWS + Authentication = "Bound address already in use"
« Reply #1 on: March 19, 2013, 04:02:47 pm »

I'm wondering if this document might help:
http://wiki.jriver.com/index.php/Web_Service_Connection

It describes everything that we do with Gizmo, our own Android app.

(ps. it's great to hear you're working on a BlackBerry app!)
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up