quickstart-unity icon indicating copy to clipboard operation
quickstart-unity copied to clipboard

GetFileAsync with special characters not working

Open pabloleban opened this issue 5 years ago • 3 comments

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.1.8f1
  • Firebase Unity SDK version: 6.16
  • Source you installed the SDK: Unity Package Manager
  • Problematic Firebase Component: Storage
  • Other Firebase Components in use: Auth
  • Additional SDKs you are using: Discord SDK, Steamworks API
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: iOS, Android, and desktop
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? Yes. What's the issue repro rate? 100%

What happened? How can we make the problem occur? When doing GetFileAsync() to a path that contains Cylliric characters, the file is never downloaded and the tasks gives a success result with no exceptions.

storageRef.GetFileAsync("file://C:/Users/Admin/AppData/LocalLow/My Folder/Normal name/mydownloadedfile.asd"); // - Works fine
storageRef.GetFileAsync("file://C:/Users/Admin/AppData/LocalLow/My Folder/Александр/mydownloadedfile.asd"); // - Doesn't download the file

If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.

pabloleban avatar Oct 10 '20 14:10 pabloleban

As a workaround, I've ended up using GetBytesAsync() and implementing my own file creation using System.IO.

pabloleban avatar Oct 15 '20 17:10 pabloleban

Hi @pabloleban

This looks like a bug. Does this only happen to desktop build/Unity editor, or is it happening to iOS and Android build as well?

Shawn

chkuang-g avatar Oct 15 '20 22:10 chkuang-g

I haven't tested on Android nor iOS because the game uses the Persistent Data Path which is where the file is stored. On Android and iOS that path will never have cylliric characters, however some people on PC use to put their names on the Windows account, resulting in a user path of C:\Users\Александр\AppData\LocalLow\etc.. and the SDK seems to be unable to place the file there because of that.

pabloleban avatar Oct 19 '20 03:10 pabloleban