title: react-native-sqlite-storage cannot open database
body: <p>Every device we test SQLite.openDatabase on works fine except galaxy s10. I have tried every possible combination I can think of and it always just returns failed to open database. Any ideas on how to debug this? These are only a small subset of what I tried</p>
  <pre><code>SQLite.openDatabase(
      {
           name: 'my_db.db',
           createFromLocation: 1,
      },
      
      () =&gt; { 
          console.log(&quot;OPEN DATABASE SUCCESS : &quot;)
      },
      error =&gt; {
          console.log(&quot;OPEN DATABASE ERROR : &quot; + error);
      }
  );
  </code></pre>
  <p>in place of the 2 we tried 1, 3, 4, default, library, databases, /data/data/&lt;app_name&gt;/my_db.db  data/data/&lt;app_name&gt;/my_db.sqlite</p>
  <p>also tried in the formats like</p>
  <pre><code> SQLite.openDatabase({name: 'test.db', createFromLocation : path, location: 1}, this.openCB, this.errorCB);
  SQLite.openDatabase(&quot;test.db&quot;, &quot;1.0&quot;, &quot;Test Database&quot;, 200000, this.openCB, this.errorCB);
  </code></pre>
  <p>the path was tried with ~/test.db also with</p>
  <pre><code>var RNFS = require('react-native-fs');
  var path = RNFS.DocumentDirectoryPath + '/my_db.db';
  </code></pre>
  <p>And about 100 more things from every corner of the internet we could find. It should also be noted that
  RNFS.writeFile(path, ''); works totally fine. Again works on every device and emulator except galaxy s10. What stupid thing am I missing?</p>
  <p>EDIT:
  I did an output off all the react native fs locations. /data/data wasn't an options. Which is supposed to be the correct version?</p>
  <pre><code> LOG  CachesDirectoryPath /data/user/0/com.&lt;app_name&gt;/cache
   LOG  DocumentDirectoryPath /data/user/0/com.&lt;app_name&gt;/files
   LOG  DownloadDirectoryPath /storage/emulated/0/Download
   LOG  ExternalCachesDirectoryPath /storage/emulated/0/Android/data/com.&lt;app_name&gt;/cache
   LOG  ExternalDirectoryPath /storage/emulated/0/Android/data/com.&lt;app_name&gt;/files
   LOG  ExternalStorageDirectoryPath /storage/emulated/0
   LOG  FileProtectionKeys undefined
   LOG  LibraryDirectoryPath undefined
   LOG  MainBundlePath undefined
   LOG  PicturesDirectoryPath /storage/emulated/0/Pictures
   LOG  TemporaryDirectoryPath /data/user/0/com.&lt;app_name&gt;/cache
  </code></pre>
  <p>Edit2:
  I added code to first create a databases folder, then if successful try touching the database file, byt writing a file with an empty string. All of which were successfuly. But the sqlite open still fails.</p>
  <pre><code>RNFS.mkdir(DirectoryPath).then((result) =&gt; {
    console.log('Wrote folder!', result);     
    const dvfile = 'my_db.db';
    console.log(&quot;Final db location = &quot;+DirectoryPath+dvfile);
    RNFS.writeFile(DirectoryPath+dvfile, &quot;&quot;).then((result) =&gt; {
       console.log(&quot;Was able to touch db file!?\n&quot;);
        SQLite.openDatabase({name: dvfile, createFromLocation : DirectoryPath+dvfile, location: DirectoryPath+dvfile}, this.openCB, this.errorCB);
    }).catch((err) =&gt; {
       console.warn('Failed to touch the db file', err)
    })
              
  }).catch((err) =&gt; {
      console.warn('Failed to write folder', err)
   })
  </code></pre>