Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Directory Picker bugged #1317

Closed
sidetraxaudio opened this issue Jul 6, 2023 · 8 comments
Closed

Windows: Directory Picker bugged #1317

sidetraxaudio opened this issue Jul 6, 2023 · 8 comments
Labels
new issue An issue that hasn't yet been seen from the maintainer stale

Comments

@sidetraxaudio
Copy link

  • Flutter (Channel beta, 3.12.0-1.1.pre, on Microsoft Windows [Version 10.0.22621.1928], locale en-AU)
  • Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.4)
  • Latest picker dep 5.3.2

Describe the bug

  • Folder picker crashes immediately on windows desktop. Code included below.

Platform

  • Desktop

Platform OS version

  • Microsoft Windows [Version 10.0.22621.1928]

How are you picking?

import 'package:flutter/material.dart';
import 'package:file_picker/file_picker.dart' as fp;

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Center(
        child: TextButton(
            onPressed: () async {
              await pickFolder();
            },
            child: const Text('PICK FOLDEER')),
      ),
    );
  }

  Future<void> pickFolder() async {
    final String bla = await fp.FilePicker.platform.getDirectoryPath() ?? 'none';
    print(bla);
  }
}

Details to reproduce the issue

  • Latest windows 11 / Latest VS / Latest flutter beta.
  • Run code and either select folder or cancel selection.
  • Lost connection to device or silent crash in release

Error Log
Lost connection to device.
Exited.

Flutter Version details
[√] Flutter (Channel beta, 3.12.0-1.1.pre, on Microsoft Windows [Version 10.0.22621.1928], locale en-AU)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.4)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.79.2)
[√] Connected device (3 available)
[√] Network resources

Additional context
Using in production project I'm working on seems to actually return and assign a value to the path var. I'm able to save the path to a config file that then allows the app to run after reloading with the selected path, however always causes a crash when selecting.

@sidetraxaudio sidetraxaudio added the new issue An issue that hasn't yet been seen from the maintainer label Jul 6, 2023
@national0587
Copy link

#1297 related.
I faced the same problem. I avoided the problem by reverting the version back to 5.3.1.

@sidetraxaudio
Copy link
Author

Thanks Inoko. I'll give that a try. I might even move to file_selector 0.9.5.
https://pub.dev/packages/file_selector

@kausikMR
Copy link

file_picker: 5.3.1, this works for me, first I was using file_picker: ^5.3.2 and I checked for my windows updates and installed them,
I am using windows 11. I tried by using just file_picker: 5.3.1 not using the "^" symbol, it works without any issues for me.

@h1542462994
Copy link

I hava also this problem, when i use version 5.3.2, it will crash after show file_picker in windows platform.

@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Jul 20, 2023
@hokaso
Copy link

hokaso commented Jul 24, 2023

My usage scenario is very special. The flet upgrade from 0.7.4 to 0.8.2 reconstructs a lot of authentication code. I have made my project compatible with the latest version, and it is impossible for them to go back to the old version... So I can only wait for the flet to upgrade to the new version, this is the only way.

@github-actions github-actions bot removed the stale label Jul 25, 2023
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

This issue is stale because it has been open for 14 days with no activity.

@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer stale
Projects
None yet
Development

No branches or pull requests

5 participants