device-detector-js icon indicating copy to clipboard operation
device-detector-js copied to clipboard

Upgrade to latests matomo-org/device-detector version

Open jmaitrehenry opened this issue 2 years ago • 9 comments

It's would be a great move to update this lib to the latest version of matomo-org/device-detector (v4.3.1).

This should fix issues:

  • #129 (v4.3.1)
  • #114 (v4.1.0)
  • #109 (v4.1.0)
  • #137

jmaitrehenry avatar Oct 22 '21 21:10 jmaitrehenry

I just released version 3 with your recent upgrade but it doesn't seem like it fixed #129.

I updated the demo to the latest version and tried with a Chromecast user-agent and it gets detected as Chrome Webview.

etienne-martin avatar Oct 23 '21 21:10 etienne-martin

Exactly, we updated the up to 4.1.0, we need to continue the upgrade to 4.3.1. I will try to do it next week

jmaitrehenry avatar Oct 23 '21 21:10 jmaitrehenry

Just FYI @etienne-martin, @jmaitrehenry:

In case you want to easily test if an issue is also on the upstream php device-detector, you can use my site here: https://devicedetector.lw1.at

It should always return the detection results from the latest master branch of https://github.com/matomo-org/device-detector. So if the output there is wrong, then it's a bug in upstream.

Findus23 avatar Oct 25 '21 18:10 Findus23

Great, thanks @Findus23

etienne-martin avatar Oct 25 '21 18:10 etienne-martin

I'm having problems with latest FireTV 4k Max detected as a phone, seems the latest version has a fix for it, is this close to release?

dseeker avatar Dec 22 '21 16:12 dseeker

Are you getting the correct result when using this site https://devicedetector.lw1.at ?

etienne-martin avatar Dec 22 '21 16:12 etienne-martin

no, I've copied the Amazon Fire TV 4k max user agent from the web app and using an emulator it's detected as a phone image

here's the commit that fixes this issue which many of our customers are complaining about https://github.com/matomo-org/device-detector/commit/5d1fa4033214ce22806c5ff7f88589ab3c0c21d4

here's the user agent so you can test (edited, corrected) Mozilla/5.0 (Linux; Android 9; AFTKA Build/PS7255; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.118 Mobile Safari/537.36 cordova-amazon-fireos/3.4.0 AmazonWebAppPlatform/3.4.0;2.0

dseeker avatar Dec 22 '21 18:12 dseeker

The latest version of matomo works fine with this user-agent:

Gibbon/2020.2.2.0/2020.2.2.0: Netflix/2020.2.2.0 (DEVTYPE=NFANDROID2-PRV-FIRETVSTICK2018; CERTVER=0)

Found it in their test fixture.

I haven't looked at the new regex introduced by matomo-org/device-detector@5d1fa40 to see what could cause yours to fail.

Even if we were to update the library with what's currently upstream, the user-agent you provided would still fail so you can report the issue at https://github.com/matomo-org/device-detector/issues if you think there's something wrong with the detection of that user-agent.

Once the issue is fixed upstream, we'll be able to pull these changes into the library. No guarantee that this will be done quickly however.

etienne-martin avatar Dec 22 '21 22:12 etienne-martin

Mozilla/5.0 (Linux; Android 9; AFTKA Build/PS7255; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.118 Mobile Safari/537.36 cordova-amazon-fireos/3.4.0 AmazonWebAppPlatform/3.4.0;2.0 added to https://github.com/matomo-org/device-detector/pull/6969

sanchezzzhak avatar Jan 16 '22 18:01 sanchezzzhak