Skip to content

Telemetry entry reporting Java NullPointerException error in deviceInfo section #304

@dianabarsan

Description

@dianabarsan

Describe the bug
I came across a telemetry entry that had this message in the device section:

"userAgent": "Mozilla/5.0 (Linux; Android 7.0; TECNO WX3P Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Crosswalk/23.53.589.4 Mobile Safari/537.36 org.livinggoods.smarthealth.region1.ug/v0.4.33",
    "deviceInfo": {
      "error": true,
      "message": "Problem fetching device info: class java.lang.NullPointerException: Attempt to invoke virtual method 'int android.net.NetworkCapabilities.getLinkDownstreamBandwidthKbps()' on a null object reference"
    },

Link to forum post sharing the full telemetry entry: https://forum.communityhealthtoolkit.org/t/error-loading-tasks/2471/9

To Reproduce
Unclear on the reproduction steps. I have tried removing sims, enabling airplane mode, enabling extreme battery saver and my test device still returned network capabilities.

Loading the CHT About page should query the cht-android getDeviceInfo.

Image

Expected behavior
Even if the device has no network capabilities, the app should not throw an error.

Development steps

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueGood for first time contributionsType: BugFix something that isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions