appium page_source() hangs

appium page_source() hands.

https://github.com/appium/appium/issues/7806

Another workaround until we get this fix : if we put the app in background and resume it after closing the popup/dialog . Appium will start detecting the elements again.
 So use
driver.background_app(1)
However run into another problem,
set android:exported=”true” in AndroidManifest.xml will fix this!