Logout from menu and re-login menu button not working

Hi,

I have an app that is a side menu one. Using Ionic 4

I added a logout button to the side menu and the logout works however when I re-login from the login page I was redirected to when I logged out, the menu button doesn’t work. I can slide the menu using the mouse and then the menu button starts working. If I refresh the page once I have re-logged in then all works fine.

When I have the same logout button and logout function of the home page (right of the menu) then this issue doesn’t happen.

Seems like then the menu is triggering the logout some type of reset is not taking place.

Any ideas?

Thanks
Brent

Post a gif of what happens - with the console open so we can see any errors that might be being thrown too. Sounds similar to something I had recently, so could possibly help.

But need to see what happens + also potentially some code if it’s not obvious.

Please take a look into this.

That “feature” never should have existed in the first place (IMHO), was deprecated in v4 of Ionic Framework, and does not exist in the v5 beta. It should not be recommended for new code.

Hi, I ended up redirecting to another child page which had a timer on it and then it ran the logout method. For some reason the logout method on the menu / app.component.ts was not happy.

Thanks for the previous messages.

I had the same problem. And I found that this is happens when route navigation starts before the side menu closes. I fixed this by placing my router navigation method in the ionDidClose event.