-
Notifications
You must be signed in to change notification settings - Fork 935
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
redux-saga: Possible Unhandled Promise Rejection #255
Comments
Gotcha. I wonder, are you running sagaMiddleware.run() multiple times? Im trying to think how this would happen. I should be able to prevent this issue though. Thanks! |
@skellock Nope, I only called let sagaMonitor = undefined;
let reduxCreateStore = createStore;
if (__DEV__) {
Reactotron
.configure()
.use(trackGlobalErrors({
veto: frame => frame.fileName.indexOf('/node_modules/react-native/') >= 0
}))
.use(apisaucePlugin())
.use(sagaPlugin())
.use(reactotronRedux())
.connect();
// clear logs when startup
Reactotron.clear();
sagaMonitor = Reactotron.createSagaMonitor();
reduxCreateStore = Reactotron.createStore;
}
// redux-saga middleware setup
const sagaMiddleware = createSagaMiddleware({
onError: function(error) {
Raven.captureException(error, {
tags: {type: 'redux-saga'}
});
},
logger: function(level, ...args) {
if (level === 'error') {
Raven.captureMessage(args.join(' '), {
tags: {type: 'redux-saga'}
});
}
},
sagaMonitor: sagaMonitor
});
const middlewares = [ReduxRavenMiddleware(), sagaMiddleware];
const store = reduxCreateStore(
rootReducer,
{},
compose(
applyMiddleware(...middlewares),
global.reduxNativeDevTools ? global.reduxNativeDevTools() : noop => noop
)
);
sagaMiddleware.run(rootSaga); |
Thanks. Looks fine. Must be something in the rootSaga tripping it up. Do you use |
I am using |
Does your function * rootSaga () {
yield takeLatest('THING', saga)
yield takeLatest('THING', saga)
yield takeEvery('THING', saga)
yield takeLatest('THING', saga)
} |
No. It looks like: function * rootSaga () {
yield fork(doSomething1);
yield fork(doSomething2);
} And |
Roger. Thank you very much. I think I have everything I need here. 🎉 Will ship a new version tonight. |
Shipping now in 1.5. Thank you. |
I just upgraded to reactotron-redux-saga@1.5.1, and I'm still seeing this issue. My root saga is: export default function * rootSaga () {
yield [
fork(alertsSaga),
fork(authSaga),
fork(connectivitySaga),
]
} I am using a couple custom event channels. Would that cause the problem? |
💩 ! Can you post a stack trace for me? It'll help me track this down a bit better. |
On further investigation, it looks like my issue is #211. Sorry for the confusion.
|
No, problem. I have a fix for that in master now. Cutting another build today. |
@tsemerad now available with circular dependency checking. Just need to upgrade your |
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
seems like in the code here,
parentEffectInfo
could beundefined
somehow.The text was updated successfully, but these errors were encountered: