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

Lost connection to device in desktop flutter app Firebase Storage ! #12743

Closed
1 task done
Hmida71 opened this issue May 3, 2024 · 3 comments · Fixed by #12723
Closed
1 task done

Lost connection to device in desktop flutter app Firebase Storage ! #12743

Hmida71 opened this issue May 3, 2024 · 3 comments · Fixed by #12723
Assignees
Labels
platform: windows Issues / PRs which are specifically for Windows. plugin: storage resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@Hmida71
Copy link

Hmida71 commented May 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Storage

Which platforms are affected?

Windows

Description

ERORR : Service protocol connection closed.
[ +2 ms] Lost connection to device.
[ +2 ms] DevFS: Deleting filesystem on the device (file:///C:/Users/hmida/AppData/Local/Temp/elguide_logiciel68943f4b/elguide_logiciel/)
[ +266 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed

[ +4 ms] "flutter run" took 37,777ms.
[ +235 ms] ensureAnalyticsSent: 230ms
[ +1 ms] Running 1 shutdown hook
[ +15 ms] Shutdown hooks complete
[ ] exiting with code 0

Code :

Future<List<String>> uploadImages(List<File> imageFiles, String path) async {
    final imagesUrlArray = <String>[];
    for (final imageFile in imageFiles) {
      try {
        final imageName = generateUniqueFileName(imageFile);
        final uploadTask = FirebaseStorage.instance.ref('$path/$imageName').putFile(imageFile);
        final snapshot = await uploadTask;
        final imageUrl = await snapshot.ref.getDownloadURL();
        imagesUrlArray.add(imageUrl);
      } on FirebaseException catch (e) {
        debugPrint("UploadImages FirebaseException Error: $e");
      } catch (e) {
        debugPrint("UploadImages Error: $e");
      }
    }
    return imagesUrlArray;
  }

no print app closed directly !!

Reproducing the issue

Lost connection to device in desktop flutter app in Firebase Storage !
isuss in this line : final uploadTask = FirebaseStorage.instance.ref('$path/$imageName').putFile(imageFile);

Firebase Core version

2.30.1

Flutter Version

3.19.5

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

@Hmida71 Hmida71 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels May 3, 2024
@russellwheatley russellwheatley self-assigned this May 3, 2024
@russellwheatley
Copy link
Member

I have a PR for fixing some Windows Storage bugs here: #12723

It ought to fix your issues.

@russellwheatley russellwheatley added plugin: storage platform: windows Issues / PRs which are specifically for Windows. and removed Needs Attention This issue needs maintainer attention. labels May 3, 2024
@ahmeedev
Copy link

ahmeedev commented May 3, 2024

I'm Facing this same exact issue 😭

@Shuusan
Copy link

Shuusan commented May 10, 2024

It's not only in storage; I'm also facing the same issue when calling a simple get function from the cloud_firestore library, like this:

FirebaseFirestore.instance.collection('printer_properties').doc(machineName).get();

However, when I tested it on a different PC, it ran without any problems. I'm wondering if this could be related to the PC specs, or if there's something in the Windows settings that needs to be enabled.

@TarekkMA TarekkMA added the resolution: fixed A fix has been merged or is pending merge from a PR. label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: windows Issues / PRs which are specifically for Windows. plugin: storage resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
5 participants