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] retry_login_interval: -1 not working #247

Closed
nicx opened this issue Jul 22, 2024 · 3 comments · Fixed by #248
Closed

[BUG] retry_login_interval: -1 not working #247

nicx opened this issue Jul 22, 2024 · 3 comments · Fixed by #248
Assignees
Labels
bug Something isn't working

Comments

@nicx
Copy link

nicx commented Jul 22, 2024

When configuring retry_login_interval: -1 I'll get the reauthentification every 1s instead of stopping the container after not reauthenticating. Using version 1.20.0

config:

app:
  logger:
    # level - debug, info, warning (default) or error
    level: "warning"
    # log filename icloud.log (default)
    filename: "/config/icloud.log"
  credentials:
    # iCloud drive username
    username: "***"
    # Retry login interval - default is 10 minutes (600)
    retry_login_interval: -1
  # Drive destination
  root: "/icloud"

logfile:

2024-07-22 11:53:49,792 :: ERROR :: icloudpy.base :: base.py :: 186 :: Authentication required for Account. (421)
2024-07-22 11:53:51,503 :: ERROR :: root :: sync.py :: 100 :: Error: 2FA is required. Please log in.
2024-07-22 11:53:51,503 :: INFO :: root :: config_parser.py :: 69 :: Retrying login every -1 seconds.
2024-07-22 11:53:51,503 :: INFO :: root :: sync.py :: 107 :: retry_login_interval is < 0, exiting ...
2024-07-22 11:53:54,284 :: ERROR :: icloudpy.base :: base.py :: 186 :: Authentication required for Account. (421)
2024-07-22 11:53:55,829 :: ERROR :: root :: sync.py :: 100 :: Error: 2FA is required. Please log in.
2024-07-22 11:53:55,829 :: INFO :: root :: config_parser.py :: 69 :: Retrying login every -1 seconds.
2024-07-22 11:53:55,829 :: INFO :: root :: sync.py :: 107 :: retry_login_interval is < 0, exiting ...
2024-07-22 11:53:59,739 :: ERROR :: icloudpy.base :: base.py :: 186 :: Authentication required for Account. (421)
2024-07-22 11:54:01,531 :: ERROR :: root :: sync.py :: 100 :: Error: 2FA is required. Please log in.
2024-07-22 11:54:01,531 :: INFO :: root :: config_parser.py :: 69 :: Retrying login every -1 seconds.
2024-07-22 11:54:01,531 :: INFO :: root :: sync.py :: 107 :: retry_login_interval is < 0, exiting ...
2024-07-22 11:54:04,274 :: ERROR :: icloudpy.base :: base.py :: 186 :: Authentication required for Account. (421)
2024-07-22 11:54:05,878 :: ERROR :: root :: sync.py :: 100 :: Error: 2FA is required. Please log in.
2024-07-22 11:54:05,878 :: INFO :: root :: config_parser.py :: 69 :: Retrying login every -1 seconds.
2024-07-22 11:54:05,878 :: INFO :: root :: sync.py :: 107 :: retry_login_interval is < 0, exiting ...
2024-07-22 11:54:08,645 :: ERROR :: icloudpy.base :: base.py :: 186 :: Authentication required for Account. (421)
2024-07-22 11:54:10,440 :: ERROR :: root :: sync.py :: 100 :: Error: 2FA is required. Please log in.
2024-07-22 11:54:10,440 :: INFO :: root :: config_parser.py :: 69 :: Retrying login every -1 seconds.
2024-07-22 11:54:10,440 :: INFO :: root :: sync.py :: 107 :: retry_login_interval is < 0, exiting ...

@nicx nicx added the bug Something isn't working label Jul 22, 2024
@tymmej
Copy link
Contributor

tymmej commented Jul 26, 2024

sync_interval=-1 also does not work currently:

2024-07-26 12:12:44,498 :: INFO :: root :: sync.py :: 89 :: Syncing photos...                                         
2024-07-26 12:12:45,432 :: WARNING :: root :: config_parser.py :: 326 :: photos > filters > albums not found. Downloading all albums ...                                                                                                    
2024-07-26 12:12:45,433 :: WARNING :: root :: config_parser.py :: 360 :: photos > filters > extensions not found. Downloading all extensions ...                                                                                            
2024-07-26 12:12:45,434 :: INFO :: root :: config_parser.py :: 109 :: Syncing all albums.                             
2024-07-26 12:12:45,434 :: INFO :: root :: config_parser.py :: 397 :: Using format %Y/%m.                             
2024-07-26 12:12:47,447 :: INFO :: root :: sync_photos.py :: 175 :: Syncing All Photos                                
2024-07-26 12:18:07,784 :: INFO :: root :: sync.py :: 91 :: Photos synced                                             
2024-07-26 12:18:07,785 :: INFO :: root :: config_parser.py :: 99 :: Syncing photos every -1 seconds.                 
2024-07-26 12:18:07,785 :: INFO :: root :: sync.py :: 155 :: Resyncing at Fri Jul 26 12:18:06 2024 ...                
2024-07-26 12:18:07,786 :: INFO :: root :: config_parser.py :: 99 :: Syncing photos every -1 seconds.                 
2024-07-26 12:18:11,388 :: INFO :: root :: sync.py :: 89 :: Syncing photos...                                         
2024-07-26 12:18:12,216 :: WARNING :: root :: config_parser.py :: 326 :: photos > filters > albums not found. Downloading all albums ...                                                                                                    
2024-07-26 12:18:12,217 :: WARNING :: root :: config_parser.py :: 360 :: photos > filters > extensions not found. Downloading all extensions ...                                                                                            
2024-07-26 12:18:12,217 :: INFO :: root :: config_parser.py :: 109 :: Syncing all albums.                             
2024-07-26 12:18:12,217 :: INFO :: root :: config_parser.py :: 397 :: Using format %Y/%m

I have suspicion that app closes correctly, but something reopens it.

root@40097ea44cb6:/app# pstree -p # first sync
s6-svscan(1)-+-s6-supervise(15)---s6-linux-init-s(17)
             |-s6-supervise(35)---s6-ipcserverd(46)
             |-s6-supervise(36)
             |-s6-supervise(37)---busybox(137)
             `-s6-supervise(38)---init.sh(136)---python(141)
root@40097ea44cb6:/app# pstree -p # second sync
s6-svscan(1)-+-s6-supervise(15)---s6-linux-init-s(17)
             |-s6-supervise(35)---s6-ipcserverd(46)
             |-s6-supervise(36)
             |-s6-supervise(37)---busybox(137)
             `-s6-supervise(38)---init.sh(191)---python(193)

@nicx
Copy link
Author

nicx commented Jul 28, 2024

@mandarons unfortunately I get the following error with the new version:

s6-rc-compile: fatal: unable to open /etc/s6-overlay/s6-rc.d/svc-icd/up: No such file or directory
s6-rc: fatal: unable to take locks: No such file or directory
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111
s6-rc-compile: fatal: unable to open /etc/s6-overlay/s6-rc.d/svc-icd/up: No such file or directory

could you please have a look again? thanks!

@robdejonge
Copy link

robdejonge commented Sep 6, 2024

@nicx The original bug raised mentions retry_login_interval but later on you mention sync_interval also does not work. Maybe update the issue title, to avoid people filing duplicates. I almost did, because I'm experiencing the latter as well.

2024-09-06 11:08:12,376 :: INFO :: root :: sync.py :: 77 :: Drive synced
2024-09-06 11:08:12,376 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.
2024-09-06 11:08:12,376 :: INFO :: root :: sync.py :: 129 :: Resyncing at Fri Sep  6 11:08:11 2024 ...
2024-09-06 11:08:12,377 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.

Note how the planned resync time is -1 from the log timestamp.

@mandarons It seems this code is not resolving to lead to a break.

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

Successfully merging a pull request may close this issue.

4 participants