-
Notifications
You must be signed in to change notification settings - Fork 24k
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
wrong warnings while running pod install #34247
Comments
Sorry, but this is not a valid reproducer. Also is confusing that you mention this is happening during a Could you provide a valid repro, like a blank project with 1 dependency added that creates this problem? |
|
Hey Nicola, |
https://github.com/matinzd/rn692falsewarnings Here you are @cortinico Screen.Recording.2022-07-22.at.18.58.00.mov |
I'm also currently trying to upgrade to RN0.69 and after running pod install I saw these warnings for Android manifest file, so weird 😄 |
The error message comes from here: https://github.com/react-native-community/cli/blob/be8790f7545498ba3974fd32b9e2eeddbf7b883d/packages/cli-platform-android/src/config/getAndroidProject.ts#L39 It looks like that code reads package name from AndroidManifest.xml and passes it to a validation function. That function does not allow uppercase letters. However both the package name (https://developer.android.com/guide/topics/manifest/manifest-element.html#package) and the application id (https://developer.android.com/studio/build/application-id) are allowed to contain upper case letters. It's strange though that this validation is done during pod install... |
It happens on pod install because here |
Currently `validatePackageName` fails for package names containing uppercase letters. A message like this is shown during pod install: ``` warn Invalid application's package name "com.lugg.ReactNativeConfig" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.BV.LinearGradient" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.lugg.ReactNativeConfig" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.BV.LinearGradient" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id ``` However both the package name (https://developer.android.com/guide/topics/manifest/manifest-element.html#package) and the application id (https://developer.android.com/studio/build/application-id) are allowed to contain upper case letters. This change adds the "i" flag to the regex to ignore case when validating package name. Related issue: facebook/react-native#34247
PR for fixing the validation function: react-native-community/cli#1660 |
Thanks @mlazari for the PR! I will close the issue as soon as it got merged and cli updated in main react-native repo! |
* Ignore case in validatePackageName Currently `validatePackageName` fails for package names containing uppercase letters. A message like this is shown during pod install: ``` warn Invalid application's package name "com.lugg.ReactNativeConfig" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.BV.LinearGradient" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.lugg.ReactNativeConfig" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.BV.LinearGradient" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id ``` However both the package name (https://developer.android.com/guide/topics/manifest/manifest-element.html#package) and the application id (https://developer.android.com/studio/build/application-id) are allowed to contain upper case letters. This change adds the "i" flag to the regex to ignore case when validating package name. Related issue: facebook/react-native#34247 * Add tests for validatePackageName
* Ignore case in validatePackageName Currently `validatePackageName` fails for package names containing uppercase letters. A message like this is shown during pod install: ``` warn Invalid application's package name "com.lugg.ReactNativeConfig" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.BV.LinearGradient" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.lugg.ReactNativeConfig" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id warn Invalid application's package name "com.BV.LinearGradient" in 'AndroidManifest.xml'. Read guidelines for setting the package name here: https://developer.android.com/studio/build/application-id ``` However both the package name (https://developer.android.com/guide/topics/manifest/manifest-element.html#package) and the application id (https://developer.android.com/studio/build/application-id) are allowed to contain upper case letters. This change adds the "i" flag to the regex to ignore case when validating package name. Related issue: facebook/react-native#34247 * Add tests for validatePackageName
Thanks for the report @matinzd and thanks for following up on the CLI. I'm glad this got sorted out and solved. I'm closing it now as we're trying to reduce the # of opened issues we have, specifically if they involve other tools (such as the CLI). |
You are welcome! |
Description
While running
pod install
on 0.69.2 there are many unrelated warnings from android in the console:Version
0.69.2
Output of
npx react-native info
System:
OS: macOS 12.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 45.41 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
Yarn: 1.22.18 - ~/w/dietdoctor/rnapp/node_modules/.bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
Watchman: 2022.05.16.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/matin/.rvm/gems/ruby-3.0.2/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 31.0.0
System Images: android-27 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play ARM 64 v8a, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64, android-31 | Google APIs Intel x86 Atom_64, android-S | Google Play Intel x86 Atom_64
Android NDK: 23.0.7344513-beta4
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.10 - /usr/local/opt/openjdk@11/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.2 => 0.69.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Snack, code example, screenshot, or link to a repository
https://github.com/matinzd/rn692falsewarnings
The text was updated successfully, but these errors were encountered: