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

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

Open
uganof opened this issue Aug 8, 2024 · 13 comments
Open

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

uganof opened this issue Aug 8, 2024 · 13 comments
Labels
bug fix-in-master known-issues Known issues for extension, most of them are external issues triaged windows

Comments

@uganof
Copy link

uganof commented Aug 8, 2024

🐛 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

@uganof uganof added the bug label Aug 8, 2024
@EzioLi01
Copy link
Collaborator

EzioLi01 commented Aug 9, 2024

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}"
        }

@EzioLi01 EzioLi01 added triaged in-progress The issue is in progress windows labels Aug 9, 2024
@uganof
Copy link
Author

uganof commented Aug 9, 2024

Thank you!

@lexie011
Copy link
Collaborator

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

@lexie011 lexie011 removed the in-progress The issue is in progress label Aug 12, 2024
@uganof
Copy link
Author

uganof commented Aug 12, 2024

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

@EzioLi01
Copy link
Collaborator

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

@EzioLi01 EzioLi01 changed the title [Bug] in vscode 1.92 when debugging android is launched in windows An error occurred [Bug] Android debugging get spawn EINVAL error in windows, vscode 1.92 Aug 13, 2024
@ranjeetsingh98965
Copy link

@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
Copy link
Collaborator

EzioLi01 commented Aug 13, 2024

@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'.

@EzioLi01 EzioLi01 added the known-issues Known issues for extension, most of them are external issues label Aug 28, 2024
@zhouhao27
Copy link

zhouhao27 commented Aug 31, 2024

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

@zhouhao27
Copy link

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.

@Master-Servis
Copy link

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}"
        }

But which option to run to attach to android emulator ? all options give error
image

@EzioLi01
Copy link
Collaborator

EzioLi01 commented Sep 29, 2024

@Master-Servis Have you installed extension mentioned in this comment?

As mentioned in above related issue, the new version of extension is not released since MS is working on updating pipeline security policy and it's still in progress.

Also you can try to package and install your own .vsix file following this doc.

Will publish new version of extension once the pipeline is getting back.

@Master-Servis
Copy link

Also you can try to package and install your own .vsix file following this doc.

Hi, extension did not work for me. I did the following:

Ran command npx react-native start --experimental-debugger

Then put json config:

{
  "configurations": [

    {
    "name": "Attach to Hermes application - Experimental",
    "request": "attach",
    "type": "reactnativedirect",
    "cwd": "${workspaceFolder}",
    "address": "localhost",
    "port": 8081
    }
  ]
}

And clicked run in debugger on top of already running reactapp.

That worked. Thanks.

Ref: #1878 (comment)

@Flaurenss
Copy link

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

Just to let you know, this is still happening with the last VSC version from the Extensions marketplace.
I had to download your zip version in order to be able to debug and run the react native application on desktop (targeting widnows platform).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix-in-master known-issues Known issues for extension, most of them are external issues triaged windows
Projects
None yet
Development

No branches or pull requests

7 participants