Workiva / Workiva/over_react

OverReactReduxDevToolsMiddleware

Open
#493 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
432
Forks
57
PR merge metrics
No merged PRs in 30d

Description

  • Issue Type: BUG
  • over_react Version(s): 3.5.0

When loading up my web app using the Redux DevTools extension, the console issues the following warning:

OverReactReduxDevToolsMiddleware [WARNING]: Assertion failed: org-dartlang-sdk:///sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart:87:10
_isJsObject(f) || !JS('bool', '# instanceof #.Function', f, global_)
"Dart function requires `allowInterop` to be passed to JavaScript."

The stack trace reads:

react_devtools_backend.js:6 OverReactReduxDevToolsMiddleware [WARNING]: Assertion failed: org-dartlang-sdk:///sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart:87:10
_isJsObject(f) || !JS('bool', '# instanceof #.Function', f, global_)
"Dart function requires `allowInterop` to be passed to JavaScript."
r @ react_devtools_backend.js:6
warn @ dart_sdk.js:97415
(anonymous) @ middleware.dart:47
runUnaryGuarded @ dart_sdk.js:31199
[_sendData] @ dart_sdk.js:25426
[_add] @ dart_sdk.js:25374
[_sendData] @ dart_sdk.js:26061
add @ dart_sdk.js:25867
[_publish] @ logger.dart:241
log @ logger.dart:187
warning @ logger.dart:220
middleware._OverReactReduxDevToolsMiddleware.new @ middleware.dart:56
get overReactReduxDevToolsMiddleware @ middleware.dart:187
desc.get @ dart_sdk.js:4908
initialize_model @ app.dart:109
runBody @ dart_sdk.js:31390
_async @ dart_sdk.js:31418
initialize_model @ app.dart:99
start @ app.dart:86
runBody @ dart_sdk.js:31390
_async @ dart_sdk.js:31418
start @ app.dart:80
main$ @ main.dart:4
(anonymous) @ VM733:1
runMain @ client.js:7952
(anonymous) @ client.js:23849
(anonymous) @ client.js:3003
call$2 @ client.js:10800
_asyncStartSync @ client.js:2968
$call$body$main__closure @ client.js:23861
call$1 @ client.js:23792
_rootRunUnary @ client.js:3303
runUnary$2$2 @ client.js:12130
runUnaryGuarded$1$2 @ client.js:12058
_sendData$1 @ client.js:11601
perform$1 @ client.js:11754
call$0 @ client.js:11807
_microtaskLoop @ client.js:3168
_startMicrotaskLoop @ client.js:3174
call$1 @ client.js:10675
invokeClosure @ client.js:1188
(anonymous) @ client.js:1207
childList (async)
call$1 @ client.js:10685
_scheduleAsyncCallback @ client.js:3187
_rootScheduleMicrotask @ client.js:3348
scheduleMicrotask @ client.js:3215
schedule$1 @ client.js:11789
_addPending$1 @ client.js:11592
_sendData$1 @ client.js:11411
add$1 @ client.js:11328
_onIncomingMessage$1 @ client.js:23399
eval @ VM718:3
invokeClosure @ client.js:1188
(anonymous) @ client.js:1207

It might have to do with the breaking change in Dart 2.8.0 described here, relating to allowInterop


FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in middleware.dart around lines 47, 56, and 187, then trace the overReactReduxDevToolsMiddleware entry point from app.dart's initialize_model call. Reproduce the Redux DevTools startup warning and verify that the middleware no longer emits the allowInterop assertion when the app loads.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.