Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] attempt to index nil value

Open Beginner friendly
#557 0 comments 0 reactions 0 assignees View on GitHub

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

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>
Image
Expected Behavior

There shouldn't be any errors.

Steps To Reproduce
  1. Run a project on a device via FlutterRun
  2. Run FlutterQuit to quit
  3. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-flutter/flutter-tools.nvim

All issues in nvim-flutter/flutter-tools.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.