• Bug#1101158: glib2.0: Can not open files from smb share in since 2.84.0

    From Ian Wienand@21:1/5 to All on Mon Mar 24 05:40:01 2025
    Source: glib2.0
    Version: 2.84.0-2
    Severity: normal
    X-Debbugs-Cc: ian@wienand.org

    Dear Maintainer,

    I can no longer upload files from Firefox 136.0.2 from a smb share I
    have mounted, or open them in Gimp (this is the two things I've found).

    I can enter the upload dialog, browse the file and see it, but when I
    upload it gives "The file does not have read permissions" in a modal
    (I'm sure that's a spurious error) and in the journal logs I can see

    ---
    Mar 24 15:14:30 framework firefox-bin[18770]: GFileInfo created without standard::content-type
    Mar 24 15:14:30 framework firefox-bin[18770]: file ../../../gio/gfileinfo.c: line 1821 (g_file_info_get_content_type): should not be reached
    Mar 24 15:14:30 framework firefox.desktop[18770]: [Parent 18770, Main Thread] WARNING: GFileInfo created without standard::content-type: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:201
    Mar 24 15:14:30 framework firefox.desktop[18770]: [Parent 18770, Main Thread] WARNING: file ../../../gio/gfileinfo.c: line 1821 (g_file_info_get_content_type): should not be reached: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/
    nsSigHandlers.cpp:201
    ---

    I tried with firefox-beta (137.0b9) and I get the same thing

    ---
    (firefox-beta:14257): GLib-GIO-CRITICAL **: 14:19:44.355: GFileInfo created without standard::content-type
    [Parent 14257, Main Thread] WARNING: file ../../../gio/gfileinfo.c: line 1821 (g_file_info_get_conten
  • From Ian Wienand@21:1/5 to Ian Wienand on Mon Mar 24 06:10:01 2025
    Ok, some more searching turned up

    https://gitlab.gnome.org/GNOME/eog/-/issues/312

    which describes eog crashing in a similar way when viewing images on a
    smb share, because of the meta-data returned by gvfs.

    https://gitlab.gnome.org/GNOME/gimp/-/issues/9994

    Describes a similar issue in gimp

    However, if I do

    ---
    $ gio info smb://...<file>
    ...
    attributes:
    standard::type: 1
    ...
    standard::content-type: image/jpeg
    standard::fast-content-type: image/jpeg
    ---

    it would seem that gio at least thinks it has standard::content-type

    I do probably think glib is warning here because of some other issue,
    but what that is I am open to suggestions :)

    On Mon, 24 Mar 2025 at 15:31, Ian Wienand <ian@wienand.org> wrote:

    Source: glib2.0
    Version: 2.84.0-2
    Severity: normal
    X-Debbugs-Cc: ian@wienand.org

    Dear Maintainer,

    I can no longer upload files from Firefox 136.0.2 from a smb share I
    have mounted, or open them in Gimp (this is the two things I've found).

    I can enter the upload dialog, browse the file and see it, but when I
    upload it gives "The file does not have read permissions" in a modal
    (I'm sure that's a spurious error) and in the journal logs I can see

    ---
    Mar 24 15:14:30 framework firefox-bin[18770]: GFileInfo created without standard::content-type
    M
  • From Simon McVittie@21:1/5 to Ian Wienand on Mon Mar 24 11:10:01 2025
    On Mon, 24 Mar 2025 at 15:31:24 +1100, Ian Wienand wrote:
    Mar 24 15:14:30 framework firefox-bin[18770]: GFileInfo created without standard::content-type

    It might help to upgrade gvfs to version 1.57.2-2 from unstable (you
    didn't include the versions of related packages in your bug report, so I
    can't tell whether you already have that). gvfs 1.57.2-2 fixes #1101025
    which could have an impact here.

    Or, Firefox or some component used by Firefox might be creating a
    GFileInfo without asking for it to contain the standard::content-type
    field, and then assuming that it will contain that information anyway.
    If that's the case then it's a programming error in Firefox (or in some component used by it).

    Firefox 136.0.2

    Is this the firefox package from unstable, or is it a third-party
    package from outside Debian?

    Out of interest I also tried with GTK_USE_PORTAL=1 and I see the "new"
    dialog box then, but when I try to upload it just dies with no other
    details. In the logs there is

    ---
    [Parent 22691, Main Thread] WARNING: invalid cast from 'GtkFileChooserNative' to 'GtkWindow': 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:201

    (firefox-beta:22691): GLib-GObject-CRITICAL **: 15:18:41.707: invalid cast from 'GtkFileChooserNative' to 'GtkWindow'
    [Parent 22691, Main Thread] WARNING: gtk_message_dialog_new: assertion 'parent == NULL || GTK_IS_WINDOW (parent)' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:201
    ---

    I think that might be a separate issue, just adding for completness ...

    This is a separate issue, and it is a Firefox or library bug: it's
    asking for a GtkFileChooser and assuming that the result will be a
    GtkWindow, but that is not an API guarantee (and in particular it is not
    true when using the portal-based file chooser dialogs).

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ian Wienand@21:1/5 to Simon McVittie on Mon Mar 24 12:40:01 2025
    On Mon, 24 Mar 2025 at 20:57, Simon McVittie <smcv@debian.org> wrote:

    On Mon, 24 Mar 2025 at 15:31:24 +1100, Ian Wienand wrote:
    Mar 24 15:14:30 framework firefox-bin[18770]: GFileInfo created without standard::content-type

    It might help to upgrade gvfs to version 1.57.2-2 from unstable (you
    didn't include the versions of related packages in your bug report, so I can't tell whether you already have that). gvfs 1.57.2-2 fixes #1101025
    which could have an impact here.

    Ahhh thank you! Yes, I installed this (from 1.57.2-1 testing) logged
    out and in and ... it works! So I guess this is a dup of that

    Or, Firefox or some component used by Firefox might be creating a
    GFileInfo without asking for it to contain the standard::content-type
    field, and then assuming that it will contain that information anyway.
    If that's the case then it's a programming error in Firefox (or in some component used by it).

    Firefox 136.0.2

    Is this the firefox package from unstable, or is it a third-party
    package from outside Debian?

    For reference this is the 3rd party firefox repo

    Out of interest I also tried with GTK_USE_PORTAL=1 and I see the "new" >dialog box then, but when I try to upload it just dies with no other >details. In the logs there is

    ---
    [Parent 22691, Main Thread] WARNING: invalid cast from 'GtkFileChooserNative' to 'GtkWindow': 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:201

    (firefox-beta:22691): GLib-GObject-CRITICAL **: 15:18:41.707: invalid cast from 'GtkFileChooserNative' to 'GtkWindow'
    [Parent 22691, Main Thread] WARNING: gtk_message_dialog_new: assertion 'parent == NULL || GTK_IS_WINDOW (parent)' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:201
    ---

    I think that might be a separate issue, just adding for completness ...

    This is a separate issue, and it is a Firefox or library bug: it's
    asking for a GtkFileChooser and assuming that the result will be a
    GtkWindow, but that is not an API guarantee (and in particular it is not
    true when using the portal-based file chooser dialogs).

    This also went away with the gvfs upgrade as well (also gimp, document
    viewer and a few other things that were all failing work now too, unsurprisingly). So whatever that was doing I think certainly managed
    to confuse the file choosing box in some interesting ways :)

    Thank you for the quick response, I guess this will hit testing soon enough

    -i

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)