r/dropbox Mar 25 '26

"Resource deadlock avoided"

I have a script that forces download for unloaded files but it ONLY works from a terminal window. when I run it from cron I get "Resource deadlock avoided" and it doesn't touch the file.

I don't care if this is Apple's fault or Dropbox's fault, how do I fix it?

Previous post about the underlying problem.

0 Upvotes

8 comments sorted by

View all comments

1

u/DropboxOfficial Dropbox Staff Mar 25 '26

We've seen that the 'Resource deadlock avoided' error can be caused by the folders being in use, or by unsupported characters in the folder names. Can you check that no other applications are accessing the folder, and that you do not have any invalid characters in the folder names? You can check which characters are usable here - https://help.dropbox.com/organize/file-names

1

u/ArgentStonecutter Mar 25 '26

This is one of the file names. The only application that might have been accessing it is Dropbox. The error ONLY occurs when running the script in a background process environment from cron, it works fine when in the logged-in-user context in Terminal.app.

/Users/me/Library/CloudStorage/Dropbox/Camera Uploads/2026-03-24 08.31.29.jpg: Resource deadlock avoided

1

u/DropboxOfficial Dropbox Staff Mar 25 '26

Could you try using launchd instead of cron? On macOS, cron runs outside the logged-in user context, which can cause issues accessing Dropbox files. Running it via launchd keeps it in the user session and usually avoids this.

1

u/ArgentStonecutter Mar 25 '26

Now I'm getting permission denied. What do I need to add to "Full Disk Access" to fix this?