Skip to content
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

Debugger throws: process.send is not a function #606

Closed
MikkelSnitker opened this issue Nov 26, 2017 · 11 comments
Closed

Debugger throws: process.send is not a function #606

MikkelSnitker opened this issue Nov 26, 2017 · 11 comments
Assignees
Labels

Comments

@MikkelSnitker
Copy link

when i try to debug my react-native app, vscode throws this error:

Exception has occurred: TypeError
TypeError: process.send is not a function
at postMessage (/Users/mikkel/MyApp/.vscode/.react/debuggerWorker.js:40:13)
at sendReply (/Users/mikkel/MyApp/.vscode/.react/debuggerWorker.js:113:7)
at executeApplicationScript (/Users/mikkel/MyApp/.vscode/.react/debuggerWorker.js:98:7)
at /Users/mikkel/MyApp/.vscode/.react/debuggerWorker.js:119:7
at process. (/Users/mikkel/MyApp/.vscode/.react/debuggerWorker.js:35:9)
at emitTwo (events.js:125:13)
at process.emit (events.js:213:7)
at emit (internal/child_process.js:774:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Software versions

  • React-Native VS Code extension version: 0.5.7
  • VSCode version: 1.18.1
  • OS platform and version: macOS High Sierra
  • NodeJS version: 8.4.0
  • React Native version: 0.44.3 (react-native-cli: 2.0.1)
@itoys
Copy link
Contributor

itoys commented Nov 27, 2017

Hi @MikkelSnitker,

Thanks for reporting! Which configuration did you run? Could you please paste its here?

@jboulay
Copy link

jboulay commented Dec 13, 2017

I have this problem to since the installation of react-native-tcp and rn-nodeify.
It seems these packages change global.process

@RaphyLi
Copy link

RaphyLi commented Dec 14, 2017

Hi @itoys I have the same problem like @jboulay and @MikkelSnitker
I have the same scenario as @jboulay

@mphocastry
Copy link

Hi there, I am also getting the same issue. I have also installed react-native-tcp and rn-nodeify. I am not sure if it's got something to do with this. Just to give context; This occurs both when I run my project from the debug menu or when I manually run react-native run-android with a separate CLI. I am using a Mac, and I am debugging on a physical Android device.

@edgebal
Copy link

edgebal commented Feb 15, 2018

Hello, I've got the same issue. I'm using rn-nodeify. This occurs when I select the "Debug iOS" option on Code's debug launcher.

Running the project from command line (react-native run-ios) works OK.

launch.json: https://gist.github.com/edgebal/5a0c6364366daedbcbcc38b61798fee7

Debug output

Starting debugger app worker.
Established a connection with the Proxy (Packager) to the React Native application
Debugger worker loaded runtime on port 34436
TypeError: process.send is not a function
debuggerWorker.js:40
    at postMessage ([PROJECT_WORKSPACE_ROOT]/.vscode/.react/debuggerWorker.js:40:13)
    at sendReply ([PROJECT_WORKSPACE_ROOT]/.vscode/.react/debuggerWorker.js:113:7)
    at executeApplicationScript ([PROJECT_WORKSPACE_ROOT]/.vscode/.react/debuggerWorker.js:98:7)
    at [PROJECT_WORKSPACE_ROOT]/.vscode/.react/debuggerWorker.js:119:7
    at process.<anonymous> ([PROJECT_WORKSPACE_ROOT]/.vscode/.react/debuggerWorker.js:35:9)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Software versions

React-Native VS Code extension version: 0.5.7
VSCode version: 1.20.1
OS platform and version: macOS High Sierra 10.13.2
NodeJS version: 8.9.3
React Native version: 0.52.2 (react-native-cli: 2.0.1)

@olegdeezus
Copy link

olegdeezus commented Feb 20, 2018

I've receiving this error when nem-sdk module is imported. In other case all is ok. Nem-sdk not have rn-nodeify dependency and not calling process.send method.

@ruslan-bikkinin ruslan-bikkinin self-assigned this Feb 21, 2018
@ruslan-bikkinin
Copy link
Contributor

Hi @MikkelSnitker @jboulay @RaphyLi @CasDigital @edgebal @olegdizus
I tried to reproduce this issue using clean RN app with rn-nodeify installed, but it was working for me without a problem. I believe to figure out what is the source of the problem we need more detailed steps to reproduce it on our side. Could please anyone from you, guys, prepare as much detailed as possible scenario including demo application and steps have led you to the error?

@olegdeezus
Copy link

Added PR to react-native-tcp (PeelTechnologies/react-native-tcp#70) to fix this problem.

@stewhi
Copy link

stewhi commented Apr 19, 2018

Is there any movement on this? I see the PR is still open, has another fix come up?

@ruslan-bikkinin
Copy link
Contributor

ruslan-bikkinin commented May 3, 2018

Hi guys. Looks like the cause of issue is the fact that rn-nodeify and react-native-tcp overrides global.process as @olegdizus mentioned recently and I don't see any solutions for this from our side. I suggest to turn to authors of those packages to propose a fix similar to this one #606 (comment). Anyway, if anybody has another thoughts about how this issue can be fixed from our side, please, let us know. I am closing this issue so far.

@dengpan1
Copy link

dengpan1 commented Aug 15, 2022

Have you solved the problem? I also encountered the same problem. Is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants