Open xanthos84 opened 2 months ago
I tried to import aliases exported from another anonaddy instance.
I got the following screen:
and the following line on the logs:
172.20.0.2 - - [27/Jun/2024:19:38:38 +0200] "POST /settings/aliases/import HTTP/1.1" 429 6632 "https://mydomain.com/settings/data" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
I had chance to play with this a little more. First, the Import Aliases function has a rate limit of 1 per minute. This means that if you click the "Import Alias Data" button once and then click on it again within the same minute, you get an HTTP 429 ("too many requests") error. Only after 1 minute has gone by since you last clicked it you can try again without getting that error. When I performed my first test on it, I probably clicked on the button after selecting the wrong file, got another type of error which I disregarded because it was due to my mistake, then tried again shortly after and got the "too many requests" error that I reported in my previous post. But I have to say that the reason for the "too many requests" error is not very clear and if you first get another type of error you would naturally try to fix your mistake and retry within a minute.
I have now given another try importing the file I had exported from another Addy.io instance and got the error "The aliases import file has invalid headers, please use the template provided above.". Then I looked at the exported file and realised its headers are completely different from those required by the import function. I intuitively gave it for granted that the export and import format were the same, to allow a user to export from an instance and import into another one. But clearly that's not the case. So I manually modified the exported csv file to make it comply with the import template and then I managed to successfully import it.
@xanthos84's you made a first attempt which resulted in 323 validation failures. Then you probably made another attempt within a minute getting the "too many requests" error. If you try again after more than one minute you shouldn't encounter the same error. While the 323 validation failures are difficult to debug considering that the operation seems to produce no logs. But maybe looking at the actual file you are trying to import it's possible to find out what could cause the failure.
@willbrowningme although I managed to resolve my issues and woudn't call them a bug, I can see that some choices may be a bit counterintuitive and/or mislead users into reporting issues. As an improvement on this, I can give the following suggestions, thay you may (or may not) wish to implement:
Support guidelines
I've found a bug and checked that ...
Description
Import Aliases feature does not work on v.1.1.0
Expected behaviour
it should import aliases to the database
Actual behaviour
after importing, the finished email with "323 aliases had validation failures" and 0 being imported.
beside that "429 TOO MANY REQUESTS" if you want to try to upload the csv even though you just tried it once.
Steps to reproduce
create simple csv file like the template:
alias,description,recipients booking@mycustom.mail,ok,myemail@gmail.com
Docker info
Docker Compose config
No response
Logs
Additional info
No response