Android Hardware back button do not work when the page is pushed by clicking on the button on popover

When I click the button present on the popover than I push another page on that button click (Navigate to the other page).
On the pushed page I get the back button on the navbar and that back button works perfectly.
On the other hand, if I clicked the hardware back button on the pushed page than it says “You can’t remove all the pages in the navigation stack. nav.pop() is probably called too many times.”

It does not allow me to go to the back page when clicked on the hardware back button.

Here is the code when the button is clicked on the popover page.

this.viewCtrl.dismiss().then(() => {[0].push(SettingPage)

Please try to implement this platform API,
place your code ie.,[0].push(SettingPage) inside the above API method.

I am already on SettingsPage and from there I need to go back to the page from which the popover is created on hardware back button.

I think You should see the above detail again or if you want than I can add some more info.

SettingsPage is just a reference. You can replace with the relevant page you would like to navigate.