Closed novas1r1 closed 6 months ago
@novas1r1 I noticed your comment and I tried to reproduce the faulty behaviour but so far without success.
Just to double check - the issue is that using the following setup results in signals being set as test mode?
Telemetrydecksdk.start(
TelemetryManagerConfiguration(
appID: Config.TELEMETRYDECK_APP_ID,
testMode: false
),
);
The behaviour of the library is expected to be as follows:
testMode
, the Android-specific part of the plugin will default to testMode == false
unless the application flag ApplicationInfo.FLAG_DEBUGGABLE
is set to true. So if this is a debug build, it will be considered testMode.In other words, the following will be in test mode for builds where debugging is allowed, but not in test mode for production builds:
Telemetrydecksdk.start(
TelemetryManagerConfiguration(
appID: Config.TELEMETRYDECK_APP_ID
),
);
testMode
, the plugin respects this value when sending signals.Would it be possible to check if the android release is not configured as "debuggable"? There are several ways this may have been done, e.g., by adding <application android:debuggable="true"
to the Android manifest or by adding debuggable true
to the BuildType
configuration in gradle.
Hey @kkostov, sorry for the late response.
So in my app I tried this:
Telemetrydecksdk.start(
const TelemetryManagerConfiguration(
appID: Config.TELEMETRYDECK_APP_ID,
),
);
and this:
Telemetrydecksdk.start(
const TelemetryManagerConfiguration(
appID: Config.TELEMETRYDECK_APP_ID,
debug: false,
testMode: false,
),
);
and this:
Telemetrydecksdk.start(
const TelemetryManagerConfiguration(
appID: Config.TELEMETRYDECK_APP_ID,
debug: kDebugMode,
),
);
On iOS - everything fine:
Android is broken, all signals (not sure, if its all signals, it would have been only 3 users the past 2 weeks, which is definitely not the case as I can see from registrations in Firebase) end up in the test mode.
Not sure what else I can try here? I searched for debuggable flags, but couldn't find any. For the release versions I definitely use the --release flag to build the app.
I will try with another project as well.
I just checked it for my other app. And I have the same issue there. IOs seems fine:
Android ends up in test mode:
Same implementation like above, using the old telemetry version 0.0.5. Above I used my PR and thought I broke something, but seems not to be related.
Thanks @novas1r1 , that looks strange indeed. I will do some more testing and try to narrow it down.
@winsmith I confirmed that the Android SDK is respecting the current mode when setting the isTestMode
field. However, the following signals seem to be interpreted as test mode by the server, can you see why that could be?
[
{
"receivedAt": "2024-05-07T11:32:24.401Z",
"appID": "22385f1c-3699-4f04-9d63-24cc0b2e62d8",
"clientUser": "04f8996da763b7a969b1028ee3007569eaf3a635486ddab211d512c85b9df8fb",
"sessionID": "5db7d8f1-6307-4d8c-97e5-1c58251e30e7",
"type": "not_a_test",
"payload": [
"dartVersion:3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on 'android_arm'",
"telemetryClientVersion:Flutter 0.3.0",
"appVersion:1.0",
"systemVersion:Android SDK: 30 (11)",
"majorSystemVersion:11",
"majorMinorSystemVersion:11.0",
"locale:English (United Kingdom)",
"brand:samsung",
"targetEnvironment:gta3xlwifi",
"modelName:SM-T510 (gta3xlwifieea)",
"architecture:armv8l",
"operatingSystem:Android"
],
"isTestMode": false
},
{
"receivedAt": "2024-05-07T11:32:24.401Z",
"appID": "22385f1c-3699-4f04-9d63-24cc0b2e62d8",
"clientUser": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sessionID": "5db7d8f1-6307-4d8c-97e5-1c58251e30e7",
"type": "not_a_test",
"payload": [
"dartVersion:3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on 'android_arm'",
"telemetryClientVersion:Flutter 0.3.0",
"appVersion:1.0",
"systemVersion:Android SDK: 30 (11)",
"majorSystemVersion:11",
"majorMinorSystemVersion:11.0",
"locale:English (United Kingdom)",
"brand:samsung",
"targetEnvironment:gta3xlwifi",
"modelName:SM-T510 (gta3xlwifieea)",
"architecture:armv8l",
"operatingSystem:Android"
],
"isTestMode": false
}
]
Will do, but it'll be tomorrow. Thanks!
Oh wait I see it:
'isTestMode' needs to be a string, either "true" or "false".
A remnant of the old days when our db didn't support any other types
@novas1r1 version 0.4.0
should help address this!
Thanks a lot @kkostov - will check on friday and provide feedback :)
Hey, I just discovered all my Android signals from my app were put in my "in testing" dashboard, while all iOS signals are correctly displayed in the production board.
iOS:
Android:
Any idea why? My implementation looks as follows for both - Android and iOS:
The correct value for testMode is definitely set when sending, I double checked this.