I know it sounds like a duplicate of FragmentStatePagerAdapter IllegalStateException: is not currently in the FragmentManager but his solution isn\'t relevan
Use getChildFragmentManager() instead of getFragmentManager() if you have fragments hierarchy. eg. if you have fragments pager.
getChildFragmentManager()
getFragmentManager()