Page 1 of 1

Problem detecting mobile Chrome device

Posted: Wed Jul 25, 2012 7:58 am
by JDWilliams
Hi

We are using WURFL API 1.4 with the latest database published on 23rd July 2012.

We have noticed that when using Google Chrome on Android the device is incorrectly detected as a generic web browser and as such we are not serving mobile content. This may be down to the following error that we have noticed in the service logs:


java.lang.ArrayIndexOutOfBoundsException
at net.sourceforge.wurfl.core.utils.ACAutomaton.contains(ACAutomaton.java:124)
at net.sourceforge.wurfl.core.utils.ACAutomaton.contains(ACAutomaton.java:113)
at net.sourceforge.wurfl.core.utils.UserAgentUtils.isSmartTvBrowser(UserAgentUtils.java:247)
at net.sourceforge.wurfl.core.request.DefaultWURFLRequest.isSmartTvBrowser(DefaultWURFLRequest.java:187)
at net.sourceforge.wurfl.core.request.DefaultWURFLRequest.isDesktopBrowserHeavyDutyAnalysis(DefaultWURFLRequest.java:157)
at net.sourceforge.wurfl.core.matchers.MatcherManager.matchRequest(MatcherManager.java:579)
at net.sourceforge.wurfl.core.DefaultWURFLService.getDeviceForRequest(DefaultWURFLService.java:116)
at com.scientiamobile.reloader.DefaultReloadableWURFLService.getDeviceForRequest(DefaultReloadableWURFLService.java:111)
at net.sourceforge.wurfl.core.DefaultWURFLManager.getDeviceForRequest(DefaultWURFLManager.java:99)
at net.sourceforge.wurfl.core.DefaultWURFLManager.getDeviceForRequest(DefaultWURFLManager.java:85)
at net.sourceforge.wurfl.core.GeneralWURFLEngine.getDeviceForRequest(GeneralWURFLEngine.java:430)
at uk.co.jdwilliams.components.device.impl.service.DeviceServiceWurflImpl.getRequestDevice(DeviceServiceWurflImpl.java:38)
at uk.co.jdwilliams.shop.filters.SessionSetupFilter.setupDevice(SessionSetupFilter.java:101)
at uk.co.jdwilliams.shop.filters.SessionSetupFilter.doFilter(SessionSetupFilter.java:86)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3703)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)

The user agent is as follows:

Mozilla/5.0 (Linux; Android 4.0.4; LT26i Build/6.1.A.0.453) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19

The WURFL cut down user agent is:

DO_NOT_MATCH_GENERIC_WEB_BROWSER

We have also noticed that the device is correctly identified on the TERAWURFL tool.

Please could you advise?

Kind Regards
Matt Adams
Developer, J D Williams.

Re: Problem detecting mobile Chrome device

Posted: Wed Jul 25, 2012 8:42 am
by sm_support2
Hey J D, unfortunately Google has very light-heartedly decided from one day to the next the the Mobile Chrome UA string should also contain "Chrome" (previously it did not).

The good news is that we fixed this right away with a maintenance release of the APIs (1.4.0.3 for Java) to address this issue. You can download it at the usual place:

http://wurfl.sourceforge.net/apis.php

please let us know if this fixes your problem

Thanks

Re: Problem detecting mobile Chrome device

Posted: Thu Jul 26, 2012 3:20 am
by JDWilliams
Yes this has resolved our problem, many thanks.

Re: Problem detecting mobile Chrome device

Posted: Wed Aug 01, 2012 12:29 pm
by tmarin7
Is this also being address for Google Chrome installed on an iphone 4s?

Thanks in advance.

Re: Problem detecting mobile Chrome device

Posted: Wed Aug 01, 2012 2:13 pm
by kamermans
Hi,

We are working on the Chrome on iOS detection, however, this is purely a cosmetic fix, since Chrome on iOS basically is mobile Safari.

Re: Problem detecting mobile Chrome device

Posted: Fri Nov 30, 2012 9:31 am
by webcrumbz
Hey guys,

Has this issue been fixed on your is_wireless_device capability as well? Thanks!

Re: Problem detecting mobile Chrome device

Posted: Fri Nov 30, 2012 10:04 am
by sriram
Hi webcrumbz,

The is_wireless_device capability should work fine. Here's an example.

Cheers!