nativeshell
nativeshell copied to clipboard
The Flutter Attach to Process gets stuck on Waiting...
I'm trying to run the Flutter Attach to Process as said to support hot reload and hot restart. I've the examples app running but the this process is getting stuck while launching.
My launch.json file
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter: Attach to Process",
"type": "dart",
"request": "attach",
"osx": {
"serviceInfoFile": "${env:TMPDIR}vmservice.nativeshell_examples",
},
"windows": {
"serviceInfoFile": "${env:TEMP}/vmservice.nativeshell_examples"
},
"linux": {
"serviceInfoFile": "${env:XDG_RUNTIME_DIR}/vmservice.nativeshell_examples"
}
},
]
}
You can see in the screenshot below it's waiting for connection from the application I guess

I'm not sure what's happening here as I've very little knowledge about running such kind of processes but I guess it's not able to find the running application. I'm on M1 mac and running the project on Flutter 3.0.1 stable and dart 2.17.1
To reproduce the issue you can use this project I'm currently running https://github.com/rutvik110/examples
Are you using the published rust crate or current main? I think the published rust crate is outdated and does not support extracting debug URL format in Flutter 3 from stdout.
Sry, didn't got you. If you mean the nativeshell package published on pub.dev, then yes.
Hey @knopp ! So, I had a look at this today again and was able to fix the issue. First of all, I'm pointing to the package on the main instead of the published one on pub.dev as you said.
nativeshell:
git:
url : https://github.com/nativeshell/nativeshell.git
path : nativeshell_dart
Though, the issue wasn't resolved after that. For some reason, it wasn't able to locate the VM instance through the following configs
.
I had to remove this configs and provide the vmServiceUri that you get once the application launches to get the hot reload and restart working.

It works as expected after doing this updares.