Page 1 of 1

advertised_browser lookup error

Posted: Fri Nov 08, 2013 10:18 am
by cdavies
I'm using the cloud service to lookup the user agent

Mozilla/5.0 (iPod; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B329

This is the user agent that comes from an in-app WebView which is different from the standard safari user agent for this device which is

Mozilla/5.0 (iPod; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25


When calling

AbstractDevice device = manager.getDeviceFromRequest(request, response, capabilities);

I then get the exception being thrown

java.lang.IllegalArgumentException: Something is wrong with capability 'advertised_browser': null
at com.scientiamobile.wurflcloud.CloudClient.detectDevice(CloudClient.java:382) ~[client-java-1.0-simple-simple.jar:na]
at com.scientiamobile.wurflcloud.CloudClientManager.getDeviceFromRequest(CloudClientManager.java:143) ~[client-java-1.0-simple-simple.jar:na]


I've checked advertised_browser is on my capability list for the account. I saw a similar exception yesterday with advertised_device_os. Is there a bug with these new virtual capabilities? If it can't find a match, shouldn't it use a default value rather than throwing an exception which results in no device capabilities returned at all.

Re: advertised_browser lookup error

Posted: Fri Nov 08, 2013 11:40 am
by sriram
Hi,

Thank you for the information. Our support team is looking into this and we will keep you updated on this issue.

Thanks again and cheers!

Re: advertised_browser lookup error

Posted: Fri Nov 08, 2013 12:42 pm
by cdavies
Great thanks for the speedy reply. Here is the stacktrace I saw for a request from our website monitoring bot

User Agent: Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)


java.lang.IllegalArgumentException: Something is wrong with capability 'advertised_device_os': null
at com.scientiamobile.wurflcloud.CloudClient.detectDevice(CloudClient.java:382) ~client-java-1.0-simple-simple.jar:na
at com.scientiamobile.wurflcloud.CloudClientManager.getDeviceFromRequest(CloudClientManager.java:143) ~client-java-1.0-simple-simple.jar:na

Re: advertised_browser lookup error

Posted: Fri Nov 08, 2013 4:17 pm
by kamermans
Thanks for your help - we've identified the problem and released an update to all servers to resolve the issue. This capability now returns and empty string instead of null for virtual capabilities that cannot be populated.