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

[BUG] mounting error #94

Closed
isaaccs opened this issue Aug 16, 2022 · 20 comments
Closed

[BUG] mounting error #94

isaaccs opened this issue Aug 16, 2022 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@isaaccs
Copy link

isaaccs commented Aug 16, 2022

Describe the bug

-v '/mnt/user/appdata/icloud-drive-sync/config.yaml':'/app/config.yaml':'rw' -v '/mnt/user/icloud-drive-sync/':'/app/icloud/':'rw' --restart always 'mandarons/icloud-drive'
63a2034e9070c6f14422ee29112f6ca48ea8d28146184a4c26d01d94866301da
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:75: mounting "/mnt/user/appdata/icloud-drive-sync/config.yaml" to rootfs at "/app/config.yaml" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

To Reproduce
It appears on Unraid

Screenshots
Capture d’écran 2022-08-16 à 23 05 27

@isaaccs isaaccs added the bug Something isn't working label Aug 16, 2022
@mandarons
Copy link
Owner

@isaaccs : Try creating config.yaml file first and then mount it on container.

@bjsharplin
Copy link

For "Config Path:"-Click Edit button-Change "Container Path", "HostPath","Default Value". When you edit the config.yaml in the console, it's /app/config.yaml.
Snag_1598d9b

@isaaccs
Copy link
Author

isaaccs commented Sep 30, 2022

Do you mean to create a folder with the config file ?

@mandarons
Copy link
Owner

Correct - as shown in installation using docker compose, it should be:

Container Path: /app/config.yaml
Host Path: /mnt/user/appdata/icloud-drive-sync/config.yaml

@bjsharplin
Copy link

Have you tried that setting? That will throw an error using unRaid docker. It seems to want to create a drive/folder not a file.

@mandarons
Copy link
Owner

No. Sorry, I never used unRaid and cannot try it on my end. Is there any other way to specify volumes in unRaid? Probably some CLI to bypass the GUI?

@isaaccs
Copy link
Author

isaaccs commented Oct 3, 2022

I changed my settings as suggested
then i put my config file in in icloud-drive-sync folder
Capture d’écran 2022-10-03 à 18 20 26
I run my docker, then open my console and run:
icloud --username= --session-directory=/app/session_data
And I have the following error
Capture d’écran 2022-10-03 à 18 21 03

@bjsharplin
Copy link

When you run this command from the console, be sure to set your icloud username after the equals sign

icloud --username=!!!!!!!!!!! --session-directory=/app/session_data

@isaaccs
Copy link
Author

isaaccs commented Oct 3, 2022

of course it's what i did

@bjsharplin
Copy link

did you update the /app/config.yaml file to include your icloud account and the icloud folders you want to sync over?

@isaaccs
Copy link
Author

isaaccs commented Oct 3, 2022

yes

@bjsharplin
Copy link

the password is stored to the keyring when you run this command. perhaps you need to run it again. it should prompt for password, ask to save to keyring, and 2fa code (if you have that turned on).

@isaaccs
Copy link
Author

isaaccs commented Oct 3, 2022

I restart my container and I have the same error

@isaaccs
Copy link
Author

isaaccs commented Oct 3, 2022

/app # icloud --list
usage: icloud [-h] [--username USERNAME] [--password PASSWORD] [-n] [--delete-from-keyring] [--list] [--llist] [--locate] [--device DEVICE_ID] [--sound]
              [--message MESSAGE] [--silentmessage SILENTMESSAGE] [--lostmode] [--lostphone LOST_PHONE] [--lostpassword LOST_PASSWORD]
              [--lostmessage LOST_MESSAGE] [--outputfile] [--session-directory SESSION_DIRECTORY] [--region REGION]
icloud: error: No username supplied

@isaaccs
Copy link
Author

isaaccs commented Oct 3, 2022

my config file

app:
  logger:
    # level - debug, info (default), warning or error
    level: "info"
    # log filename icloud.log (default)
    filename: "icloud.log"
  credentials:
    # iCloud drive username
    username: "myemail"
    # Retry login interval - default is 10 minutes
    retry_login_interval: 600
  # Drive destination
  root: "icloud"
  smtp:
    # If you want to recieve email notifications about expired/missing 2FA credentials then uncomment
    # email: "sender@test.com"
    # default to is same as email above
    # to: "receiver@test.com"
    # password:
    # host: "smtp.test.com"
    # port: 587
    # If your email provider doesn't handle TLS
    # no_tls: true
  region: global # valid values are - global (default - uses .com) or china (uses .com.cn)
drive:
  destination: "drive"
  remove_obsolete: true
  sync_interval: 3600
photos:
  destination: "photos"
  remove_obsolete: true
  sync_interval: 3600

@bjsharplin
Copy link

bjsharplin commented Oct 3, 2022

This is what my config.yaml look like. I have folders specified under the "drive" section, and "All Photos" for pictures. I did move all my folders into and "iCloud" folder to make this setup very simple, but you could list them all out. Maybe the filters section is optional??
image

@isaaccs
Copy link
Author

isaaccs commented Oct 4, 2022

I don't specify any filters because I want to backup all my iCloud data

@mandarons
Copy link
Owner

@isaaccs :
Also mount -

${PWD}/icloud/data:/app/icloud (if you want to save the iCloud data outside container)
${PWD}/session_data:/app/session_data (this will eliminate the need of entering password after container recreation)

Pleas make sure to say 'yes' to save password in keyring when you execute icloud --username=<your_email> --session-directory=/app/session_data inside the container.

@rastacalavera
Copy link

Hello!
Thank you for making this available :) I too am having an issue. I was able to get the container up and running by following some of the advice in this thread but now after authenticating, the container is just constantly restarting. Logs below:

2022-10-04T15:00:46.099738572Z 2022-10-04 15:00:46,099 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading Gnome
2022-10-04T15:00:46.120295762Z 2022-10-04 15:00:46,120 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading Google
2022-10-04T15:00:46.121924022Z 2022-10-04 15:00:46,121 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading Windows (alt)
2022-10-04T15:00:46.123806336Z 2022-10-04 15:00:46,123 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading file
2022-10-04T15:00:46.124437058Z 2022-10-04 15:00:46,124 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading keyczar
2022-10-04T15:00:46.124702569Z 2022-10-04 15:00:46,124 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading multi
2022-10-04T15:00:46.125200705Z 2022-10-04 15:00:46,125 :: INFO :: keyring.backend :: backend.py :: 154 :: Loading pyfs
2022-10-04T15:00:46.183662895Z Loading config from /app/config.yaml ...
2022-10-04T15:00:47.862400249Z Traceback (most recent call last):
2022-10-04T15:00:47.862477918Z   File "/app/./src/main.py", line 6, in <module>
2022-10-04T15:00:47.862600024Z     sync.sync()
2022-10-04T15:00:47.862647253Z   File "/app/src/sync.py", line 70, in sync
2022-10-04T15:00:47.863270602Z     sync_photos.sync_photos(config=config, photos=api.photos)
2022-10-04T15:00:47.863326126Z   File "/app/venv/lib/python3.9/site-packages/icloudpy/base.py", line 582, in photos
2022-10-04T15:00:47.864405820Z     self._photos = PhotosService(service_root, self.session, self.params)
2022-10-04T15:00:47.864448109Z   File "/app/venv/lib/python3.9/site-packages/icloudpy/services/photos.py", line 153, in __init__
2022-10-04T15:00:47.864945267Z     raise ICloudPyServiceNotActivatedException(
2022-10-04T15:00:47.865037304Z icloudpy.exceptions.ICloudPyServiceNotActivatedException: iCloud Photo Library not finished indexing. Please try again in a few minutes.

My folder structure looks like this:

drwxrwxr-x  4 tiny tiny 4096 Oct  4 14:44 .
drwxr-x--- 18 tiny tiny 4096 Oct  4 14:11 ..
-rw-rw-r--  1 tiny tiny 1381 Oct  4 14:43 config.yaml
drwxr-xr-x  2 root root 4096 Oct  4 14:39 data
-rw-rw-r--  1 tiny tiny  473 Oct  4 14:39 docker-compose.yml
-rw-rw-r--  1 tiny tiny   68 Oct  4 14:18 .env.icloud
drwxr-xr-x  2 root root 4096 Oct  4 14:44 session_data

and my compose file:

version: "3.4"
services:
  icloud:
    image: mandarons/icloud-drive
    environment:
      - PUID=1000
      - GUID=1000
    env_file:
      - .env.icloud #should contain ENV_ICLOUD_PASSWORD=<password>
    container_name: icloud
    restart: unless-stopped
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ${PWD}/config.yaml:/app/config.yaml
      - ${PWD}/data:/app/icloud
      - ${PWD}/session_data:/app/session_data

I removed the second icloud folder that was in the sample compose because i didn't want two icloud folders.

In my config.yml i commented out all of the drive stuff since I only want photos. I put in a single album name in the filter just to give things a try. Any help would be appreciated :)

@mandarons
Copy link
Owner

2022-10-04T15:00:47.865037304Z icloudpy.exceptions.ICloudPyServiceNotActivatedException: iCloud Photo Library not finished indexing. Please try again in a few minutes.

@rastacalavera : looks like server side issue. You will need to wait (not sure, how long) for server side indexing to finish.

@mandarons mandarons closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants