Skip to content

Activity get destroyed by throwing "java.lang.IllegalStateException: FragmentManager has been destroyed" on destroy method after calling open method on android #376

@jayeshmohan94

Description

@jayeshmohan94

Description

I integrated Razorpay android SDK by the instruction given in Razorpay official document. I initiated Razorpay in an activity by calling Checkout.preload(getApplicationContext()); in onCreate() method. Then i called checkout.open on a scenario to open checkout page of Razorpay. After some seconds my Activity get destroyed. I debug in OnDestroy() method of my activity and show error
"java.lang.IllegalStateException: FragmentManager has been destroyed". After payment success/Failure my activity is recreated. I don't know why my activity is destroyed and recreated. Please help to sort out this error.

Razorpay SDK Version :

'com.razorpay:checkout:1.6.40'

Android OS Version :

Not Specific version. Getting in all versions of Android

What you did:

Integrated Razorpay SDK as per Document

What happened:

This is what happend after called checkout code (this method-->checkout.open)

RAZORPAY

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Call Razorpay checkout method
  2. Activity got destroyed
  3. Activity recreated after payment success/failure scenario

Suggested solution:

Need to know why activity is destroying. Need to prevent it from destroying and proper function should be work.

Code example, screenshot, or link to a repository:

Code Sample in scrennshot

razor pay 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions