Search Issue Tracker

By Design

Votes

0

Found in

2017.3

2018.3

2019.1

2019.1.5f1

2019.2

2019.3.0a1

Issue ID

1160773

Regression

No

[Android] "System.IO.File" "WriteAllBytes()" and "WriteAllText()" does not create files

Android

-

Reproduction steps:

1. Open "Unity2019AndroidSystemIOFileWriteBug.zip" project
2. Build for Android
3. Check Logcat for "CachePath exists" and "Text file exists"
4. Notice "CachePath exists:" is "True"
5. Notice "Text file exists:" is "False"

Expected Result: "System.IO.File" "WriteAllBytes()" and "WriteAllText()" creates files and "Text file exists:" is "True"
Actual Result: "System.IO.File" "WriteAllBytes()" and "WriteAllText()" does not create files

Reproduced with: 2019.3.0a6, 2019.2.0b6, 2019.1.6f1, 2018.4.2f1, 2018.3.14f1, 2017.4.29f1

Repro Devices:
VLNQA00216, Razer Phone 2 (Phone 2), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00218, Samsung Galaxy Note9 (SM-N960U), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00124, Google Pixel 2 XL (Pixel 2 XL), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00272, Samsung Galaxy S10+ (SM-G975U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00115, Sony Xperia Z3 (D6603), Android 6.0.1, CPU: Snapdragon 801 MSM8974AC, GPU: Adreno (TM) 330
VLNQA00224, Samsung Galaxy A5(2017) (SM-A520F), Android 8.0.0, CPU: Exynos 7 Octa 7880, GPU: Mali-T830
VLNQA00098, Lge LG G4 (LG-H815), Android 6.0, CPU: Snapdragon 808 MSM8992, GPU: Adreno (TM) 418
VLNQA00109, Xiaomi MI NOTE Pro (MI NOTE Pro), Android 7.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430
VLNQA00036, Motorola Moto G (1st Gen) (XT1032), Android 5.1, CPU: Snapdragon 400 MSM8226, GPU: Adreno (TM) 305
VLNQA00031, Lge Nexus 5 (Nexus 5), Android 6.0.1, CPU: Snapdragon 800 MSM8974, GPU: Adreno (TM) 330
VLNQA00002, Samsung Galaxy S5 Neo (SM-G903F), Android 6.0.1, CPU: Exynos 7 Octa 7580, GPU: Mali-T720

  1. Resolution Note:

    Inspected device and files are being created successfully. Double checked supplied reproduction project and saw it is doing a System.IO.Directory.Exists check when looking for files, not directories. Changing this to System.IO.File.Exists fixes the problem.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.