react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Debug with chrome error after upgrading to 0.17

Open AdamGorkoz opened this issue 10 years ago • 20 comments

Getting this error in the console : Uncaught TypeError: Cannot read property 'apply' of undefined

Please help.

AdamGorkoz avatar Dec 22 '15 07:12 AdamGorkoz

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-native or 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!

facebook-github-bot avatar Dec 22 '15 07:12 facebook-github-bot

+1 the same problem. Uncaught TypeError: Cannot read property 'apply' of undefined .
source: debuggerWorker.js:39 OS: windows 8

tmp251 avatar Dec 22 '15 20:12 tmp251

Do you have a stack trace or something? Without a stack trace it's impossible to figure out where this is happening.

satya164 avatar Dec 22 '15 23:12 satya164

@satya164 This is exactly where it happens , I'm using Android btw :

image

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

AdamGorkoz avatar Dec 23 '15 07:12 AdamGorkoz

Might be related to #4881

satya164 avatar Dec 23 '15 09:12 satya164

Same here.

dgilperez avatar Dec 23 '15 21:12 dgilperez

Can you try with the current master and see if the issue still persists?

satya164 avatar Dec 24 '15 01:12 satya164

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.

screenshot 2015-12-28 11 45 50

drtangible avatar Dec 28 '15 17:12 drtangible

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?

drtangible avatar Dec 28 '15 19:12 drtangible

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 avatar Dec 29 '15 07:12 sebmarkbage

@sebmarkbage :+1:, looks like I forgot to run react-native upgrade while upgrading, and that seems to resolve things. Thanks!

drtangible avatar Dec 29 '15 16:12 drtangible

I'm still getting this error even after upgrading

Hyperonic avatar Dec 30 '15 18:12 Hyperonic

I'm still getting this error over here too -

screen shot 2016-01-09 at 11 00 09 am

screen shot 2016-01-09 at 11 00 12 am

haydenth avatar Jan 09 '16 17:01 haydenth

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

image

Seems "executeJSCall" is not part of the __fbBatchedBridge object

image

STR:

  1. npm install react-native (which was "^0.18.0-rc")
  2. react-native upgrade
  3. Run and debug in chrome > see error in console and white screen on device

jforaker avatar Jan 09 '16 18:01 jforaker

+1

Overload119 avatar Jan 14 '16 11:01 Overload119

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?

haydenth avatar Jan 20 '16 20:01 haydenth

+1 Getting this error, when debugging in Chrome in Android on 0.18

amit-Newput avatar Jan 21 '16 09:01 amit-Newput

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.

haydenth avatar Jan 31 '16 03:01 haydenth

I had this error after changing versions to 0.20. This goes away when you run react-native upgrade .

dabit3 avatar Feb 19 '16 03:02 dabit3

+1

liu402883451 avatar May 10 '18 02:05 liu402883451