Skip to content

Extension crashes when invalid desktop files are configured & duplicate entries in app chooser #10

@PGupta-Git

Description

@PGupta-Git

Bug 1: Extension crashes with invalid desktop files (Critical)
Symptom: When a desktop file configured in Flickernaut doesn't exist, the extension crashes during initialisation, preventing all context menu entries from appearing in Nautilus.

Root Cause:

  • In Flickernaut/models.py line 34, Gio.DesktopAppInfo.new(app_id) returns NULL when the desktop file doesn't exist
  • This causes a TypeError: constructor returned NULL exception
  • The exception propagates up through manager.py and crashes the entire extension during initialisation
    Impact: Complete extension failure - no Flickernaut context menus appear in Nautilus
    Error log:
    Flickernaut CRITICAL : Fatal error in get_applications: constructor returned NULL
    Traceback (most recent call last):
    File "/home/user/.local/share/nautilus-python/extensions/Flickernaut/models.py", line 34, in init
    self.app_info = Gio.DesktopAppInfo.new(app_id) if app_id else None
    TypeError: constructor returned NULL

Bug 2: Duplicate entries in preferences app chooser

Symptom: When adding new applications in the Flickernaut preferences dialogue, applications with URL handler desktop files (like Positron, Antigravity, VS Code) appear twice in the list.

Root Cause:

  • Many applications create two desktop files:
    • Main app: app.desktop
    • URL handler: app-url-handler.desktop (with NoDisplay=true)
  • In prefs/application.ts, the app chooser is configured with show_all: true
  • This overrides the NoDisplay=true setting and shows hidden URL handlers as duplicate entries
    Impact: Confusing UX when adding applications to Flickernaut
    Example:
  • Positron appears twice: "Positron" and "Positron - URL Handler"
  • Antigravity appears twice: "Antigravity" and "Antigravity - URL Handler"

Steps to Reproduce

Bug 1:

  1. Configure an application in the extension and then delete the application (e.g., Install `VS-Code', configure it in the extension, uninstall VS-Code without removing the entry in the extension)
  2. Restart Nautilus
  3. Try to right-click in Nautilus → no Flickernaut menu entries appear

Bug 2:

  1. Open Flickernaut preferences
  2. Click "Add Application"
  3. Observe duplicate entries for apps like Positron, Antigravity, VS Code

Environment

  • GNOME version: 47+
  • Nautilus version: 49.2
  • Flickernaut version: 9
  • OS: Fedora 43

Fix Available

A fix has been submitted in the PR that addresses both issues:

  • Adds error handling to gracefully skip invalid desktop files
  • Changes app chooser to respect NoDisplay=true setting

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