[BUG] attempt to index nil value
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- flutter, lua, neovim
- Domain
- mobile-dev, tooling
Research direction
The failure is reported at lua/flutter-tools/commands.lua:59 in update_device_from_output, reached from on_run_data and job_runner.lua:55. Reproduce with FlutterRun followed by FlutterQuit on the stated environment, inspect how missing output is handled, and confirm the command exits without the callback error.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
An error pops up when running FlutterQuit during a running session. The error is pasted below (and a screenshot after):
Error executing vim.schedule lua callback: ...m/lazy/flutter-tools.nvim/lua/flutter-tools/commands.lua:59: attempt to index local 'line' (a nil value)
stack traceback:
...m/lazy/flutter-tools.nvim/lua/flutter-tools/commands.lua:59: in function 'update_device_from_output'
...m/lazy/flutter-tools.nvim/lua/flutter-tools/commands.lua:119: in function 'on_run_data'
...tter-tools.nvim/lua/flutter-tools/runners/job_runner.lua:55: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Expected Behavior
There shouldn't be any errors.
Steps To Reproduce
- Run a project on a device via
FlutterRun - Run
FlutterQuitto quit - Observe the error
Environment
- OS: macOS 27.0
- Flutter version: 3.48.0-0.5.pre
- Is flutter in $PATH: Yes
- neovim version: 0.11.4
Anything else?
Seems a pretty simple fix: a nil check on line at lua/flutter-tools/commands.lua:59.
- Dominant language
- Lua
- Stars
- 1.4k
- Forks
- 118
- Avg merge
- 3h 16m
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-flutter/flutter-tools.nvim
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
nvim-flutter/flutter-tools.nvim#524 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
nvim-flutter/flutter-tools.nvim#426 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
nvim-flutter/flutter-tools.nvim#393 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in nvim-flutter/flutter-tools.nvim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
revisit-at-release statusline
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
neovim/neovim#42188 · 1 comment ·
Maintainers usually reply within 1 day
-
[Aska] IssueOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pterodactyl/game-eggs#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day