0

I get crashes on my App. I see them in Crashlytics (couldn't reproduce on my devices).

The problem - can't create folder in External Storage using mkdirs()

Note: the code works in 99% of cases (users) and the problem appears only in 1%.

I do have a manifest permission as well I do ask for runtime permissions.

The problem appears mostly on Android 5 versions (so runtime permissions are probably not the issue)

My code:

String pathTemp = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "MyApp"
File folderTemp = new File(pathTemp);
if (!folderTemp.mkdirs() && !folderTemp.exists()) {
        throw new AssertionError("Error creating temp folder");
}

The crash statistics: enter image description here

Shmuel
  • 488
  • 1
  • 6
  • 18
  • full file system? just wild guess... – pskink Oct 18 '18 at 07:57
  • No space for an empty folder? They just installed 60MB app and has enough storage. I think it's very unlikely... – Shmuel Oct 18 '18 at 08:31
  • 1
    you dont know when it happened... maybe they then downloaded a bunch of pictures of nice looking chicks and then the error occurred? – pskink Oct 18 '18 at 08:34

0 Answers0