Flute-Music-Player icon indicating copy to clipboard operation
Flute-Music-Player copied to clipboard

Error message : Failed to get songs: 'you don't have the user permission to access the camera'.

Open mtkgeek opened this issue 5 years ago • 2 comments

The MusicFinder.allSongs(); call is throwing the above error. The error message makes it very hard for me to debug because i see no reason why permission for camera usage should even be requested in the first place. Snippet.

Future initPlatformState() async {
 
    try {
      songs = await MusicFinder.allSongs();
    } catch (e) {
      print("Failed to get songs: '${e.message}'.");
    }

    print(songs);
    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _isLoading = false;
    });
  }`
```
    

mtkgeek avatar Aug 24 '19 10:08 mtkgeek

Seems to be an incorrect error return, should be that READ_EXTERNAL_STORAGE is not granted. On 24 Aug 2019, 11:54 +0100, mtkgeek [email protected], wrote:

The MusicFinder.allSongs(); is throwing the above error. The error message makes it very hard for me to debug because i see no reason why permission for camera usage should even be requested in the first place. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

agreensh avatar Aug 24 '19 11:08 agreensh

Yeah thanks, i thought as much but my question is how do i get it to work(fetch songs on the device)?

mtkgeek avatar Aug 24 '19 11:08 mtkgeek