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

Field [sessionId] for user [xxxxx] is not stored error #1801

Open
2 tasks done
balessan opened this issue Nov 29, 2021 · 0 comments
Open
2 tasks done

Field [sessionId] for user [xxxxx] is not stored error #1801

balessan opened this issue Nov 29, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@balessan
Copy link

Search terms you've used

Field [sessionId] for user is not stored

Impacted package

Which packages do you think might be impacted by the bug ?

  • solid-client-authn-browser
  • solid-client-authn-core

Bug description

In some conditions which are still unclear, we get issue with storing/retrieving the sessionId of the current user from the default storage (which is the localStorage in that case).

Probably linked to that one we described before: #423 (comment)

To Reproduce

  1. User logs to the app, like https://ep-contributions.startinblox.com (strongly tied to our own iDP for now)
  2. User does not log out but quit the app
  3. User comes back a few days later
  4. When logging-in back, he is sometimes stuck on the ?code=[code]&state=[state] step of the authentication workflow

Expected result

User should come back whenever he wishes to the app, either having triggered the logout when he closed before or not, and the new login attempt should work as expected.

Actual result

In some conditions which are still unclear, the new login attempt is triggered but stays stuck at the ?code=[code]&state=[state] step with the message in the console being:

oidc.js:422 Uncaught (in promise) Error: Field [sessionId] for user [0e5bb174de6f43318335a18d481e4d36] is not stored
    at StorageUtilityBrowser.getForUser (oidc.js:3994)
    at async AuthCodeRedirectHandler.handle (oidc.js:14154)
    at async ClientAuthentication.handleIncomingRedirect (oidc.js:13683)
    at async Session.handleIncomingRedirect (oidc.js:14566)

The only way to make it work from here is to trigger an additional reload of our app, which triggers the login again, skipping the login/password screen as the user is already authenticated, so just sending him to the authorization screen, then back to the app with a new code which actually passes.

We are using the defaultStorage for those information which is the localStorage as far as I get it.

Environment

balessan@balessan-laptop:~/workspace/sib-projects/sib-energiepartagee$ npx envinfo --system --npmPackages --binaries --npmGlobalPackages --browsers
npx : 1 installé(s) en 1.199s

  System:
    OS: Linux 5.4 Ubuntu 18.04.6 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory: 1.16 GB / 15.33 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v10.16.3/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v10.16.3/bin/npm
  Browsers:
    Brave Browser: 95.1.31.87
    Chrome: 95.0.4638.54
    Firefox: 94.0
  npmPackages:
    browser-sync: ^2.26.13 => 2.26.13 
    chokidar: ^3.3.0 => 3.5.1 
    copyfiles: ^2.3.0 => 2.4.1 
    express: ^4.17.1 => 4.17.1 
    js-yaml: ^3.13.1 => 3.14.1 
    node-sass: ^4.14.1 => 4.14.1 
    npm-run-all: ^4.1.5 => 4.1.5 
    object-assign-deep: ^0.4.0 => 0.4.0 
    pug: ^2.0.4 => 2.0.4 
  npmGlobalPackages:
    @wordpress/scripts: 14.1.0
    moleculer-cli: 0.7.1
    npm: 6.14.5
    webpack-cli: 4.6.0
    webpack: 5.30.0
    yarn: 1.22.4

Available if needed for additional info or debugging session or context understanding.

@balessan balessan added the bug Something isn't working label Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant