8000 path_provider error on iOS Simulator: "Error running pod install" · Issue #74565 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

path_provider error on iOS Simulator: "Error running pod install" #74565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BlickwinkelTour opened this issue Jan 23, 2021 · 7 comments
Closed
Labels
in triage Presently being triaged by the triage team r: solved Issue is closed as solved

Comments

@BlickwinkelTour
Copy link
BlickwinkelTour commented Jan 23, 2021

Hi,

Path_provider stops app from building on iOS Simulator. It throws an error. see full details in this post:
CocoaPods/CocoaPods#10028

I am running into the same thing and after reading a few posts about the topic where some could resove the issue by reinstalling cocoapods, this was not working for me.
The problem appears when adding path_provider as a dependency and then trying to run the app on the Simulator. I did not find a solution yet.

Steps to reporduce:

1. create a clean new flutter app with: flutter create and make sure it runs.
2. add path_provider as dependency in pubspec.
3. Rerun the app -->  Error running pod install

Thanks.

@TahaTesser
Copy link
Member

Hi @BlickwinkelTour
Just tried to reproduce on the stable, had no issues with pod install either from IDE or command line

logs
                    you can provide.
[ +259 ms] executing: xcrun simctl install DC25925E-876C-4CFE-A2F7-0640782D22A5
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/ios/iphonesimulator/Runner.app
[ +671 ms] executing: /usr/bin/plutil -convert json -o -
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/ios/iphonesimulator/Runner.app/Info.plist
[  +13 ms] Exit code 0 from: /usr/bin/plutil -convert json -o -
/Users/tahatesser/AndroidStudioProjects/stable_flutter/build/ios/iphonesimulator/Runner.app/Info.plist
[        ]
{"CFBundleName":"triage","DTXcode":"1230","DTSDKName":"iphonesimulator14.3","UILaunchStoryboardName":"LaunchScreen","CFBundleIcons~i
pad":{"CFBundlePrimaryIcon":{"CFBundleIconFiles":["AppIcon20x20","AppIcon29x29","AppIcon40x40","AppIcon60x60","AppIcon76x76","AppIco
n83.5x83.5"],"CFBundleIconName":"AppIcon"}},"DTSDKBuild":"18C61","CFBundleDevelopmentRegion":"en"
8000
,"CFBundleVersion":"1","BuildMachin
eOSBuild":"20C69","DTPlatformName":"iphonesimulator","CFBundlePackageType":"APPL","UIMainStoryboardFile":"Main","CFBundleSupportedPl
atforms":["iPhoneSimulator"],"CFBundleShortVersionString":"1.0.0","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"Runner
","DTCompiler":"com.apple.compilers.llvm.clang.1_0","UISupportedInterfaceOrientations~ipad":["UIInterfaceOrientationPortrait","UIInt
erfaceOrientationPortraitUpsideDown","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],"MinimumOSVersion
":"9.0","CFBundleIdentifier":"com.nevercode.triage","UIDeviceFamily":[1,2],"DTPlatformVersion":"14.3","CFBundleSignature":"????","CF
BundleIcons":{"CFBundlePrimaryIcon":{"CFBundleIconFiles":["AppIcon20x20","AppIcon29x29","AppIcon40x40","AppIcon60x60"],"CFBundleIcon
Name":"AppIcon"}},"DTXcodeBuild":"12C33","LSRequiresIPhoneOS":true,"UISupportedInterfaceOrientations":["UIInterfaceOrientationPortra
it","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],"UIViewControllerBasedStatusBarAppearance":false,"
NSBonjourServices":["_dartobservatory._tcp"],"DTPlatformBuild":"18C61","NSLocalNetworkUsageDescription":"Allow Flutter tools on your
computer to connect and debug your application. This prompt will not appear on release builds."}
[   +4 ms] executing: xcrun simctl launch DC25925E-876C-4CFE-A2F7-0640782D22A5 com.nevercode.triage --enable-dart-profiling
--enable-checked-mode --verify-entry-points --observatory-port=0
[ +257 ms] com.nevercode.triage: 16663
[        ] Waiting for observatory port to be available...
[ +458 ms] Observatory URL on device: http://127.0.0.1:54710/RuGSztBZOQc=/
[   +3 ms] Caching compiled dill
[ +104 ms] Connecting to service protocol: http://127.0.0.1:54710/RuGSztBZOQc=/
[   +4 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at
http://127.0.0.1:54710/RuGSztBZOQc=/.
[ +235 ms] DDS is listening at http://127.0.0.1:54712/cHUtNMCzy-4=/.
[  +70 ms] Successfully connected to service protocol: http://127.0.0.1:54710/RuGSztBZOQc=/
[  +13 ms] DevFS: Creating new filesystem on the device (null)
[  +19 ms] DevFS: Created new filesystem on the device
(file:///Users/tahatesser/Library/Developer/CoreSimulator/Devices/DC25925E-876C-4CFE-A2F7-0640782D22A5/data/Containers/Data/Applicat
ion/02E591DC-1809-4498-999C-9F299771CA69/tmp/stable_flutterTwvmlE/stable_flutter/)
[   +1 ms] Updating assets
[ +101 ms] Syncing files to device iPhone 12 Pro Max...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +4 ms] <- recompile package:triage/main.dart 80534937-066e-432a-b8e3-27a831a2db43
[        ] <- 80534937-066e-432a-b8e3-27a831a2db43
[ +157 ms] Updating files.
[        ] DevFS: Sync finished
[        ] Syncing files to device iPhone 12 Pro Max... (completed in 164ms)
[        ] Synced 0.0MB.
[   +1 ms] <- accept
[   +5 ms] Connected to _flutterView/0x7fe26c826820.
[   +1 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on iPhone 12 Pro Max is available at: http://127.0.0.1:54712/cHUtNMCzy-4=/
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety
flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 7891006299 (7 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (2 available)
    • Taha’s iPad (mobile)       • 00008020-000255113EE8402E            • ios • iOS 14.3
    • iPhone 12 Pro Max (mobile) • DC25925E-876C-4CFE-A2F7-0640782D22A5 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

! Doctor found issues in 1 category.

Can you please provide your flutter doctor -v your flutter run --verbose logs with pod install error
Thank you

@TahaTesser TahaTesser added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Jan 25, 2021
@BlickwinkelTour
Copy link
Author
BlickwinkelTour commented Jan 27, 2021

Hi, thanks for trying.

My flutter run log after pod install said there are no dependencies to install when I pod init.

Then I ran flutter pub get again and it creates a new podfile. I tried to re-run pod install or pod update.

"renek@Air-von-Rene ios % pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.

[!] The Podfile does not contain any dependencies.
renek@Air-von-Rene ios % pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.

[!] The Podfile does not contain any dependencies.
renek@Air-von-Rene ios % flutter run
Changing current working directory to: /Users/renek/Desktop/development/pathtest
Launching lib/main.dart on iPad Pro (11-inch) (2nd generation) in debug mode...
Running pod install...                                              1,0s
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         2,6s
Xcode build done.                                           13,0s
Failed to build iOS app
Error output from Xcode build:

    objc[20822]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x201f878f0) and ?? (0x1141ac2b8). One of the two will be used. Which one
    is undefined.
    objc[20822]: Class AMSupportURLSession is implemented in both ?? (0x201f87940) and ?? (0x1141ac308). One of the two will be used. Which one is
    undefined.
    ** BUILD FAILED **


Xcode's output:

    /Users/renek/Desktop/development/pathtest/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'path_provider' not found
    @import path_provider;
     ~~~~~~~^~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPad Pro (11-inch) (2nd generation)."






"enek@Air-von-Rene ios % pod install
Analyzing dependencies

Command

/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.10.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.1 (20C69)
       Xcode : 12.3 (12C33)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : 

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

Error

LoadError - dlsym(0x7f9d2a6cc6b0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/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'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

And here is flutter doctor:

flutter doctor -v
renek@Air-von-Rene ios % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-arm, locale de-DE)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
[!] Android Studio (not installed)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.
renek@Air-von-Rene ios % flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-arm, locale de-DE)
    • Flutter version 1.22.5 at /Users/renek/Desktop/development/flutter
    • Framework revision 7891006299 (7 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.


[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (1 available)
    • iPad Pro (11-inch) (2nd generation) (mobile) • 89A6D31B-8BB3-4B9A-A363-4B45FCACA2F1 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

! Doctor found issues in 2 categories.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 27, 2021
@BlickwinkelTour
Copy link
Author

this article on stackoverflow describes verymuch the same issue like I have.
I am new to iOS development also.
https://stackoverflow.com/questions/64258476/module-path-provider-not-found

@TahaTesser
Copy link
Member

Hi @BlickwinkelTour
Thanks for the logs, AMSupportURLConnectionDelegate looks like the issue is the same as #72492 but that's not the cause of the failure here.

Could you delete your Podspec and try again follow these steps

Thank you

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 28, 2021
@BlickwinkelTour
Copy link
Author

Hi @TahaTesser,
thanks for helping. Unfortunately your suggested steps cleaning everything didn´t work. It re-installed the same pod and threw the same issues.
What I did now is that I cloned the Flutter Master Repo. It then prompted me to install some arm architecture ffi package, what ever that is and then I had to re-install cocoapods.
I added path_provider to the pubspec.yaml and it works. no issues with the starter project.
I am going to convert my project now and see how it goes. Keep you postet.
Thanks again!
Best.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 3, 2021
@TahaTesser TahaTesser changed the title path_provider error on ios Simmulator: "Error running pod install" path_provider error on iOS Simulator: "Error running pod install" Feb 4, 2021
@TahaTesser
Copy link
Member

Hi @BlickwinkelTour
Given your last message I feel safe to close this issue, if the problem persists, please comment below and I will reopen it
Thank you

8000

@TahaTesser TahaTesser added the r: solved Issue is closed as solved label Feb 4, 2021
@github-actions
Copy link
github-actions bot commented Aug 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in triage Presently being triaged by the triage team r: solved Issue is closed as solved
Projects
None yet
Development

No branches or pull requests

2 participants
0