Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

Reply
New Contributor
Posts: 4
Registered: ‎03-13-2012
My Device: Torch 9850
My Carrier: Verizon

findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

I am seeing this error on a device model 9850. The web service call findDeviceForUser is being made in asynchronous mode and always fails.  The error message is  "Runtime exception occurred."

 

What could cause the API to fail with one device? The API is working fine with other devices, including several of the same model.

Any suggestions on further debugging this issue?

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

Could you provide a code snippet with values filled in?

How does the device appear in the BAS?
Could you clarify what you mean by "asynchronous"? This call should be synchronous.

 

Regards, 

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
Posts: 4
Registered: ‎03-13-2012
My Device: Torch 9850
My Carrier: Verizon

Re: findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

Here is a sample of how we use the async methods to process a batch of devices.  We initiate N find device requests, wait on the async handles, then query for each response.


for (int j = 0; j < asyncCnt; j++)
{
findDeviceForUser request = new findDeviceForUser();
request.loadDeviceServiceAttributes = true;
request.locale = _locale;
request.userId = userIds[i + j];

// make the async calls
findDeviceResponses[j] = _coreWebService.BeginfindDeviceForUser(request, null, null);
hFindDevices[j] = findDeviceResponses[j].AsyncWaitHandle;
}

 

if (System.Threading.WaitHandle.WaitAll(hFindDevices, nTimeout, false))
{
// write the data from async calls to respective output files
for (int j = 0; j < asyncCnt; j++)
{
try
{
FindDeviceForUserResult result =_coreWebService.EndfindDeviceForUser(findDeviceResponses[j]).returnValue;

...

 

The EndfindDeviceForUser only returns the error status for a single device, and the same device fails each time.

 

All properties for this device appear normal and up to date in the BAS view.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

Could you provide the data being used for the call for this particular device call?

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
Posts: 4
Registered: ‎03-13-2012
My Device: Torch 9850
My Carrier: Verizon

Re: findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

For the request in question:

 

request.loadDeviceServiceAttributes = true;

request.locale = "en_US"

request.userId = "777"

Highlighted
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

It sounds like an issue with the data on the BES/BAS. BWS only relays this information. I would suggest investigating the BAS-AS logs and/or opening a ticket to get this investigated from a server-side team (help@blackberry.com).

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
Posts: 4
Registered: ‎03-13-2012
My Device: Torch 9850
My Carrier: Verizon

Re: findDeviceForUser returns a FindDeviceForUserReturnStatusEnumType.UNKNOWN

Thanks!