Debug with chrome error after upgrading to 0.17
Getting this error in the console : Uncaught TypeError: Cannot read property 'apply' of undefined
Please help.
Hey turka50, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
- If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag
react-nativeor for more real time interactions, ask on Discord in the #react-native channel. - If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
- We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!
+1 the same problem.
Uncaught TypeError: Cannot read property 'apply' of undefined .
source: debuggerWorker.js:39
OS: windows 8
Do you have a stack trace or something? Without a stack trace it's impossible to figure out where this is happening.
@satya164 This is exactly where it happens , I'm using Android btw :

There isn't a stack really , just one line of error :

Might be related to #4881
Same here.
Can you try with the current master and see if the issue still persists?
Also seeing this on master, only when debugging in Chrome in Android.
Logging what's missing in debuggerWorker.js:
try {
if (typeof __fbBatchedBridge === 'object') {
+ console.log("Looking for", object.method, "in", __fbBatchedBridge);
returnValue = __fbBatchedBridge[object.method].apply(null, object.arguments);
}
} finally {
Appears it's unable to find executeJSCall on __fbBatchedBridge.
Able to work around this by reverting a piece of the changeset from 8d397b4c, specifically the change in debuggerWorker.js (3017fb57). @sebmarkbage, not sure how to debug this further, nor why this may only be popping up in Android w/Chrome debugging. Any thoughts?
I think that is an issue with the binary native bundle being out of sync with the JS bundle and packager. Try redeploying the app bundle that you're testing.
@sebmarkbage :+1:, looks like I forgot to run react-native upgrade while upgrading, and that seems to resolve things. Thanks!
I'm still getting this error even after upgrading
I'm still getting this error over here too -


I get the error too in Android, only after selecting "Debug in Chrome":
Uncaught TypeError: Cannot read property 'apply' of undefined onmessage @ debuggerWorker.js:39

Seems "executeJSCall" is not part of the __fbBatchedBridge object

STR:
npm install react-native(which was "^0.18.0-rc")react-native upgrade- Run and debug in chrome > see error in console and white screen on device
+1
Still getting this error on 0.18 - debuggerWorker.js, line 39 now. "Cannot read property 'apply' of undefined". Has anyone managed to find a workaround for this? Are there alternate debuggers we can use for the time being?
+1 Getting this error, when debugging in Chrome in Android on 0.18
Figured it out. Upgraded to 0.19 and ran react-native upgrade. I let it overwrite all my android config files: app/build.gradle, settings file, and the MainActivity.java. Then I went through and basically moved the code I had from before back in here. Uninstalled from phone and did a fresh build. Works now.
For anyone who hits this page looking for this error, most likely these gradle/android configs are out of date and you're not including newer libraries. Try rebuilding all your configs.
I had this error after changing versions to 0.20. This goes away when you run react-native upgrade .
+1