pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.33k stars 125 forks source link

When review PR, diff view is not appear and `attempt to get length of field 'left_lines' (a nil value)` error occur #262

Closed yeonuk-hwang closed 2 years ago

yeonuk-hwang commented 2 years ago

Issue Description

Type: bug report

Describe what happened (or what feature you want)

![image](https://user-images.githubusercontent.com/54208214/154192470-8b679cb3-3e0d-487f-a3ec-020a00ad3001.png)

### How to reproduce it (as minimally and precisely as possible)

1. `:Octo PR list` in project folder
2. `Octo review start` in PR

### Tell us your environment
- nvim v0.6.1
- use 'vim-plug' for plugin manager
here is my plugin list
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'tomasr/molokai' "color scheme
Plug 'leafgarland/typescript-vim' " TypeScript syntax
Plug 'jparise/vim-graphql'        " GraphQL syntax
Plug 'pangloss/vim-javascript' "javascript support
Plug 'maxmellon/vim-jsx-pretty'   " JS and JSX syntax
Plug 'styled-components/vim-styled-components', { 'branch': 'main' } "Styled-components Syntax
Plug 'neoclide/coc.nvim', {'branch': 'release'} "Intelignece
Plug 'vim-airline/vim-airline' "StatusBar
Plug 'vim-airline/vim-airline-themes' "StatusBar
Plug 'tpope/vim-fugitive' "Syntatic Sugar With Git 
Plug 'airblade/vim-gitgutter' "Git Column
Plug 'preservim/nerdtree' "File Explorer
Plug 'Xuyuanp/nerdtree-git-plugin' "Nerd Tree git diagnostic
Plug 'ryanoasis/vim-devicons' "NerdTree Icon Theme
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' "NerdTree Highlight
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } "Fuzzy Finder
Plug 'junegunn/fzf.vim' "Fuzzy Finder
Plug 'stsewd/fzf-checkout.vim'
Plug 'tpope/vim-surround' "Add Surround Operator
Plug 'tpope/vim-repeat' "Advanced Dot operator
Plug 'tpope/vim-commentary' "Comment Easy
Plug 'alvan/vim-closetag' "Auto Close Tag
Plug 'AndrewRadev/tagalong.vim' "Change Tag Name both start and end"
Plug 'tpope/vim-eunuch' "UNIX Shell Commands Syntatic Sugar
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install'  }
Plug 'johngrib/vim-f-hangul'
Plug 'rust-lang/rust.vim'
Plug 'easymotion/vim-easymotion'
Plug 'mattn/emmet-vim'
Plug 'tamago324/vim-browsersync'
Plug 'tyru/open-browser.vim'
Plug 'kassio/neoterm'
Plug 'Yggdroot/indentLine'
Plug 'szw/vim-maximizer'
Plug 'junegunn/vim-easy-align'
Plug 'vim-test/vim-test'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'pwntester/octo.nvim'


### Anything else we need to know?
- when i open first pr and review them, it works well usually but, when i open second pr and review them, the above error occur
- when error is occured, I close the vim and reopen and try again, it works well
pwntester commented 2 years ago

Hi, thanks for reporting this! I was not able to reproduce it on PRs with small number of changed files (8). However, I got this error when trying a PR with many files (70). Was this also your case?

In my case, it seems like I get Post "https://api.github.com/graphql": net/http: TLS handshake timeout for many of the file requests.

Will try to figure out why Im getting this error

UPDATE: It seems like the problem is requesting too many files too quickly. Sleeping 1 sec between fetches gets rid of the issue. Need to check if this is a a rate limit problem

pwntester commented 2 years ago

@ younuk23 can you please check if latest version fixes the issue?

taraslis453 commented 2 years ago

I am still getting this issue

dlacaille commented 2 years ago

I am having this issue as well, on nvim 0.6.1 running on a Mac. I am using Lunarvim but tried with NvChad as well, same error. The error also occurs on all of my projects. I simply can't jump forwards or backwards using [q or ]q.

dlacaille commented 2 years ago

@pwntester unfortunately I am not knowledgable enough to fix the issue but I can reproduce on my machine. Is there anything you might need to reproduce? Here is what might work:

  1. Install nvim 0.6.1
  2. Install LunarVim
  3. Add the following to config.lua
    lvim.plugins = {
    {"pwntester/octo.nvim", config = function() require"octo".setup() end}
    }
  4. :PackerSync
  5. :Octo review start
  6. ]q shows an error

If the issue is still not happening for you, I can try reproducing it on a docker container.

pwntester commented 2 years ago

@dlacaille this seems to be a different issue with the ]q, [q mappings. Please check if a2793a4c1814d27168686730cf2576915f9f556f fixes it for you

dlacaille commented 2 years ago

@pwntester the issue is still happening after updating:

image

pwntester commented 2 years ago

@dlacaille the stack trace seems to indicate that you are not using the latest version. Can you verify you are on the latest commit?

taraslis453 commented 2 years ago

Fixed for me 👍

dlacaille commented 2 years ago

I tried again this morning and it seems to be working! Thank you :)