Skip to content

FilePicker.platform.pickFiles() hangs indefinitely when no compatible app is available #1850

@ale24dev

Description

@ale24dev

Description:

When calling FilePicker.platform.pickFiles() on devices that don't have any compatible file manager applications installed, the method hangs indefinitely without returning a result or throwing an exception. This creates a poor user experience as the app becomes unresponsive and users have no feedback about what's happening.

Expected Behavior

The method should either:

  • Throw an exception that can be caught and handled appropriately
  • Provide a way to check if file picking is available before attempting to open the picker

Actual Behavior

  • FilePicker.platform.pickFiles() never completes execution
  • The Future never resolves (neither success nor error)
  • No exception is thrown
  • Debugger never reaches the if (result != null) clause

Steps to Reproduce

  • Use a device/emulator without any file manager apps installed
  • Remove or disable system file managers (DocumentsUI, Files by Google, etc.)
  • Call FilePicker.platform.pickFiles()
  • Observe that the method never returns

Metadata

Metadata

Assignees

Labels

new issueAn issue that hasn't yet been seen from the maintainer

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions