Message "Sorry, your signup request has failed" in user registration


In my website I have two ways for registration:

1. By choosing a plan:
2. By directly filling the register form for accessing protected content, generated with [ms-membership-register-user membership_id="1051"] while 1051 is a free membership:

The first register option works fine, but the second one throws the message "Sorry, your signup request has failed. Try again".
Actually, the registration occurs and the user is signed up after it, but the message is displayed and it's of course confusing for the user.

How can we fix this issue?

Thanks for your help.