In some cases we are using private APIs. This change adds casting were needed to make the build successful. PR Close #41956
async
waitAsync