Ionic-framework: bug: Page not rendered after upgrading to @ionic/react-router 5.3.0

Created on 3 Sep 2020  路  7Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic version:


[ ] 4.x
[x] 5.x

Current behavior:
I have an app where the user can log in and log out. Up until @ionic/react-router v5.2.3 a logged in user could go to the Settings page, click Logout, be presented with the Login page, log in again and see the Home page.

After upgrading to v5.3.0 the Home page is no longer displayed after logging in again. The URL changes correctly, but the HomePage component is not even rendered.

Edit: watch this video to see it in action.

Expected behavior:

It should work as with v5.2.3.

Steps to reproduce:

Clone github.com/mirkonasato/ionic-react-router-issue, install dependencies, start app.

Log in by simply clicking the Login button (I mocked that functionality), open the Settings tab, click Logout. Log in again. You should see the home page but will get a blank one.

Downgrade to v5.2.3 to see how it was working.

Other information:

The changelog mentions v5.3.0 introduced a "new react router", although it doesn't really provide any more details.

Ionic info:

Ionic:
   Ionic CLI       : 6.11.8 (/home/mirko/.nvm/versions/node/v12.18.3/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 5.3.2

Capacitor:
   Capacitor CLI   : 2.4.0
   @capacitor/core : 2.4.0

Utility:
   cordova-res : not installed
   native-run  : not installed

System:
   NodeJS : v12.18.3 (/home/mirko/.nvm/versions/node/v12.18.3/bin/node)
   npm    : 6.14.7
   OS     : Linux 5.4
react

All 7 comments

Ah, I'm not the only One with this issue :).
I opened a related (and more sloppy and complex )issue yesterday see here.

Does this affect your Course on Udemy @mirkonasato ? Because i'm taking your class right now and change the Iontabs for an IonMenu.
And i get the same behavior , if I logout from the menu I can't login anymore , IonRouterOutlet does not render the home Page.

@clementvp yes indeed, in fact another student reported this issue to me yesterday

Hi @mirkonasato,

Could you give this dev build a try and see if it fixes your issue?

npm i @ionic/[email protected] @ionic/[email protected]

Thanks

Hey @elylucas, yes I can confirm that the app works fine with 5.4.0-dev.202009041201.3d9e296

Great, this fix will be in the next release.

Awesome, thanks!

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

masimplo picture masimplo  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

daveshirman picture daveshirman  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments

MrBokeh picture MrBokeh  路  3Comments