question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] PlatformException(ERR_UNKNOWN, ERR_UNKNOWN, Prepare failed.: status=0x1)

See original GitHub issue

Flutter Sound Version :

flutter_sound 6.1.4

  • Result of the command “flutter pub deps | grep flutter_sound” (very important):
|-- flutter_sound 6.1.4
|   |-- flutter_sound_platform_interface 1.0.0

Severity

Player won’t play


Platforms you faced the error

  • Android Emulator (Pixel_2_API_29)

Logs

(This is very important. Most of the time we cannot do anything if we do not have information on your bug):

Exception has occurred. PlatformException (PlatformException(ERR_UNKNOWN, ERR_UNKNOWN, Prepare failed.: status=0x1))

E/flutter (23278): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(ERR_UNKNOWN, ERR_UNKNOWN, Prepare failed.: status=0x1)
E/flutter (23278): #0      StandardMethodCodec.decodeEnvelope 
package:flutter/…/services/message_codecs.dart:572
E/flutter (23278): #1      MethodChannel._invokeMethod 
package:flutter/…/services/platform_channel.dart:161
E/flutter (23278): <asynchronous suspension>
E/flutter (23278): #2      MethodChannel.invokeMethod 
package:flutter/…/services/platform_channel.dart:334
E/flutter (23278): #3      MethodChannelFlutterSoundPlayer.invokeMethod 
package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:168
E/flutter (23278): #4      MethodChannelFlutterSoundPlayer.startPlayer 
package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:237
E/flutter (23278): #5      FlutterSoundPlayer.startPlayer.<anonymous closure> 
package:flutter_sound/src/flutter_sound_player.dart:551
E/flutter (23278): <asynchronous suspension>
E/flutter (23278): #6      FlutterSoundPlayer.startPlayer.<anonymous closure> (package:flutter_sound/src/flutter_sound_player.dart)
E/flutter (23278): #7      BasicLock.synchronized 
package:synchronized/src/basic_lock.dart:32
E/flutter (23278): #8      FlutterSoundPlayer.startPlayer 
package:flutter_sound/src/flutter_sound_player.dart:533
E/flutter (23278): #9      PlayerScreenState._play 
[my file where I call "await _player.startPlayer(fromURI: url)"]
E/flutter (23278): <asynchronous suspension>
E/flutter (23278): #10     _PlayButton.build.<anonymous closure> 
[my file where onPressed is defined for the playback button]
E/flutter (23278): #11     _InkResponseState._handleTap 
package:flutter/…/material/ink_well.dart:992
E/flutter (23278): #12     _InkResponseState.build.<anonymous closure> 
package:flutter/…/material/ink_well.dart:1098
E/flutter (23278): #13     GestureRecognizer.invokeCallback 
package:flutter/…/gestures/recognizer.dart:184
E/flutter (23278): #14     TapGestureRecognizer.handleTapUp 
package:flutter/…/gestures/tap.dart:524
E/flutter (23278): #15     BaseTapGestureRecognizer._checkUp 
package:flutter/…/gestures/tap.dart:284
E/flutter (23278): #16     BaseTapGestureRecognizer.handlePrimaryPointer 
package:flutter/…/gestures/tap.dart:219
E/flutter (23278): #17     PrimaryPointerGestureRecognizer.handleEvent 
package:flutter/…/gestures/recognizer.dart:477
E/flutter (23278): #18     PointerRouter._dispatch 
package:flutter/…/gestures/pointer_router.dart:78
E/flutter (23278): #19     PointerRouter._dispatchEventToRoutes.<anonymous closure> 
package:flutter/…/gestures/pointer_router.dart:124
E/flutter (23278): #20     _LinkedHashMapMixin.forEach  (dart:collection-patch/compact_hash.dart:377:8))
E/flutter (23278): #21     PointerRouter._dispatchEventToRoutes 
package:flutter/…/gestures/pointer_router.dart:122
E/flutter (23278): #22     PointerRouter.route 
package:flutter/…/gestures/pointer_router.dart:108
E/flutter (23278): #23     GestureBinding.handleEvent 
package:flutter/…/gestures/binding.dart:220
E/flutter (23278): #24     GestureBinding.dispatchEvent 
package:flutter/…/gestures/binding.dart:200
E/flutter (23278): #25     GestureBinding._handlePointerEvent 
package:flutter/…/gestures/binding.dart:158
E/flutter (23278): #26     GestureBinding._flushPointerEventQueue 
package:flutter/…/gestures/binding.dart:104
E/flutter (23278): #27     GestureBinding._handlePointerDataPacket 
package:flutter/…/gestures/binding.dart:88
E/flutter (23278): #28     _rootRunUnary  (dart:async/zone.dart:1206:13))
E/flutter (23278): #29     _CustomZone.runUnary  (dart:async/zone.dart:1100:19))
E/flutter (23278): #30     _CustomZone.runUnaryGuarded  (dart:async/zone.dart:1005:7))
E/flutter (23278): #31     _invoke1  (dart:ui/hooks.dart:267:10))
E/flutter (23278): #32     _dispatchPointerDataPacket  (dart:ui/hooks.dart:176:5))
E/flutter (23278):

Describe the bug My code worked with url’s not containing colons or spaces but here I am using a url that contains a colon.

I saw a suggestion (comment https://github.com/dooboolab/flutter_sound/issues/140#issuecomment-538737638) to replace these characters with underscores but this did not work for me as the location of the colon character is in between the IP address and port number.

Format of URL I am using: "http://[IP_ADDRESS]:4001/[REST_OF_URL]". The rest of the url does not contain any colons or spaces. Just to clarify I did try "http://[IP_ADDRESS]_4001/[REST_OF_URL]" but this did not work.

If this is not a bug and it is the intended outcome then please document this.

If there is no “real solution” to this problem then any work-around to this problem would be greatly appreciated.

Please let me know if there’s any more information you need.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

4reactions
PabloduPontavicecommented, Oct 15, 2020

I managed to get it to work by adding android:usesCleartextTraffic="true" to the application tag in AndroidManifest.xml. Found the solution here: https://github.com/flutter/flutter/issues/30368#issuecomment-480300618 if anyone needs more details. Since this solves it I’m closing the issue.

1reaction
Larpouxcommented, Oct 15, 2020

Congratulations. You will probably save time to others developers 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android player raising exception prepare failed:status 0x1
prepare failed:status 0x1. is occuring because of either file path is in error or incorrect directory or Url or Uri found.
Read more >
No playback (Prepare failed.: status=0x1) · Issue #75 - GitHub
Hello, I'm using this component and it's working normally on several devices, but not on two devices with Android 10.
Read more >
Problem loading songs Prepare failed.: status =0x1 - Community
When calling MediaPlayer.Play(mysong); I get an exception "Java.IO.IOException: Prepare failed.: status=0x1" I've tried several files.
Read more >
Cisco ASR 1000 Series Aggregation Services Routers ...
Symptom: An ASR1K configured as an IPSec endpoint may fail to reassemble fragmented ESP packets. During this failure state, the router will also...
Read more >
Prepare Failed on Mediaplayer when trying to stream
for some reason every time I call prepare I get the following IOException: java.io.IOException: Prepare failed.: status=0x1
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found