I too face the issue "
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters." reported here
In my case, I suspect the issue is a tilde (...