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

fix(storage, windows): Reference.putData does not work as expected on Windows #12604

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

espresso3389
Copy link

@espresso3389 espresso3389 commented Apr 8, 2024

Description

Reference.putData writes some garbage on Firebase Storage.

The reason behind the issue is that:

  • FirebaseStoragePlugin::ReferencePutData/FirebaseStoragePlugin::ReferencePutString passes wrong byte sequence/size to PutDataStreamHandler
  • PutDataStreamHandler does not keep the actual data but just a dangling pointer

Related Issues

Checklist

For Windows, there seems almost no tests. How should I start testing with the current situation???

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@russellwheatley
Copy link
Member

russellwheatley commented Apr 26, 2024

@espresso3389 - Thank you for this. Could you merge this with master and we can look to to get this merged?

We don't currently have integration tests for Windows storage as their is no emulator available on the C++ SDK. We make it clear on the README windows is not production ready.

@espresso3389
Copy link
Author

@russellwheatley I've merged the latest master commit. Could you take a look?

@russellwheatley
Copy link
Member

russellwheatley commented Apr 30, 2024

Hey @espresso3389 - there's quite a few things I found not working as intended on Storage windows and I'm going to be fixing them and adding e2e tests 🤞 (Going to use live Firebase project). It is work in progress but here is my PR if you want to track progress: #12723

Thank you for bringing this issue to my attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants