expo: Expo-AV Sound.playAsync() doesn't work with expo-av 9.2.3 and Expo 42.0.3
Summary
I’m initialising a stock app with Managed workflow and trying to play an mp3 file using expo-av (9.2.3). I saw another issue where no sound was playing on Moto G5, Android 8. For me, sound doesn’t play for Moto G6 Android 9, iPhone SE iOS 14.6, OR on the web. App.json and package.json attached.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android, Web
SDK Version (managed workflow only)
42.0.3
Environment
Expo CLI 4.9.0 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 14.17.4 - C:\Program Files\nodejs\node.EXE npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7583922 npmPackages: expo: ~42.0.1 => 42.0.3 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
- Run
expo init my-app - Run
expo install expo-av - Add some mp3 file to the root directory. I’m using this one.
- Copy this code into
app.js
import { StatusBar } from 'expo-status-bar';
import React, { useEffect } from 'react';
import { Audio } from 'expo-av';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
useEffect(() => {
playSound()
}, []);
async function playSound() {
const sound = new Audio.Sound();
try {
await sound.loadAsync(require('./sound.mp3'));
await sound.playAsync();
await sound.unloadAsync();
} catch (error) {
console.error(error)
}
}
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
- Run
expo start - Preview on Expo Go app on Moto G6 Android 9.0, iPhone SE iOS 14.6. Or open on web by entering
wwith terminal.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 15 (2 by maintainers)
I had a similar issue, and solved it by specifying
shouldPlay: true:Source: https://stackoverflow.com/questions/65736456/expo-av-audio-not-playing-on-ios-iphone
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This problem is already solved?
I’m facing an similar issue with an Moto G7 (Android 10). Already tested on Galaxy M30 (Android 10) and couldn’t reproduce.
I’m using replaySound and sometimes it plays and others don’t.
But I’m using expo modules SDK 44 (project was created with rn cli).
I have the same issue.
Any updates? Similar issue. expo@42.0.1, expo-av@9.2.3, bare workflow. Very often short sounds (for click responds, successful/unsuccessful actions) are not playing for the first time during class component lifecycle. I’ve made listener for these sounds. During unsuccessful play “setOnPlaybackStatusUpdate” called 2 times and 5 times on successful.
Play without sound:
Successfull play:
Hi, I’m also facing this issue. Are there any updates on this?
Hey, I just wanted to let you know I’ve reproduced the issue successfully, after noticing the last Expo upgrade made sound stop working in our app. Your basic example showcases the issue perfectly.
@vgrocha Thank you for the suggestion! I hadn’t heard of those. When I just tried these, the sound still didn’t work unfortunately 😕
I believe I ran into this. Did you try
sound.replayAsync(), or setting the position before the play? I.e.