starting recording fails (silently) to create file on phone
See original GitHub issueSteps to Reproduce
- Using flutter_sound example app to start recording with path ‘/Android/data/com.myapp/files/Sounds/flutter_test/123123.mp4’
- when click start, file is not created
- async call to flutterSound.startRecord(path) fails silently
Target Platform: Android Target OS version/browser: 9 Devices: Samsung A10
Logs
12-04 10:57:08.724 30756 30775 I flutter : file created path: Android/data/com.crfhealth.umapp.um_app/files/Sounds/flutter_test/1575449828702.mp4 12-04 10:57:08.724 30756 30756 D InputTransport: Input channel constructed: fd=112 12-04 10:57:08.725 30756 30756 D ViewRootImpl@a5a837a[Toast]: setView = android.widget.FrameLayout{6f5572b V.E… …I. 0,0-0,0} TM=true MM=false 12-04 10:57:08.731 4040 25870 D RestrictionPolicy: userId: 0, isMicrophoneEnabledAsUser : true 12-04 10:57:08.731 4040 25870 D RestrictionPolicy: userId: 0 isAudioRecordAllowed : true 12-04 10:57:08.732 30756 30932 W MediaRecorder: prepare: mPath = /storage/emulated/0//storage/emulated/0/Android/data/com.myapp/files/Sounds/flutter_test/1575449405803.mp4 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: Exception: 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: java.io.FileNotFoundException: /storage/emulated/0/storage/emulated/0/Android/data/com.myapp/files/Sounds/flutter_test/1575449405803.mp4: open failed: ENOENT (No such file or directory) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at libcore.io.IoBridge.open(IoBridge.java:485) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.io.RandomAccessFile.<init>(RandomAccessFile.java:288) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.io.RandomAccessFile.<init>(RandomAccessFile.java:151) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at android.media.MediaRecorder.prepare(MediaRecorder.java:1294) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at com.dooboolab.fluttersound.FlutterSoundPlugin.startRecorder(FlutterSoundPlugin.java:167) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at com.dooboolab.fluttersound.FlutterSoundPlugin.lambda$onMethodCall$0$FlutterSoundPlugin(FlutterSoundPlugin.java:70) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at com.dooboolab.fluttersound.-$$Lambda$FlutterSoundPlugin$Uw7hmMVnMhHSlTmtp8I_WAUlmZE.run(Unknown Source:8) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at java.lang.Thread.run(Thread.java:764) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at libcore.io.Linux.open(Native Method) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:210) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: at libcore.io.IoBridge.open(IoBridge.java:471) 12-04 10:57:08.739 30756 30932 E FlutterSoundPlugin: … 11 more
flutter analyze
: no issues
flutter doctor -v
:
PS C:\dev\projects\my-app> flutter doctor -v [√] Flutter (Channel dev, v1.12.15, on Microsoft Windows [Version 10.0.18362.476], locale en-GB) • Flutter version 1.12.15 at c:\dev\env\flutter • Framework revision 459c7fb884 (8 days ago), 2019-11-26 17:04:51 +0000 • Engine revision e136d637a8 • Dart version 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at C:\dev\env\Android • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 28.0.3 • ANDROID_HOME = C:\dev\env\Android • Java binary at: C:\dev\tools\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03) • All Android licenses accepted.
[√] Android Studio (version 3.5) • Android Studio at C:\dev\tools\Android\Android Studio • Flutter plugin version 41.1.2 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code, 64-bit edition (version 1.40.2) • VS Code at C:\Program Files\Microsoft VS Code • Flutter extension version 3.6.0
[√] Connected device (1 available) • SM A105F • R38M109JEXD • android-arm • Android 9 (API 28)
Note: Same implementation works fine on Samsung A70, which seems weird… Phones do differ on target platform / architecture (a10 == armeabi-v7a, a70 == arm64-v8a)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top GitHub Comments
I’m also having the same problem.
Edit I was able to solve this be with:
Please, feel free to re-open this issue if you think it has not been fixed by recent versions