microsoft / vscode-react-native

VSCode extension for React Native - supports debugging and editor integration
https://marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native
Other
2.62k stars 263 forks source link

[Bug] Android debugging get spawn EINVAL error in windows, vscode 1.92 #2180

Open uganof opened 1 month ago

uganof commented 1 month ago

🐛 What is the bug? How can we reproduce it?

In visual studio code 1.92.0 or 1.92.1 windows 11 or 10 when debugging android is launched display error: An error occurred while launching the application. spawn EINVAL (error code 303)

doing some research is linked to the indicated security change:

https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2

EzioLi01 commented 1 month ago

Hey @uganof , thanks for reporting it. The bug fixing is in progress, any updates will comment here.

As a workaround, you can use native command npx react-native run-android to launch you application and use attach request to debug your app.

   {
            "name": "Attach to Hermes application",
            "request": "attach",
            "type": "reactnativedirect",
            "cwd": "${workspaceFolder}"
        }
uganof commented 1 month ago

Thank you!

lexie011 commented 1 month ago

Hey @uganof , this issue should be fixed. Could you please uninstall existing extension and try on this one(Unzip and manually install .vsix file in vscode extension tab)? Any issue please let me know.

vscode-react-native-1.13.1.vsix.zip

uganof commented 1 month ago

Hi @lexie011, I installed the extension you attached and now it works correctly as before. Thank you

EzioLi01 commented 1 month ago

@uganof Please use this extension for the debugging, currently microsoft pipeline is updating, after this we will work on new version release process.

ranjeetsingh98965 commented 1 month ago

@uganof I'm getting an error trying to use this extension. Pls provide me the solution.

[Info] Need to check main file and entry point of open module, will setup and write new content if they're not existing. Path: d:\new\admin project\admin\node_modules\open

[Info] Find open-main.js and entry in open module, skip setup...

[Info] Starting Packager

'd:\new\admin' is not recognized as an internal or external command, operable program or batch file.

EzioLi01 commented 1 month ago

@uganof I'm getting an error trying to use this extension. Pls provide me the solution.

[Info] Need to check main file and entry point of open module, will setup and write new content if they're not existing. Path: d:\new\admin project\admin\node_modules\open

[Info] Find open-main.js and entry in open module, skip setup...

[Info] Starting Packager

'd:\new\admin' is not recognized as an internal or external command, operable program or batch file.

Maybe you can rename folder without space. Like 'AdminProject', not 'admin project'.

zhouhao27 commented 2 weeks ago

Still doesn't work for my iOS. It just stuck after I click Attach to package

zhouhao27 commented 2 weeks ago

Hey @uganof , thanks for reporting it. The bug fixing is in progress, any updates will comment here.

As a workaround, you can use native command npx react-native run-android to launch you application and use attach request to debug your app.

   {
            "name": "Attach to Hermes application",
            "request": "attach",
            "type": "reactnativedirect",
            "cwd": "${workspaceFolder}"
        }

This one works. Thanks.