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

Cannot use DevTools extension on example application #3286

Closed
1 task
kenzieschmoll opened this issue Aug 27, 2024 · 3 comments · Fixed by #3288
Closed
1 task

Cannot use DevTools extension on example application #3286

kenzieschmoll opened this issue Aug 27, 2024 · 3 comments · Fixed by #3288
Labels

Comments

@kenzieschmoll
Copy link
Contributor

What happened?

I ran the example app from flame/examples: flutter run -d chrome. I opened DevTools from the link printed to the CLI and navigated to the flame tab to use the DevTools extension. Instead of the extension loading as expected, I saw this failure message:

Screenshot 2024-08-27 at 10 25 27 AM

This is because the example app uses package:flame from src due to the melos setup. The flame directory on disk does not have the flame/extension/devtools/build directory, because this is only included with the published package.

To resolve this issue for my local needs, I downloaded the latest flame package from pub.dev and copied the extension/devtools/build directory from there into my local flame/extension/devtools folder. After doing this and reloading DevTools, the flame extension loaded as expected.

What do you expect?

I expected to be able to use the DevTools extension on the example app.

How can we reproduce this?

Run the example app, open DevTools, and navigate to the flame tab.

What steps should take to fix this?

Is it possible to include the extension/devtools/build directory on GitHub? If not, perhaps the examples/README.md file could include documentation for an easy way to generate the extension build for local development.

Do have an example of where the bug occurs?

No response

Relevant log output

No response

Execute in a terminal and put output into the code block below

Output of: flutter doctor -v

Affected platforms

All

Other information

No response

Are you interested in working on a PR for this?

  • I want to work on this
@spydon
Copy link
Member

spydon commented Aug 27, 2024

Did you run melos bootstrap before running it? The examples are meant to run on the git ref that they were checked out on, not with the published version.

@kenzieschmoll
Copy link
Contributor Author

Yes I ran melos bootstrap before running the example app. Is there an easy way to generate the devtools extension build? This would have been nice to be able to run before running the example app for the purpose of trying out the flame-provided tooling along with the example.

@spydon
Copy link
Member

spydon commented Aug 27, 2024

Ah right! I thought we built it with a hook on bootstrap, but apparently we only do on publish.
You can run melos devtools-build to build it.

We have some short docs for how we use it here:
https://github.com/flame-engine/flame/tree/main/packages/flame_devtools

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

Successfully merging a pull request may close this issue.

2 participants