Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS crash when file URI contains spaces #571

Open
MarioUnlam opened this issue Nov 15, 2023 · 0 comments
Open

IOS crash when file URI contains spaces #571

MarioUnlam opened this issue Nov 15, 2023 · 0 comments

Comments

@MarioUnlam
Copy link

Hi. There seems to be a problem with file URIs containing spaces, on iOS. If there's any space in the URI, either in a subdirectory or the filename, when I try to play it, the app crashes without any JS errors. I found out what whas happening thanks to a bug report from a different library, "react-native-track-player", so it seems to be an issue with the OS. The post mentions something about encoding the URI, but it didn't work for me. If I use encodeURI, the plugin simply fails to play the audio, so I guess it needs to be fixed on the native side. More info here:

doublesymmetry/react-native-track-player#167
doublesymmetry/react-native-track-player#950

Version of react-native-audio-recorder-player

3.6.4

Version of React Native

0.70.6

Platforms you faced the error (IOS or Android or both?)

iOS

Expected behavior

Play audio file normally, regardless of path

Actual behavior

App crashes without error

Steps to reproduce the behabior

  1. Save an audio file in a folder containing spaces. For example:
    RNFS.DocumentDirectoryPath + '/My files/" + filename;
    Also happens if the filename has spaces.
  2. Try to play the audio file using audioRecorderPlayer.startPlayer()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant