1

We are facing an issue with device detection and sitecore forms. In the presentation details of our page, we have added MVC Form rendering and added a form in the datasource for "mobile" device.

It works perfectly in the simulator in chrome/IE but it is not loading correctly on my mobile device (Samsung Galaxy/Android).

Device detection is enabled by default. Can anyone please suggest what could be the issue?

I can also see below error in logs -

ERROR Failed to perform GeoIp lookup for 45a56cae-a85c-2cb4-55ec-639c7150f64f
Exception: System.Net.WebException
Message: The remote server returned an error: (403) Forbidden.
Source: System
   at System.Net.HttpWebRequest.GetResponse()
   at Sitecore.CES.Client.WebClient.<>c__DisplayClass6_0.<ExecuteRequest>b__0()
   at Sitecore.CES.Client.WebClient.Execute[T](Func`1 action, String requestUri)
   at Sitecore.CES.Client.ResourceConnector`1.Request(String endpoint, Object[] parameters)
   at Sitecore.CES.GeoIp.SitecoreProvider.GetWhoIsInformationByIp(String ip)
   at Sitecore.Analytics.Lookups.GeoIpManager.GetDataFromLookupProvider(GeoIpHandle geoIpHandle)

Sitecore version - 9.3

2
  • How have you added the Device detection. Can you share any screenshot? of your Rendering? Commented Nov 9, 2023 at 15:33
  • Please see my updated answer Commented Nov 11, 2023 at 14:22

2 Answers 2

2

By default, Device Detection is enabled for Standalone, Content Delivery and Processing Servers. So first of all ensure that you are not testing on the front end of a Content Authoring server.

You should also make sure that Device Detection is being initialised properly. To do this, check the logs on your CD server and scan for the first occurence of:

Device detection - initializing

If there are any issues, then you will see an exception shortly after this line. A couple of reason I have experienced that will cause it to fail to inialize are:

  1. Visual C++ runtime is not installed
  2. Incorrect FiftyOne.DeviceDetection binaries for your operating system (i.e. 32 bit, when it should be 64 bit).

To check if a binary is 32 or 64 bit, you can open the DLL in notepad, search for the first occurence of the letters PE.

  • If it is followed by L then it is 32 bit
  • If it is followed by d† then it is 64 bit

I believe you can run with certain DLLs that are 32 bit, but certain ones must match the operating system. In my situation, all FiftyOne.DeviceDetection binaries were fine as 32 bit (i.e. had the L when inspected) but the FiftyOne.DeviceDetection.Hash.Engine.OnPremise.Native.dll needed to be 64 bit.

If you are running on 64 bit, please open that in notepad and confirm if it has PE d†

UPDATE

Based on the error message you have added to your question, it seems the issue may infact relate to Geo IP lookup service, which is separate to device detection.

Please try signing up for the free subscription and linking up in your config as per the instructions on this page: https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-manager/set-up-sitecore-ip-geolocation.html

1
  • thank you for your answer. Yes I can see Device Detection - Initializing, Device Detection - Initialized. I have added one error I founf in logs in the question. Can you please have a look?
    – NewbieHere
    Commented Nov 10, 2023 at 16:38
0

Check that Sitecore instances can access this database path.

<setting name="DeviceDetection.DatabasePath" value="/App_Data/DeviceDetection" />  

and Also validate whether device detection is enabled or not in this config App_config/sitecore/DeviceDetection.Client/Sitecore.CES.DeviceDetection.config. and https://www.yoursite.com/sitecore/admin/showconfig.aspx to check value.

It allows you to download the database. And also validate FailDatabaseCheckInterval.

<setting name="DeviceDetection.FailDatabaseCheckInterval" value="00:10:00"/>   

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.