Just_audio: Example won't build, fails with "[!] No podspec found for `just_audio_web` in `.symlinks/plugins/just_audio_web/ios`"

Created on 7 Nov 2020  Â·  10Comments  Â·  Source: ryanheise/just_audio


Which API doesn't behave as documented, and how does it misbehave?
Name here the specific methods or fields that are not behaving as documented, and explain clearly what is happening.

Minimal reproduction project
Provide a link here using one of two options:

  1. Fork this repository and modify the example to reproduce the bug, then provide a link here.
  2. If the unmodified official example already reproduces the bug, just write "The example".
    The example

To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:

  1. Click to 'New Flutter Project" in Android Studio and create a new app
  2. Add "just_audio: ^0.5.5" to the pubspec.yaml and do a pubspec get
  3. Replace lib/main.dart with the example
  4. Open ios Simulator for iPhone 12 Pro Max running ios 14.1 from xcode 12.1
  5. Run the app in the simulator
  6. xcode build fails
  7. See error

Error messages

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...                                              1.0s
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `audio_session` from `.symlinks/plugins/audio_session/ios`
    -> Fetching podspec for `just_audio` from `.symlinks/plugins/just_audio/ios`
    -> Fetching podspec for `just_audio_web` from `.symlinks/plugins/just_audio_web/ios`
    [!] No podspec found for `just_audio_web` in `.symlinks/plugins/just_audio_web/ios`

    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:901:in `fetch_external_source'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:880:in `block (2 levels) in fetch_external_sources'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:879:in `each'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:879:in `block in fetch_external_sources'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:878:in `fetch_external_sources'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/bin/pod:23:in `load'
    /usr/local/Cellar/cocoapods/1.8.4/libexec/bin/pod:23:in `<main>'

Error running pod install
Error launching application on iPhone 12 Pro Max.

Expected behavior
A clear and concise description of what you expected to happen.
The example should run

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. MacOS + version] MacOS 10.15.7
  • Browser [e.g. chrome, safari + version] Chrome

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPhone 12 Pro Max (Simulator)
  • OS: [e.g. iOS8.1] 14.1

Flutter SDK version


The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
lits-tcerven:flutter_autdio_stake tomc$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.7 19H2, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2019.2.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.34.0)

[✓] Connected device (3 available)            

! Doctor found issues in 2 categories.

Additional context
Add any other context about the problem here.

1 backlog bug

Most helpful comment

If after trying the above solution and the error still persists. This is because you don't have a valid podspec file in the just_audio_web directory.

  1. Go to the ios directory of your Flutter project.
  2. Find .symlinks > plugins > just_audio_web > ios
  3. Rename the generated podspec file to just_audio_web.podspec

I have sent a PR to fix this.

All 10 comments

I tried your reproduction steps but it worked fine for me. Can you please upgrade to the latest Flutter SDK and Xcode?

Can you confirm these reproduction steps? Does it really happen if creating a new flutter project? i.e.:

  1. Click to 'New Flutter Project" in Android Studio and create a new app

In the off chance that that's not the case, can you try cleaning your build files from Xcode?

I upgraded to the latest Flutter and xcode. I tried cleaning the build files. Same problem. I did have a similar problem with different plugin that used pods but now that one works after the flutter upgrade:

flutter --version Flutter 1.23.0-18.1.pre • channel beta • https://github.com/flutter/flutter.git Framework • revision 198df796aa (3 weeks ago) • 2020-10-15 12:04:33 -0700 Engine • revision 1d12d82d9c Tools • Dart 2.11.0 (build 2.11.0-213.1.beta)
Still, it's possible my flutter SDK is still messed. Is that the latest version?

Or my podfile is messed up. See attached Podfile.txt. Here is the error from xcode:

Showing Recent Messages /Users/tomc/projects/flutter_autdio_stake/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths
It's duplicated 4 times.

I can confirm that it doesn't happen with the standard "New Flutter Project" project. That works just fine.

I upgraded to the latest Flutter and xcode. I tried cleaning the build files. Same problem.

Did you clean through the Xcode menu or did you do flutter clean?

I can confirm that it doesn't happen with the standard "New Flutter Project" project. That works just fine.

Can you update your bug report with a valid minimal reproduction project?

I have this same issue!

I fixed it after following the steps below:

  1. Deleted the ios directory
  2. Runflutter create .
  3. Change to the ios directory (cd ios).
  4. Run pod deintegrate
  5. Run pod install

@tcerven can you confirm this?

First, in terms of cleaning the iOS build files from the Xcode menu (or running pod deintegrate/install), did that alone fix the error? Did it overcome the error but reveal a second error? If you still had an error, did flutter create . resolve it?

If after trying the above solution and the error still persists. This is because you don't have a valid podspec file in the just_audio_web directory.

  1. Go to the ios directory of your Flutter project.
  2. Find .symlinks > plugins > just_audio_web > ios
  3. Rename the generated podspec file to just_audio_web.podspec

I have sent a PR to fix this.

Thanks, @timilehinjegede I've merged your PR. Note that the existing file wasn't auto-generated, I had copied it from the url_launcher plugin which served as a template for creating a federated plugin, and did various substitutions to use the just_audio package name (but forgot the file name!). It's a weird quirk that a web plugin needs an ios directory with a podspec, although from memory that will be fixed in a future version of Flutter.

Thanks for the clarification @ryanheise!

Was this page helpful?
0 / 5 - 0 ratings