React-native-vector-icons: Font failed to load, Too many arguments to block call, expected 1, have 3

Created on 11 Jul 2018  路  5Comments  路  Source: oblador/react-native-vector-icons

I am getting this error Font failed to load, Too many arguments to block call, expected 1, have 3 inside RNVectorIconsManager
However, this error did not come right after I installed the font.
I installed it using react-native link and make sure that Fonts exists in Info.plist.
This is my pod file for iOS part.

platform :ios, '9.0'

target 'JobMe' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for JobMe
  pod 'Firebase/Core'
  pod 'Firebase/Database'
  pod 'Firebase/Storage'
  pod 'Firebase/Auth'
  pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'
  pod 'FBSDKLoginKit'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  target 'JobMeTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

All 5 comments

I just had the same error.

just delete that line of code in podfile which import vector icons, other files related to podfile (pods and podfile.lock) and node modules. then re-install pod and node modules and run again. It works for me

I fixed it that way. It is silly that I have to do this every time I use the link command, because it adds it automatically.

this fix works for me and my team

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'JobMe' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
      'Core',
      'CxxBridge', # Include this for RN >= 0.47
      'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
      'RCTText',
      'RCTNetwork',
      'RCTWebSocket', # Needed for debugging
      # Add any other subspecs you want to use in your project
    ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  # Pods for JobMe

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
  'Core',
  'CxxBridge', # Include this for RN >= 0.47
  'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
  'RCTText',
  'RCTNetwork',
  'RCTWebSocket', # Needed for debugging
  'RCTAnimation', # Needed for FlatList and animations running on native UI thread
  # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'Firebase/Core'
  pod 'Firebase/Database'
  pod 'Firebase/Storage'
  pod 'Firebase/Auth'
  pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'
  pod 'FBSDKLoginKit'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'ReactNativeSearchBar', :path => '../node_modules/react-native-search-bar'

  target 'JobMeTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Part of the Podfile is from this link

Yep you're right @panteparak, this is the fix and is mentioned in README. Closing 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jakewtaylor picture jakewtaylor  路  4Comments

arjs1000 picture arjs1000  路  3Comments

fevzican picture fevzican  路  3Comments

lossen picture lossen  路  4Comments

venux92 picture venux92  路  3Comments