cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox api v2 null - Do you want to allow this page to open “(null)”?

Dropbox api v2 null - Do you want to allow this page to open “(null)”?

smithmsdb
Explorer | Level 3
What would be causing my app to show "null" when running a Mac OS app called "ezReceiptMac" ? It is pointing to an existing Dropbox APP ID called "ezReceipt". My Mac OS app is sandboxed and has "Incoming" and "Outgoing" connections enabled. What else am I missing here?
 
 
ezReceipt would like access to its own folder,
Apps › ezReceipt, inside your Dropbox. Learn more
Cancel Allow
 
Do you want to allow this page to open “(null)”?

 

If I choose "Allow" no redirect occurs. 

 

Thanks in advance.

7 Replies 7

Greg-DB
Dropbox Staff
I'm not sure off hand what may be causing this. Can you share a screenshot showing this so I can make sure I understand exactly what you're seeing and try to reproduce it? Thanks in advance!

smithmsdb
Explorer | Level 3
When I try to connect my sandboxed Mac OS app called “ezReceiptMac” using my existing Dropbox APP ID for an app called “ezReceipt” the prompt shows “null” for the app’s name. 
 
I guess I would expect it to read:   Do you want to allow this page to open “ezReceiptMac.

 

Why a null value?

 

At this point when I click “Allow” it appears that the user does get logged into Dropbox but there is no indication of that other than in the Xcode console.  Shouldn’t this action redirect the user back to the app from the browser after clicking “Allow”?
 
2017-01-12 10:32:52.656498 ezReceiptMac[14086:157708] DBSDKReachability Flag Status: R ------- networkStatusForFlags
2017-01-12 10:32:59.958434 ezReceiptMac[14086:157708] -[AppDelegate handleAppleEvent:withReplyEvent:] FIRED!
2017-01-12 10:33:00.049900 ezReceiptMac[14086:157708] Success! User is logged into Dropbox.
2017-01-12 10:38:12.484242 ezReceiptMac[14086:157708] DBSDKReachability Flag Status: R ------- networkStatusForFlags
2017-01-12 10:38:36.490128 ezReceiptMac[14086:157708] -[AppDelegate handleAppleEvent:withReplyEvent:] FIRED!
2017-01-12 10:38:36.564092 ezReceiptMac[14086:157708] Success! User is logged into Dropbox.
 
Thanks

Greg-DB
Dropbox Staff
Thanks! The expected result here is that the dialog would show the app name, and clicking "Allow" would send the user back to the app.

Can you share your plist file? That controls how your app is registered for this. In particular, for the null app name issue, I think CFBundleIdentifier may be relevant.

smithmsdb
Explorer | Level 3

Yes please see the plist file below. The app id has been removed.

 

<?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>CFBundleIconFile</key>
	<string></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>1.0</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>LSMinimumSystemVersion</key>
	<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2016 RealSimple Software. All rights reserved.</string>
	<key>NSMainStoryboardFile</key>
	<string>Main</string>
	<key>NSPrincipalClass</key>
	<string>NSApplication</string>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>db-***************</string>
			</array>
			<key>CFBundleURLName</key>
			<string></string>
		</dict>
	</array>
</dict>
</plist>

Greg-DB
Dropbox Staff
Thanks! I was able to reproduce the issue by removing the value for CFBundleIdentifier. Yours is $(PRODUCT_BUNDLE_IDENTIFIER), so make sure that "Product Bundle Identifier" is set in your target's Build Settings. That's listed in the Packaging section.

smithmsdb
Explorer | Level 3

The "Product Bundle Identifier" has been set in the target's Build Settings the whole time.

Still seeing the "null" issue.

 

Greg-DB
Dropbox Staff

Thanks for checking that. It does look like that should be getting filled out then, so I'm not sure exactly what's causing it on your system. In testing this, I was actually able to get mine stuck on null as well though. I was able to fix it by:

 

  • running "Clean Build Folder" (in the Xcode "Product" menu, while holding down option)
  • running "Clean" (in the Xcode "Product" menu)
  • deleting the contents of ~/Library/Developer/Xcode/DerivedData

I believe the last step is the one that fixed it for me, but I'm listing them all just in case. It looks like I had multiple old builds in the DerivedData folder, at least one of didn't have a CFBundleIdentifier, which may been what macOS was loading for the name.

 

Can you try those?

 

Alternatively, if the issue is with your project settings somehow, you may want to try just manually filling in the CFBundleIdentifier in your plist directly, i.e., with the $() variable.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    smithmsdb Explorer | Level 3
What do Dropbox user levels mean?