Network applet: clicking "Mobile Broadband" throws "array element (type filename) may not be null" for modems with no device path (MBIM/eSIM)

Open Beginner friendly
#13,885 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
javascript

Research direction

Read _createAutomaticConnection() in files/usr/share/cinnamon/applets/network@cinnamon.org/applet.js and trace how the mobile broadband item opens cinnamon-settings. Reproduce the null-path case if available, then ensure it falls back to opening the network panel without passing a null argument to Util.spawn().

Written by the indexing model from the issue text.

Description

Cinnamon version: 6.6.7
Distro: Linux Mint 22.3 (Zena)

Description

Clicking the auto-connect item for a mobile broadband (WWAN) device in the network applet raises an error notification:

Execution of 'cinnamon-settings' failed: array element (type filename) may not be null

Cause

NMDeviceModem._createAutomaticConnection() in files/usr/share/cinnamon/applets/network@cinnamon.org/applet.js does:

Util.spawn(['cinnamon-settings', 'network',
            'connect-3g', this.device.get_path()]);

For some modems NM.Device.get_path() returns null. This happens with MBIM / eSIM modems that do not expose a udev hardware path — e.g. a Dell Snapdragon X62 5G on the mhi-pci-generic driver. nmcli reports a valid D-Bus path (/org/freedesktop/NetworkManager/Devices/7), but libnm's get_path() returns null, whereas ethernet/wifi return their udev path (pci-0000:00:14.3).

Passing that null into Util.spawn() makes GLib.spawn_async() throw array element (type filename) may not be null, which _handleSpawnError() surfaces as the notification above.

Steps to reproduce
  1. Have a WWAN/modem device whose NM.Device.get_path() returns null (MBIM/eSIM).
  2. Open the network applet menu and click the mobile broadband auto-connect item.
  3. Observe the error notification instead of the network panel opening.
Fix

Guard against a null path before spawning; fall back to opening the network panel when no path is available. PR incoming.

Dominant language
JavaScript
Stars
5.6k
Forks
915
Avg merge
5d 22h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/cinnamon

All issues in linuxmint/cinnamon

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.