`config` command throws ugly error when parsing AndroidManifest.xml fails
See original GitHub issuepod install fails when I use the boilerplate Podfile which calls for use_native_modules!. It gives me the strange error:
[!] Invalid `Podfile` file: 767: unexpected token at 'Error: Unexpected close tag
Line: 25
Column: 18
Char: >
What is file 767?
Without this my native modules are not properly installing.
React Native version:
System:
OS: macOS 10.15.1
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 1.48 GB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.12.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.2/11B52 - /usr/bin/xcodebuild
Steps To Reproduce
- Upgrade from RN 0.59.9 to RN 0.61.4
- Use boilerplate Podfile - https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.61.1/RnDiffApp/ios/Podfile
- Do a
pod repo updateand then apod install
Describe what you expected to happen:
It should install Pods per the Podfile as well as ‘use_native_modules!’
What happens when I run pod install --verbose:
error Unexpected close tag
Line: 25
Column: 18
Char: >. Run CLI with --verbose flag for more details.
[!] Invalid `Podfile` file: 767: unexpected token at 'Error: Unexpected close tag
Line: 25
Column: 18
Char: >
at error (/my/project/path/node_modules/sax/lib/sax.js:651:10)
at strictFail (/my/project/path//node_modules/sax/lib/sax.js:677:7)
at closeTag (/my/project/path/node_modules/sax/lib/sax.js:871:9)
at SAXParser.write (/my/project/path/node_modules/sax/lib/sax.js:1436:13)
at new XmlDocument (/my/project/path/node_modules/xmldoc/lib/xmldoc.js:261:15)
at readManifest (/my/project/path/node_modules/@react-native-community/cli-platform-android/build/config/readManifest.js:38:10)
at Object.projectConfig (/my/project/path/node_modules/@react-native-community/cli-platform-android/build/config/index.js:59:46)
at Object.get project [as project] (/my/project/path/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/index.js:136:50)
at /my/project/path/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/config/config.js:8:452
at Array.forEach (<anonymous>)
'.
# from /my/project/path/ios/Podfile:46
# -------------------------------------------
#
> use_native_modules!
# end
# -------------------------------------------
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:301:in `rescue in block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:295:in `block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:259:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/config.rb:200:in `podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:150:in `verify_podfile_exists!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:46: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.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Snack, code example, screenshot, or link to a repository:
My podfile:
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'MyApp' do
# Pods for MyApp
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
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 'RNFS', :path => '../node_modules/react-native-fs'
# pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
# pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'MyApp-tvOS' do
# Pods for MyApp-tvOS
target 'MyApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
What is INSTALL_PARSE_FAILED_NO_CERTIFICATES error?
I was trying to change my default/main/startup (whatever you call it) activity by editing the androidmanifest.xml file. All i did was change the...
Read more >[UTIL][NOV 24, 2022] Apktool - Tool for reverse engineering ...
I know this is just a warning message when compiling. ... droid.com/apk/res/android); using existing value in manifest. ... .android.com/apk/res/ ...
Read more >Problem modifying AndroidManifest.xml - Unity Forum
I am trying to change android:smallScreens to false to exclude devices with small screens but I am getting a build error.
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to ... Bug:300598 - "dev-perl/XML-Parser: ebuild may silently fail with distcc" ...
Read more >IntelliJ IDEA 11.1.2 Release Notes | Knowledge Base
IDEA-84017 (Bug), Command Z does not do Undo with last edits ... ZipException: duplicate entry: AndroidManifest.xml". IDEA-83502 (Bug), Android: Previous, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The problem is
<service/> ... </service>. Should be<service> ... </service>. The best we can do is to throw an informative error message. Would you like to contribute this now that you have the context? 😃The config loads iOS and Android platforms and it seems like android config resolver finds an XML that’s invalid. Can you put some console logs in the node_modules you see in the error to check what file fails to parse?