Skip to content

"JS ERROR: TypeError: nm_dev is null" for CDC MBIM Mobile Broadband modem breaks extension #143

@szpak

Description

@szpak

After the first installation on Dell Latitude, the extension starts, but shows no interfaces, just "---' instead of speed. In the Gnome Shell logs there is:

gnome-shell[3101]: JS ERROR: TypeError: nm_dev is null
                   _retrieve_wifi_ssid@/usr/share/gnome-shell/extensions/netspeed@hedayaty.gmail.com/net_speed.js:458:13
                   _create_menu@/usr/share/gnome-shell/extensions/netspeed@hedayaty.gmail.com/net_speed.js:168:34
                   _update@/usr/share/gnome-shell/extensions/netspeed@hedayaty.gmail.com/net_speed.js:272:18

I've checked it, and the problem is caused by an interface wwp0s20f0u4c2 (renamed from wwan0) for a CDC MBIM Mobile Broadband modem (registered by the cdc_mbim driver) which doesn't have an inserted mobile card (didn't check with).

For some reasons let nm_dev = this._client.get_device_by_iface(iface); returns null which causes a null dereference.

ip reports it as:

2: wwp0s20f0u4c2: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff

It might be a problem with the NetworkManager client or its desired behavior - you know it better. Assuming the later nm_dev != null fixes the problem. In the first case, it might be also reported to the NM client team.

Gnome 41.1, gnome-shell-extension-netspeed-3.32-0.1.20211102git8638073.fc35.noarch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions