solargraph icon indicating copy to clipboard operation
solargraph copied to clipboard

undefined method `offset' for nil:NilClass

Open baelter opened this issue 4 years ago • 1 comments

Got this in vscode, some missing error handling?

  Message: [NoMethodError] undefined method `offset' for nil:NilClass

            extract_offset = ->(code, offset) { reg.match(code, offset).offset(0) }
                                                                       ^^^^^^^
  Code: -32603 

baelter avatar Mar 08 '22 09:03 baelter

I got this also recently in neovim

solargraph: -32603: [NoMethodError] undefined method `+' for nil:NilClass

            extract_offset = ->(code, offset) { [soff = code.index(name, offset), soff + name.length] }

I've seen it pop up a few times but don’t know how to make it reproducable.

will avatar Jul 20 '22 17:07 will

I've gotten similar in kakoune

kak-lsp: ruby language server error: '[NoMethodError] undefined method 'start'' for nil:NilClass

                   return true if last_updater && last_updater.changes.one? &&
range.contain?(last_updater.changes.first.range.start)

Don't know how to reproduce, but when it's happening it happens consistently every 5-20 characters typed.

jonathan-hurd avatar Nov 02 '22 18:11 jonathan-hurd