bluet / docker-jottacloud

Docker of Jottacloud client backup daemon, with jotta-cli and jottad inside.
24 stars 4 forks source link

WARNING: A device with this name [Archive] already exists, but was connected to a different hardware id. #4

Open mabahj opened 2 years ago

mabahj commented 2 years ago

I'm trying to switch from a different jottacloud docker image to this, but I got this error message, which I see in your entrypoint.sh (the TODO) is really not supported. It then fails:

Devicename[bluet-jottacloud]: Archive
WARNING: A device with this name [Archive] already exists, but was connected to a different hardware id.
        You can choose to connect to this device but it is not recommended.
        Do you want to connect to [Archive]? (yes/no): couldn't read file "remote": no such file or directory

I've tried to use "expect" myself, but I really never understood how it works. So I'd like to help, but I'm not confident enough to provide a PR.

If this does not bother you, then please only consider this bug report as FYI. Thanks for sharing your setup.

bluet commented 1 year ago

Hi @mabahj sure would you like to share your fix? :D

mabahj commented 1 year ago

I'm sorry, it is quite a while ago and I do not remember how I solved it. I'm using a very messy locally changed version of https://github.com/maaximal/jottadocker now, probably a merge of your version and that version. I do not have any code to solve that question in my version, so I assume I just changed the device name.

I guess something like

expect \"Do you want to connect to [*]? (yes/no):: \" {send \"yes\n\"} 

Could work? (Not sure about the * syntax). And I am not sure if "except" is mandatory or not, i.e. if it will just proceed if that message was not printed or if it will wait forever. I guess that was the problem I could not solve myself.