Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Not found' when logging out #1644

Closed
asliwinski opened this issue Mar 13, 2018 · 4 comments
Closed

'Not found' when logging out #1644

asliwinski opened this issue Mar 13, 2018 · 4 comments
Labels

Comments

@asliwinski
Copy link

What you were expecting:
To be redirected to login page without errors after pressing Logout button

What happened instead:
'Not found' appears for a fraction of second before the redirection, as soon as the promise from authClient is returned.

Steps to reproduce:

  • Clone and install the minimal example app (it's just a few steps of the tutorial + the basic authClient)
  • Replace the node_modules/admin-on-rest/lib/sideEffect/saga/auth.js with the auth.js from src of the repo (2 breakpoints added to catch the error):
case USER_LOGOUT: {
    debugger;
    yield call(authClient, AUTH_LOGOUT);
    debugger;
    yield put(push('/login'));
    break;
}
  • run the app, open the console and log out. When it hits the first breakpoint resume script execution to see the error. (Just when I'm testing it right now it went OK at the first attempt and failed at second, which suggests some kind of a race condition).

Before:

image

After:

image

Environment

  • Admin-on-rest version: 1.4.0
  • React version: 16.2.0
@fzaninotto
Copy link
Member

I can't reproduce this on next.

@asliwinski
Copy link
Author

True, it only happens with the current release (1.4.0).

@fzaninotto fzaninotto added the bug label Mar 20, 2018
@fzaninotto
Copy link
Member

Reproduced and confirmed in master

@fzaninotto
Copy link
Member

Moved to marmelab/admin-on-rest#1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants