Skip to content
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

Could not parse Info.plist file #48

Closed
eliperkins opened this issue Mar 29, 2017 · 9 comments
Closed

Could not parse Info.plist file #48

eliperkins opened this issue Mar 29, 2017 · 9 comments

Comments

@eliperkins
Copy link

eliperkins commented Mar 29, 2017

I'm running into an issue using sentry-cli react-native-xcode with my project,

error: Could not parse Info.plist file
  caused by: missing field `CFBundleName`

My Info.plist isn't too exciting:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>CFBundleDevelopmentRegion</key>
		<string>en</string>
		<key>CFBundleExecutable</key>
		<string>$(EXECUTABLE_NAME)</string>
		<key>CFBundleIdentifier</key>
		<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
		<key>CFBundleInfoDictionaryVersion</key>
		<string>6.0</string>
		<key>CFBundleName</key>
		<string>$(PRODUCT_NAME)</string>
		<key>CFBundlePackageType</key>
		<string>APPL</string>
		<key>CFBundleShortVersionString</key>
		<string>0.0.1</string>
		<key>CFBundleSignature</key>
		<string>????</string>
		<key>CFBundleURLTypes</key>
		<array>
			<dict>
				<key>CFBundleTypeRole</key>
				<string>Editor</string>
				<key>CFBundleURLName</key>
				<string>io.clubhouse.clubhouse</string>
				<key>CFBundleURLSchemes</key>
				<array>
					<string>clubhouse</string>
				</array>
			</dict>
		</array>
		<key>CFBundleVersion</key>
		<string>21</string>
		<key>ITSAppUsesNonExemptEncryption</key>
		<false/>
		<key>LSApplicationQueriesSchemes</key>
		<array>
			<string>org-appextension-feature-password-management</string>
		</array>
		<key>LSRequiresIPhoneOS</key>
		<true/>
		<key>NSAppTransportSecurity</key>
		<dict>
			<key>NSExceptionDomains</key>
			<dict>
				<key>localhost</key>
				<dict>
					<key>NSExceptionAllowsInsecureHTTPLoads</key>
					<true/>
				</dict>
			</dict>
		</dict>
		<key>NSLocationWhenInUseUsageDescription</key>
		<string></string>
		<key>UIAppFonts</key>
		<array>
			<string>FontAwesome.ttf</string>
		</array>
		<key>UILaunchStoryboardName</key>
		<string>Launch Screen</string>
		<key>UIRequiredDeviceCapabilities</key>
		<array>
			<string>armv7</string>
		</array>
		<key>UISupportedInterfaceOrientations</key>
		<array>
			<string>UIInterfaceOrientationPortrait</string>
			<string>UIInterfaceOrientationLandscapeLeft</string>
			<string>UIInterfaceOrientationLandscapeRight</string>
		</array>
		<key>UIViewControllerBasedStatusBarAppearance</key>
		<false/>
	</dict>
</plist>

and it looks like CFBundleName is indeed in there. Flicking through the env vars, it looks like the relevant ones are set too:

...
    export INFOPLIST_FILE=Clubhouse/Info.plist
...
    export PRODUCT_NAME=Clubhouse
...

This command is a bit tricky for me to set up to debug much more than that. If there's anything I can do to help, let me know!

@eliperkins
Copy link
Author

Seems to be related to getsentry/sentry-react-native#25 as well

@eliperkins
Copy link
Author

eliperkins commented Mar 29, 2017

Nothing all that exciting from setting SENTRY_LOG_LEVEL="info" either:

[INFO] sentry_cli::commands::react_native_xcode Using react-native build script at /Users/eliperkins/src/clubhouse/mobile/ios
[INFO] sentry_cli::commands::react_native_xcode Parsing Info.plist

And that's it.

@eliperkins
Copy link
Author

eliperkins commented Mar 29, 2017

After a little spelunking, it looks like InfoPlist::discover_from_path has some quirks. Changing this usage of discover_from_path to using discover_from_env seems to make things work out alright, since the INFOPLIST_FILE env var is being passed along.

Is there a specific reason discover_from_path should be used here instead of discover_from_env? If not, I can PR that change.

@mitsuhiko
Copy link
Member

No you are right that we should probably use discover_from_env here. I will change this.

@eliperkins
Copy link
Author

Awesome! Thanks @mitsuhiko 🎉

@omaksi
Copy link

omaksi commented Aug 21, 2018

Experiencing this issue with @sentry/[email protected]

error: Could not parse Info.plist file
  caused by: missing field `CFBundleName

Any ideas?

@zazagag
Copy link

zazagag commented Feb 5, 2019

the same

@terminaltor
Copy link

Getting the same error, latest sentry-cli version...

@digitaldavenyc
Copy link

Getting this error as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants