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]:Cannot run Flutter 2.5 app on simulator with flutter_sound

See original GitHub issue

Flutter Sound Version : flutter_sound 8.14 through 8.3.12 (I’ve tried various versions)

  • FULL

  • Important: Result of the command : flutter pub deps | grep flutter_sound FINE: Pub 2.14.2 | |-- flutter_sound 8.3.12 | | |-- flutter_sound_platform_interface 8.3.12 | | |-- flutter_sound_web 8.3.12 | | | |-- flutter_sound_platform_interface…


Severity

  • Cannot build my App

Platforms you faced the error

  • iOS Simulator Version 12.5.1 (961.1)

Describe the bug When I build a flutter app using flutter 2.5.1 and I include flutter_sound, the app will not run on the simulator using the flutter run command. However, if I use flutter run and direct execution to a physical device it does run.

Furthermore, if I run the app from XCode and target the simulator it will run.

I have been using flutter_sound for about a year on other versions of flutter, however, when I upgraded to flutter 2.5 this started happening. I then rolled back to flutter 2.1.3 and the issue stopped occurring. After upgrading to flutter 2.5 again the issue started occurring again.

I have been through many many cycles of deleting caches, DerivedData, flutter clean, etc. etc. to no avail.

To Reproduce Steps to reproduce the behavior:

  1. Create a new counter app (default flutter app)
  2. Add flutter_sound 8.3.12 to the Pubspec.yaml file
  3. Build the file using flutter run and target the iOS simulator.
  4. Below is a preview of the output, look at the attached log for the full verbose output:

(notice the references to mobile-ffmpeg-audio and building for iOS Simulator):

/Users/keithblack/Library/Developer/Xcode/DerivedData/Runner-gejpisazgavnwcdkopckhpbmbxgn/Build/Intermediates.noin
                            dex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/arm64/Binary/Runner
                        ld: in
/Users/keithblack/GitHub/flutter_application_1/ios/Pods/mobile-ffmpeg-audio/lame.framework/lame(VbrTag.o),
                        building for iOS Simulator, but linking in object file built for iOS, file
                        '/Users/keithblack/GitHub/flutter_application_1/ios/Pods/mobile-ffmpeg-audio/lame.framework/lame'
for architecture
                        arm64
                        clang: error: linker command failed with exit code 1 (use -v to see invocation)
                    
                    
[+4734 ms] Could not build the application for the simulator.
[   +3 ms] Error launching application on iPhone 12 Pro.
[   +5 ms] "flutter run" took 49,727ms.
[   +7 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure>
           (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:92:3)
           <asynchronous suspension>
           
           
[  +63 ms] ensureAnalyticsSent: 61ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

flutter_sound_example_build_log.txt

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:23

github_iconTop GitHub Comments

7reactions
huanliruicommented, Oct 21, 2021

I solved this problem. It doesn’t seem to be flutter_sound problem, configure the following in the IOS project:

  1. Podfile specifies IOS SDK 10.0
  2. in my app/extension targets, to add “arm64” to the Excluded Architectures build setting when building for the simulator (as your preview appears to be trying to do),
  3. and setting “Build Active Architecture Only” to No for all schemes. Might be worth a try.
1reaction
lekeCodercommented, Oct 20, 2021

l had the same issue and when l switch the channel to beta and upgraded, worked fine. So you may need to switch channel to beta

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot run Flutter application on iOS simulator / Command ...
I make Flutter app. and then recently it happens cannot to run appication on iOS simulater. I guess the reason is Xcode upgrade...
Read more >
How to Run Flutter App on Android Emulator and iOS Simulator
How to Run Flutter App on Android Emulator and iOS Simulator - 07 - Flutter App Dev TutorialHello guys, welcome back, so in...
Read more >
Running Flutter App on Simulator - YouTube
Running Flutter App on iOS Simulator. ... Flutter Tutorial - How To Run App On Real iOS Device/iPhone [2021] Screen Mirroring Flutter App....
Read more >
flutter_sound | Flutter Package - Pub.dev
Record audio using the builtin SoundRecorderUI Widget. Roll your own Recording UI utilising the Flutter Sound api. Support for releasing/resuming resources when ...
Read more >
IntelliJ IDEA 2021.2: Can't attach Flutter debugger to iOS ...
... I'm running a Flutter version from Channel dev, 2.5.0-1.0.pre. Now I can run my Flutter app from IntelliJ on an iOS device/simulator, ......
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