firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.44k stars 3.91k forks source link

storage: file storage with dynamic directory not visible in gcsfuse #12718

Closed appliedrd closed 1 day ago

appliedrd commented 2 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Storage

Which platforms are affected?

macOS, Windows

Description

This code saves a file to firebase storage.

Reproducing the issue

this successfully uploaded file is not visible in a gcsfuse mounted bucket on windows nor macOS.

var uid = auth.currentUser?.uid; Reference ref = FirebaseStorage.instance .ref() .child('base') .child(uid) .child('/$fileName');

try {
  await ref.putFile(file);
} on FirebaseException catch (e) {
  print(e);
  return false;
}

my workaround is to use a static directory and name the file with the uid String fName = "$uid-$filename.csv";

Reference ref = FirebaseStorage.instance
    .ref()
    .child('base')
    .child('/$fName');

Firebase Core version

2.29.0

Flutter Version

3.19.5

Relevant Log Output

flutter: F:\/sessions\2023-11-1V002\analytics-2023-11-01T000014.csv
flutter: analytics-2023-11-01T000014.csv
[ERROR:flutter/shell/common/shell.cc(1038)] The 'plugins.flutter.io/firebase_storage/taskEvent/9739f162-2314-4ecb-bac0-64b9d8fe5426' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
flutter: upload success!

Flutter dependencies

Dart SDK 3.3.3 Flutter SDK 3.19.5 docking_station_pc_app 1.0.0+1

dependencies:

dev dependencies:

transitive dependencies:

Additional context and comments

Debian GNU/Linux 12 (bookworm) on a Google Compute Engine gcsfuse version 2.0.1

The app uploads selected files to firebase storage. currently compiled and tested on Windows 10 & mac OS (latest). will eventually also run on iOS & Android.

on windows, I am using flutterfire beta for windows https://github.com/invertase/flutterfire_cli

on macOS, I am using the stadnard flutterfire

TarekkMA commented 2 weeks ago

Hello @appliedrd,

Thank you for reporting this bug. I believe the issue might not be directly related to FlutterFire, as FlutterFire primarily serves as a wrapper around the Firebase SDKs for iOS/MacOS (firebase-ios-sdk) and Windows (firebase-cpp-sdk). You might want to report this bug directly to those repositories. Alternatively, if it's relevant, you can also file the bug with gcsfuse.

Additionally, could you please provide more details about what you were trying to achieve and the steps you followed to reproduce the issue? This information will help us better understand the context and it can help us resolve the issue

google-oss-bot commented 1 week ago

Hey @appliedrd. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 day ago

Since there haven't been any recent updates here, I am going to close this issue.

@appliedrd if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.