-
Notifications
You must be signed in to change notification settings - Fork 856
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
bug(iOS): crash with space is in source url #748
Comments
+1 |
that file goes up to line 518, so I don't think that error is possible. probably using an outdated version? can you please try on the latest version? |
I faced this same error 'Unexpectedly found nil while unwrapping an Optional value' on iOS. The application crashes giving this same error when I start the app and it tries to resume the background music if the sound setting is set to 'on'. The app does not crash in Android but in Android also I do get an error and this is the stack trace: Error log[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(Unexpected error!, uriString, java.lang.NullPointerException: uriString Here are the details of my Dart code:
This function is called after reading the settings from local storage (if sounds are set to 'on' or 'off')
I also have a function to load the background music of the app first time the app starts which is as below:
these errors are coming with audioplayers 0.17.1 in pubspec.yaml. I tried upgrading to audioplayers 0.18.0 but that requires minsdkversion to be 23 and my current minsdkversion is 19. changing that has impacts on other supported plugins in the app so its not my preferred choice. Any suggestions on what I might be doing wrong? |
I got similar bug on iOS: |
same error |
Same error. For me, the error is because of space in the url of file. try to encode the url before sending it Maybe we can handle it in ios side in the library itself? |
+1 |
Solved using: final result = await _audioPlayer.play(Uri.encodeFull(url), position: playPosition); thank you to @umuieme |
+1 |
I am experiencing the same issue. Is there a workaround besides renaming all filenames to remove spaces? |
# Description - feat: Improved error description for unsupported file formats - fix: Handle white space and special characters in URL and Assets (Web & Darwin) - test: Test files without file extension (not playable Darwin) ## Related Issues Closes #1494 Closes #748 Closes #972 Closes #1546 --------- Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
# Description - feat: Improved error description for unsupported file formats - fix: Handle white space and special characters in URL and Assets (Web & Darwin) - test: Test files without file extension (not playable Darwin) ## Related Issues Closes #1494 Closes #748 Closes #972 Closes #1546 --------- Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com> (cherry picked from commit a4d8442)
# Description - feat: Improved error description for unsupported file formats - fix: Handle white space and special characters in URL and Assets (Web & Darwin) - test: Test files without file extension (not playable Darwin) ## Related Issues Closes #1494 Closes #748 Closes #972 Closes #1546 --------- Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
when i try to play audio i get this error and that cause crashing application:
The text was updated successfully, but these errors were encountered: