redux-saga/redux-saga

React Native Hermes Debugger's console does not seem to be able to trigger sagas

Open

#2 359 ouverte le 28 janv. 2023

Voir sur GitHub
 (5 commentaires) (0 réactions) (0 assignés)JavaScript (22 505 stars) (1 987 forks)batch import
bughelp wantedquestion

Description

Steps to reproduce

Open an Expo app using the Hermes engine and dispatch an action like store.dispatch(actions.someAction()) and listen for it with a takeEvery('*', someHandler)

Description of the bug/issue

When dispatching actions from a globally defined store via the Hermes debugger, the actions do not seem to be captured by Redux Saga - no logging occurs in someHandler and breakpoints are not hit - but the values update in the reducers as expected.

I can't conceive of why this would be the case. The context in the console view looks like this:

image

Same issue occurs with the Flipper debugging tools (which I believe are essentially identical, but I'm not certain)

The code that it uses to setup the debugger appears to be in this file: https://github.com/facebook/flipper/blob/c0cd32564ad4b07a42365af886045095877a6a6b/desktop/plugins/public/hermesdebuggerrn/ChromeDevTools.tsx

Is there anything we could do to work around that?

Steps to reproduce the bug/issue

  1. Load a Hermes-based application that uses Redux Saga
  2. Trigger an action from the devtools console as described above

Example

None currently, just discovered this issue.

Actual results

Sagas are not triggered

The Expected results

Sagas should be triggered

Environment information

  • redux-saga version 1.2.1
  • babel / typescript setup 7.17.x
  • other related information React Native 0.70.x

Guide contributeur