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 player crash #1011

Closed
RukshanJS opened this issue Sep 24, 2021 · 5 comments
Closed

iOS player crash #1011

RukshanJS opened this issue Sep 24, 2021 · 5 comments
Labels

Comments

@RukshanJS
Copy link

RukshanJS commented Sep 24, 2021

In iOS 15 emulator, whenever try to play an audio using a (network) url, the whole flutter application crashes.

Full Description
The audioplayers play method crashses the whole flutter app in iOS when try to play a url music. This worked without such an issue before upgrading the flutter version from 2.2 to 2.5. Also, I have upgraded the xcode to the latest version 13.0. But no such issue is present and perfectly works in android without issues.

I also did flutter clean and re ran a several times, but still the issue persists in iOS.

Code to Reproduce
audioPlayer.play(url_from_network);

Logs

audioplayers/WrappedMediaPlayer.swift:224: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Lost connection to device.

Platforms

  • OS: ios
  • OS version: 15.0
  • Device: emulator/simulator.
  • flutter version: 2.5.1
  • audioplayers version: 0.20.1
  • release or not release: debug mode
  • does the error occur and does it have any peculiarities: Works without any issue on Android emulator. The issue is only with iOS.
@RukshanJS RukshanJS added the bug label Sep 24, 2021
@RukshanJS
Copy link
Author

I think the issue was with having spaces in the audio url. I'll close this once I can confirm this.

@DanielCardona
Copy link

In my case that was the problem, and make sure the file has extension, thanks RukshanJS!

@Gustl22
Copy link
Collaborator

Gustl22 commented Sep 27, 2022

Closing in favor of #748

@Gustl22 Gustl22 closed this as completed Sep 27, 2022
@ahmed-raza-92
Copy link

ahmed-raza-92 commented May 30, 2023

I am getting the same error. I don't have any space in url I checked. Using version 4.1.0 and flutter version 3.10.1.

Audi url is this: https://firebasestorage.googleapis.com/v0/b/impromptu-540e6.appspot.com/o/audios%2FDCBAB63B-A4C9-47E7-B96E-CE168C261B49.m4a?alt=media&token=abc445c2-761d-4f1b-a968-0fc660abf4ef

@Gustl22
Copy link
Collaborator

Gustl22 commented May 30, 2023

@ahmed-raza-92 if you don't have a space in url, then probably it's another issue. Feel free to open one with your url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants