cinder92 / react-native-get-music-files

React Native package to get music files from local and sd for iOS and Android
MIT License
131 stars 65 forks source link

App crashes when using function of this package REACT NATIVE #100

Closed Furqan02 closed 1 year ago

Furqan02 commented 2 years ago

MusicFiles.getAll({ id : true, blured : false, artist : true, duration : true, //default : true cover : true, //default : true, title : true, cover : true, batchNumber : 5, //get 5 songs per batch minimumSongDuration : 10000, //in miliseconds, fields : ['title','artwork','duration','artist','genre','lyrics','albumTitle'] });

shivamgopchade commented 2 years ago

I am getting this error while I am trying to use getAll() function.Any idea??

null is not an object (evaluating 'RNReactNativeGetMusicFiles.getAll') at node_modules\react-native\node_modules\promise\setimmediate\core.js:45:6 in tryCallTwo at node_modules\react-native\node_modules\promise\setimmediate\core.js:200:22 in doResolve at node_modules\react-native\node_modules\promise\setimmediate\core.js:66:11 in Promise at node_modules\react-native\Libraries\Pressability\Pressability.js:697:17 in _performTransitionSideEffects at node_modules\react-native\Libraries\Pressability\Pressability.js:634:6 in _receiveSignal at node_modules\react-native\Libraries\Pressability\Pressability.js:528:8 in responderEventHandlers.onResponderRelease at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:93:4 in invokeGuardedCallbackProd at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:318:2 in invokeGuardedCallback at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:342:2 in invokeGuardedCallbackAndCatchFirstError at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:439:41 in executeDispatch at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:463:19 in executeDispatchesInOrder at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2563:28 in executeDispatchesAndRelease at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:1212:4 in forEachAccumulated at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2588:20 in runEventsInBatch at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2735:18 in runExtractedPluginEventsInBatch at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2681:35 in batchedUpdates$argument_0 at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18204:13 in batchedUpdates$1 at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2534:29 in batchedUpdates at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2680:16 in _receiveRootNodeIDEvent at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2800:27 in receiveTouches at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:414:4 in __callFunction at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:113:6 in guard$argument_0 at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:365:10 in guard at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:112:4 in callFunctionReturnFlushedQueue

13627491210 commented 2 years ago

How did you solve it? please tell me ,thanks

shivamgopchade commented 2 years ago

How did you solve it? please tell me ,thanks

I searched a lot on the issue but got no clue over that. So decided to use another lib https://docs.expo.dev/versions/latest/sdk/media-library/ You may refer this...

yaitskeshav commented 1 year ago

I am looking for song cover art. I got that but unable to use it in . In media-library there's no option of cover art ;)