docker-dropbox icon indicating copy to clipboard operation
docker-dropbox copied to clipboard

[BUG] Dropbox will rename your existing folder or file named "Dropbox" to finish installing.

Open cristianogregnanin opened this issue 3 years ago • 15 comments

Describe the bug dropbox | [ALERT]: Dropbox needs to rename your existing folder or file named Dropbox to finish installing. Please close any open documents and try again.

Versions:

  • Docker (docker --version): Docker version 20.10.12, build e91ed57
  • Docker Compose (if used) (docker-compose --version): docker-compose version 1.29.2, build 5becea4c
  • Image Name: (docker inspect --format='{{.Config.Image}}' [container name])
  • Image ID: (docker inspect --format='{{.Image}}' [container name])
  • Labels: (docker inspect --format='{{json .Config.Labels}}' [container name])

Run Command:

version: '3'
services:
  dropbox:
    restart: always
    container_name: dropbox
    network_mode: host
    environment:
      - TZ=Europe/Rome
      - DROPBOX_UID=1000
      - DROPBOX_GID=1000
    volumes:
      - ./settings:/opt/dropbox/.dropbox
      - ./data:/opt/dropbox/Dropbox
    image: otherguy/dropbox:latest

Additional context

$ docker-compose up
Creating dropbox ... done
Attaching to dropbox
dropbox    | Checking for latest Dropbox version...
dropbox    | Latest   : 153.4.3932
dropbox    | Installed: 131.4.3968
dropbox    | Downloading Dropbox 153.4.3932...
######################################################################## 100.0%
dropbox    | Installing new version...
dropbox    | Dropbox updated to v153.4.3932
dropbox    | 
dropbox    | Using Europe/Rome timezone (21:24:49 local time)
dropbox    | 
dropbox    | Current default time zone: 'Europe/Rome'
dropbox    | Local time is now:      Fri Jul 29 21:24:50 CEST 2022.
dropbox    | Universal Time is now:  Fri Jul 29 19:24:50 UTC 2022.
dropbox    | 
dropbox    | Starting dropboxd (153.4.3932)...
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/cryptography.hazmat.bindings._openssl.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/cryptography.hazmat.bindings._padding.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/psutil._psutil_linux.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/psutil._psutil_posix.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/apex._apex.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/tornado.speedups.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/wrapt._wrappers.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/cryptography.hazmat.bindings._openssl.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/cryptography.hazmat.bindings._padding.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/psutil._psutil_linux.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/psutil._psutil_posix.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/apex._apex.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/tornado.speedups.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/wrapt._wrappers.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/cryptography.hazmat.bindings._openssl.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/cryptography.hazmat.bindings._padding.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/psutil._psutil_linux.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/psutil._psutil_posix.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/apex._apex.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/tornado.speedups.cpython-38-x86_64-linux-gnu.so'
dropbox    | dropbox: load fq extension '/opt/dropbox/bin/dropbox-lnx.x86_64-153.4.3932/wrapt._wrappers.cpython-38-x86_64-linux-gnu.so'
dropbox    | This computer isn't linked to any Dropbox account...
dropbox    | Please visit https://www.dropbox.com/cli_link_nonce?nonce=5c7654f9f58b11bc425d703be2431dc7 to link this device.
dropbox    | This computer isn't linked to any Dropbox account...
dropbox    | Please visit https://www.dropbox.com/cli_link_nonce?nonce=5c7654f9f58b11bc425d703be2431dc7 to link this device.
dropbox    | This computer isn't linked to any Dropbox account...
dropbox    | Please visit https://www.dropbox.com/cli_link_nonce?nonce=5c7654f9f58b11bc425d703be2431dc7 to link this device.
dropbox    | This computer is now linked to Dropbox. Welcome 
**dropbox    | [ALERT]: Dropbox will rename your existing folder or file named "Dropbox" to finish installing.
dropbox    | [ALERT]: Dropbox needs to rename your existing folder or file named Dropbox to finish installing. Please close any open documents and try again.
dropbox    | [ALERT]: Dropbox needs to rename your existing folder or file named Dropbox to finish installing. Please close any open documents and try again.
dropbox    | [ALERT]: Dropbox needs to rename your existing folder or file named Dropbox to finish installing. Please close any open documents and try again.
dropbox    | [ALERT]: Dropbox needs to rename your existing folder or file named Dropbox to finish installing. Please close any open documents and try again.
dropbox    | [ALERT]: Dropbox needs to rename your existing folder or file named Dropbox to finish installing. Please close any open documents and try again.**

I can't find the solution.

cristianogregnanin avatar Jul 29 '22 19:07 cristianogregnanin

I'm getting this aswell

m3talstorm avatar Aug 03 '22 23:08 m3talstorm

I'm having this issue as well, if someone finds a work around please share.

noygal avatar Aug 10 '22 20:08 noygal

I was getting this when a rebuilt my computer, the work around I used was to copy the Dropbox folder from my the backup I took to my home directory. The container then started ok.

biggeeus avatar Aug 24 '22 14:08 biggeeus

Running into this same problem. Has anyone here found the solution? This is on a new install, not a backup, so there isn't an existing file I can copy over to make it work.

ColColonCleaner avatar Oct 22 '22 23:10 ColColonCleaner

Have you tried downloading your files from your Dropbox in the cloud so you have matching folder on your computer ? In essence that all is I did.

biggeeus avatar Oct 23 '22 10:10 biggeeus

I tried debugging this, but I came up short so far. It seems that something is locking the folder while Dropbox tries to rename it.

# rmdir /opt/dropbox/Dropbox/
rmdir: failed to remove '/opt/dropbox/Dropbox/': Device or resource busy

After getting lsof running in the container it spits out this:

# lsof /opt/dropbox/Dropbox/
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
docker-en    1 root  cwd    DIR    9,1     4096 94504747 /opt/dropbox/Dropbox
sleep     1260 root  cwd    DIR    9,1     4096 94504747 /opt/dropbox/Dropbox

Does the image create the /opt/dropbox/Dropbox/ folder? Maybe then the solution is to just let Dropbox create it instead.

jwueller avatar Jan 10 '23 01:01 jwueller

Hi, same error for me. I have not set UID or GID since I'm running it with my own user. I even tried to set full permission on folder (777) or try to let the container create it, nothing is working. Did someone find a solution ?

jlerebours avatar Jan 17 '23 08:01 jlerebours

I am having the same issue. Haven't found a solution yet.

kanecko avatar Jan 19 '23 13:01 kanecko

Also encountering this issue

JonBox avatar Mar 12 '23 15:03 JonBox

Same issue, is there any solution?

tuzumkuru avatar Apr 23 '23 16:04 tuzumkuru

Same issue, no solution so far?

adamkdean avatar May 04 '23 14:05 adamkdean

Same here on Debian 11

hyzteric avatar May 04 '23 19:05 hyzteric

Same issue on Unraid

Jinra avatar May 21 '23 06:05 Jinra

It seems that something is locking the folder while Dropbox tries to rename it.

This image exposes a volume for the Dropbox folder, so it is locked. You probably also had a volume mounted there - can't rename that while the container is running.

I hit this issue and was frustrated enough to work around it. See my PR for a workaround. It just changes the volumes so that Dropbox can create its own Dropbox folder. It's not a clean solution though; you may need to not mount your Dropbox folder on the first run and then recreate the container with that volume after Dropbox has finished setting up.

Hope this helps somebody. I'm up and running again at least. :)

endotronic avatar Jun 19 '23 06:06 endotronic

you may need to not mount your Dropbox folder on the first run and then recreate the container with that volume after Dropbox has finished setting up.

This is exactly what worked for me. First time start the container without mounting the volume. After having the setting-directory all set up, you can start it with the mount point of the download directory.

BoostCookie avatar Oct 07 '23 12:10 BoostCookie