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

The Flutter Attach to Process gets stuck on Waiting... #169

Open
rutvik110 opened this issue Jun 13, 2022 · 3 comments
Open

The Flutter Attach to Process gets stuck on Waiting... #169

rutvik110 opened this issue Jun 13, 2022 · 3 comments

Comments

@rutvik110
Copy link

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
Screenshot 2022-06-13 at 7 10 28 PM

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

@knopp
Copy link
Contributor

knopp commented Jun 13, 2022

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.

@rutvik110
Copy link
Author

rutvik110 commented Jun 13, 2022

Sry, didn't got you. If you mean the nativeshell package published on pub.dev, then yes.

@rutvik110
Copy link
Author

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
Screenshot 2022-06-27 at 5 14 01 PM
.

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.
Screenshot 2022-06-27 at 5 15 13 PM

It works as expected after doing this updares.

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

No branches or pull requests

2 participants