Skip to content

Native linux portal not being called for 35 #46652

Closed

Description

@razzeee

Preflight Checklist

Electron Version

v35.1.5

What operating system(s) are you using?

Other Linux

Operating System Version

Fedora Linux 41

What arch are you using?

x64

Last Known Working Electron version

v34.5.1

Expected Behavior

Should open a window that looks like this

Image

Actual Behavior

Opens the old filechooser

Image

Testcase Gist URL

https://gist.github.com/razzeee/e65161140e825de15a3998b9ed6e1b3a

Additional Information

No response

Activity

  1. added theissue type on Apr 16, 2025
  2. added
    has-repro-gist
    on Apr 16, 2025
  3. moved this to 👀 Unsorted Items in 35-x-yon Apr 16, 2025
  4. added
    bug/regression ↩️
    on Apr 16, 2025
  5. self-assigned this
    on Apr 16, 2025
  6. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 35-x-yon Apr 16, 2025
  7. razzeee commented on Apr 28, 2025

    @razzeee
    ContributorAuthor

    @VerteDinde how doesn't this block stable? all versions after 35 seem affected too?

  8. removed their assignment
    on Apr 29, 2025
  9. VerteDinde commented on Apr 29, 2025

    @VerteDinde
    Member

    @razzeee The "blocks stable" label is just a technical distinction for the 35-x-y project board. 35.0.0 stable was already released, so it couldn't block stable; we just moved it over to that column while doing issue triage.

    With that being said, though: I just read your comment on the linked PR, did this functionality regress since Deepak's fix? If so, we can prioritize it higher. It'd be helpful if we could pinpoint where in Electron 35 this regressed specifically (i.e. if it was 35.1.5 or an earlier release in 35-x-y), I'll see if I can use your test gist to bisect

  10. razzeee commented on Apr 29, 2025

    @razzeee
    ContributorAuthor

    Yes, my understanding is, that it regressed

  11. self-assigned this
    on Apr 30, 2025
  12. added
    status/confirmed
    on Apr 30, 2025
  13. deepak1556 commented on May 2, 2025

    @deepak1556
    Member

    Started investigating this, issue regressed via https://chromium-review.googlesource.com/c/chromium/src/+/6182296. Before the change the version detection that happens on startup would be triggered, performed and completed on the dbus thread. After the change, the trigger and completion happens on the main thread (UI thread). The problem is particularly with the completion callback, if the file dialog choice is called FileDialogChoice GetFileDialogChoice before the detection completes then portal dialogs cannot be used. This is not an issue for upstream since file dialogs are not initiated until a web page requests which happens quite late in the lifecycle giving enough time for the detection to complete.

  14. deepak1556 commented on May 2, 2025

    @deepak1556
    Member
    1. We can make the detection code sync. This will impact main process application load times on linux since we ideally delay app ready till the detection completes. The detection logic first attempts to start the service if it is not already running, then proceeds to get the version information which is considerable for a sync logic.
    2. We can make only the detection code use the old path, that is the dbus thread task runner initiates and performs the detection while the rest of SelectFileDialogLinuxPortal operations like select file callsites can use the shared session bus that would start on the main thread. However, this will be race condition again just at different layer.
    3. Revert https://chromium-review.googlesource.com/c/chromium/src/+/6182296 which avoids using the shared session bus, which was the main motive to move stuff to the main thread since other clients of the shared bus expect operations to be started from the main thread. The downside is patch maintenance but will resolve this bug without any side effects or regressions.
  15. moved this to 👀 Unsorted Items in 36-x-yon May 2, 2025
  16. moved this to 👀 Unsorted Items in 37-x-yon May 2, 2025
  17. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 37-x-yon May 7, 2025
  18. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 36-x-yon May 7, 2025
  19. moved this from 👍 Does Not Block Stable to 🛠️ Fixed for Next Release in 37-x-yon May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

35-x-y36-x-y37-x-ybug 🪲bug/regression ↩️component/dialoghas-repro-gistplatform/linuxstatus/confirmed

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions