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

Resetting saga in hacker-news example generates redundant events #2163

Closed
FreeSlave opened this issue Dec 1, 2021 · 2 comments · Fixed by #2176 or #2179
Closed

Resetting saga in hacker-news example generates redundant events #2163

FreeSlave opened this issue Dec 1, 2021 · 2 comments · Fixed by #2176 or #2179
Labels
bug Issues related to defects and incorrect/unexpected feature behavior

Comments

@FreeSlave
Copy link
Contributor

To Reproduce

  1. Run hacker-news via yarn dev.
  2. Click login and create new account.
  3. In other terminal run yarn module-admin sagas reset UserConfirmation multiple times.
  4. Check the sqlite database, you'll see a number of _RESOLVE_SYS_SCHEDULED_COMMAND_CREATED_ events (depending on how many time you called a reset)

Another (probably related) issue. If you reset SCHEDULER via yarn module-admin sagas reset _SCHEDULER_ before UserRejected is produced, the hacker-news will have unhandled promise rejections afte a while (the number of unhandled rejections depends on the number of UserConfirmation resets).

UnhandledPromiseRejectionWarning: Error: scheduler.execute: unexpected task state "executed"
    at _callee2$ (/home/roman/git_projects/resolve/packages/core/core/lib/saga/create-scheduler-aggregate.js:87:25)
    at tryCatch (/home/roman/git_projects/resolve/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/roman/git_projects/resolve/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/roman/git_projects/resolve/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/roman/git_projects/resolve/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/roman/git_projects/resolve/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /home/roman/git_projects/resolve/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at Object.<anonymous> (/home/roman/git_projects/resolve/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
    at Object.execute (/home/roman/git_projects/resolve/packages/core/core/lib/saga/create-scheduler-aggregate.js:107:27)
@FreeSlave FreeSlave added the bug Issues related to defects and incorrect/unexpected feature behavior label Dec 1, 2021
@MrCheater MrCheater linked a pull request Dec 13, 2021 that will close this issue
@MrCheater MrCheater reopened this Dec 14, 2021
@MrCheater MrCheater reopened this Dec 15, 2021
@FreeSlave
Copy link
Contributor Author

Can't reproduce anymore. Seems to be fixed in #2176

@MrCheater
Copy link
Contributor

MrCheater commented Jan 13, 2022

Fixed in version 0.33.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to defects and incorrect/unexpected feature behavior
Projects
None yet
2 participants