Open Exoplanetarium opened 4 weeks ago
[Error: expectedPoints is zero, cannot perform division] received when using path that has been downloaded from remote URI:
[Error: expectedPoints is zero, cannot perform division]
const remoteUri = 'https://example.com/test_audio.mp3'; const localUri = FileSystem.documentDirectory + 'test_audio.mp3'; ... useEffect(() => { const downloadFile = async () => { try { const { uri } = await FileSystem.downloadAsync(remoteUri, localUri); console.log('File downloaded to:', uri); setFileExists(true); startPlayer(); } catch (error) { console.error('Error downloading file:', error); } }; }, []);
where localUri is passed to the path prop. I'm using a bare javascript react-native setup (recently ejected from expo). I have confirmed that the file does exist both in the local and remote form.
localUri
path
Hi @Exoplanetarium Thank you for using this library and reporting this issue, Could you please share the complete localUri?
[Error: expectedPoints is zero, cannot perform division]
received when using path that has been downloaded from remote URI:where
localUri
is passed to thepath
prop. I'm using a bare javascript react-native setup (recently ejected from expo). I have confirmed that the file does exist both in the local and remote form.