Rocket.chat.reactnative: App name and version not set for Rocket.Chats internal statistics

Created on 5 Dec 2019  ·  8Comments  ·  Source: RocketChat/Rocket.Chat.ReactNative

  • Your Rocket.Chat Experimental app version: 1.25.0.13047
  • Your Rocket.Chat server version: 2.3.0
  • Device (or Simulator) you're running with: iPad w/ iPad OS 13.2.3

The "user-agent" is working correctly (#1307) and it's showing in the webserver's log:

"RC-RN Mobile/1.25.0 (build: 13047; os: ios 13.2.3)"

And for comparison the old app:

"RC Mobile; iOS 13.2.3; v3.5.2 (262)"

But in Rocket.Chat's internal log it isn't registered correctly:

"uniqueDevicesOfYesterday": {
        "data": [
…
            {
                "count": 1,
                "name": "RC Mobile",
                "time": 89,
                "type": "mobile-app",
                "version": "3.5.0"
            },
…
            {
                "count": 8,
                "time": 838,
                "type": "mobile"
            },
…

It just shows up as type mobile without app name and version.

🍭 good first issue 🐛 bug

All 8 comments

To follow up with what I found out:

Rocket.Chat's statistic module specifically looks for 'RC Mobile' to recognize the app. [1]

But Rocket.Chat.ReactNative sets [2]:

export const headers = { 'User-Agent': `RC-RN Mobile/${ DeviceInfo.getVersion() } (build: ${ DeviceInfo.getBuildNumber() }; os: ${ Platform.OS } ${ DeviceInfo.getSystemVersion() })` };

The Swift app also uses another format [3]:

return "RC Mobile; iOS \(systemVersion); v\(appVersion) (\(bundleVersion))"

@phriedrich We're cutting version 4.2 already and we're going to release it soon.
Let's try to fix this on 4.3.
Are you willing to open a PR?
Thanks!

Yes, I can try to get a PR ready for the 4.3 release.

It works now:
Bildschirmfoto 2019-12-19 um 09 43 29

@phriedrich Do you mean on #1482, right?

Yes, after doing the changes in #1482 yesterday, today the test shows up correctly for me in the statistics.

Nice, thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sadeghpro picture sadeghpro  ·  5Comments

cygnusm picture cygnusm  ·  4Comments

ggazzo picture ggazzo  ·  6Comments

monarkh-karina picture monarkh-karina  ·  4Comments

djnews24 picture djnews24  ·  4Comments