Getting error when user subscribe any plan in auto renewal subscriptions after cancel subscription

Hello,

In our app, we have implemented Auto renewal subscriptions. There is two type of subscription plan. weekly and monthly. When user subscribe any plan that time it purchase successfully. But when user cancel that from device settings and after expire that plan, user again subscribe plan that time getting Fail with error code 2 and user also charged even they get fail.

Please help me. In our app many users facing this issue.