View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
18775Bug reportsOtherpublic2023-09-08 21:09
Reporterritapas Assigned To 
PrioritynoneSeveritypartial_block 
Status acknowledgedResolutionopen 
Product Version5.5.x 
Summary18775: browser detect question not accurate
Description

I see the browser detect question type doen't work properly.
Latest Brave browser in android is seen as Chrome, as well as Edge 107 on Windows PCs

Steps To Reproduce

Steps to reproduce

create survey with a browser detection question, test it

Expected result

browser is detected

Actual result

browser is sometimes not detected

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)5.4.14 (build 221205)
I will donate to the project if issue is resolvedNo
Browser
Database type & versionn/a
Server OS (if known)
Webserver software & version (if known)
PHP Versionn/a

Users monitoring this issue

ritapas

Activities

jelo

jelo

2023-05-11 09:45

partner   ~74926

I question that is bug. It's quite common that browsers like Brave provide a reduced or fake useragent string.
You can see many discussions around the useragent topic of the years in the Brave community.

Check via this website what the browsers return as useragent.
https://browserleaks.com/client-hints
That would help developers to understand if there is a bug in the browser detection question.

The browser detection routine might need to capture more infos to see if the user agent string is wrongly parsed.
For the Brave browser it might be a JavaScript routine.
https://github.com/brave/brave-browser/issues/8216

ritapas

ritapas

2023-07-17 16:24

reporter   ~76110

Well but the information given by the question is incomplete.

Example with Edge 112.0.1722.48 in MS Windows:
Browserleaks site shows:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48
Limesurvey displays only
Chrome (112.0)

Example with Brave 1.52.130, Chromium 114.0.5735.198 in Android:
Browserleaks site shows:
Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36
Limesurvey displays only
Chrome (114.0)

gabrieljenik

gabrieljenik

2023-08-07 23:42

manager   ~76474

@tibor.pacalat is this a bug or an enhancement request?

tibor.pacalat

tibor.pacalat

2023-08-09 10:53

administrator   ~76501

@gabrieljenik I would argue that this is an enhancement request.

gabrieljenik

gabrieljenik

2023-08-09 13:59

manager   ~76505

This is not a bug on LS but a request for expanding the reach of the detection script for newer browsers.

gabrieljenik

gabrieljenik

2023-08-31 18:30

manager   ~76822

The Browser Detect question theme uses Bowser lib to identify the browser.

@ritapas Please, can you enter here with the different browsers and check?
https://bowser-js.github.io/bowser-online/

If this page detects a browser which LS doesn't, then we can probably update something to match it.
If not, then it means we may need a nother lib for detecting the browser, which is more kind of a feature request.

Thanks!

ritapas

ritapas

2023-09-01 11:25

reporter   ~76839

Hello @gabrieljenik, here you are.

Example with EDGE Version 112.0.1722.48 in MS Windows:
Bowser lib shows: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48

Example with BRAVE 1.57.53, Chromium 116.0.5845.114
Bowser lib shows: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36

gabrieljenik

gabrieljenik

2023-09-01 14:21

manager   ~76842

Latest Brave browser in android is seen as Chrome, as well as Edge 107 on Windows PCs

LIbrary doesn't detect brave.
Browserleaks neither.

I understand Brave has its caveats.
Not sure what to do here.

Here is the JS related.
https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/question/browserdetect/survey/questions/answer/shortfreetext/assets/scripts/browserdetect.js
If you have any suggestion, please let me know.

ritapas

ritapas

2023-09-01 15:48

reporter   ~76845

I have no clue about Brave detection, sorry. However, Edge (and other browsers') detection could be more... wordly.

gabrieljenik

gabrieljenik

2023-09-01 16:13

manager   ~76846

Edge (and other browsers') detection could be more... wordly.

Ok, let's just make an example?
How is it coming vs expected?

ritapas

ritapas

2023-09-01 16:26

reporter   ~76847

Yes, sure.
Example with EDGE Version 112.0.1722.48 in MS Windows:
Bowser lib shows: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48
Limesurvey displays only:
Chrome (112.0)

I would expect the long string like in the Bowser lib page. But I admit maybe there's a use case in which the shorter way is better...

jelo

jelo

2023-09-01 16:27

partner   ~76848

@gabrieljenik
Not sure why this bugreport is seen as a feature request.
If you look at the note from the 17th July I get the impression that this is an faulty behavior by the code.
https://bugs.limesurvey.org/view.php?id=18775#c76110
ritapas wrote:

Example with Edge 112.0.1722.48 in MS Windows:
Browserleaks site shows:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48
Limesurvey displays only
Chrome (112.0)

Is "Chrome (112.0) the intended result? I don't think so.
I would expect "Edg/112.0.1722.48".

gabrieljenik

gabrieljenik

2023-09-01 17:56

manager   ~76854

Ohh I see.

Well, not sure what is the version to show! There is one of each kind in that line! haha

Issue History

Date Modified Username Field Change
2023-04-20 14:58 ritapas New Issue
2023-05-11 09:45 jelo Note Added: 74926
2023-05-11 09:45 jelo Bug heat 0 => 2
2023-07-07 22:33 gabrieljenik Status new => feedback
2023-07-17 16:24 ritapas Note Added: 76110
2023-07-17 16:24 ritapas Bug heat 2 => 4
2023-07-17 16:24 ritapas Status feedback => new
2023-07-17 16:24 ritapas Issue Monitored: ritapas
2023-07-17 16:24 ritapas Bug heat 4 => 6
2023-08-07 23:42 gabrieljenik Note Added: 76474
2023-08-07 23:42 gabrieljenik Bug heat 6 => 8
2023-08-07 23:42 gabrieljenik Status new => acknowledged
2023-08-09 10:53 tibor.pacalat Note Added: 76501
2023-08-09 10:53 tibor.pacalat Bug heat 8 => 10
2023-08-09 13:59 gabrieljenik Note Added: 76505
2023-08-31 18:30 gabrieljenik Note Added: 76822
2023-08-31 18:31 gabrieljenik Assigned To => gabrieljenik
2023-08-31 18:31 gabrieljenik Status acknowledged => feedback
2023-09-01 11:25 ritapas Note Added: 76839
2023-09-01 11:25 ritapas Status feedback => assigned
2023-09-01 14:21 gabrieljenik Note Added: 76842
2023-09-01 14:21 gabrieljenik Status assigned => feedback
2023-09-01 15:48 ritapas Note Added: 76845
2023-09-01 15:48 ritapas Status feedback => assigned
2023-09-01 16:13 gabrieljenik Note Added: 76846
2023-09-01 16:26 ritapas Note Added: 76847
2023-09-01 16:27 jelo Note Added: 76848
2023-09-01 17:56 gabrieljenik Note Added: 76854
2023-09-08 20:59 gabrieljenik Assigned To gabrieljenik =>
2023-09-08 21:09 gabrieljenik Status assigned => acknowledged