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

bug: Unhandled promise rejection #604

Closed
4 tasks done
idelice opened this issue Nov 26, 2024 · 4 comments · Fixed by #585
Closed
4 tasks done

bug: Unhandled promise rejection #604

idelice opened this issue Nov 26, 2024 · 4 comments · Fixed by #585
Labels
bug Something isn't working

Comments

@idelice
Copy link

idelice commented Nov 26, 2024

Did you check docs and existing issues?

  • I have read all the trouble.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of trouble.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.1

Operating system/version

macos 14.3

Describe the bug

Getting this error when toggling document symbols:

Trouble Unhandled promise rejection:
```lua
...share/nvim/lazy/trouble.nvim/lua/trouble/sources/lsp.lua:489: bad argument #2 to 'get_line_col' (number expected, got string)

stack traceback:
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:34: in function 'transition'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:48: in function 'reject'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:81: in function 'cb'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:31: in function 'transition'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:45: in function 'resolve'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:78: in function 'cb'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:31: in function 'transition'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:45: in function 'resolve'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:164: in function <...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:160>
	[C]: in function 'pcall'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:73: in function 'cb'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:31: in function 'transition'
	...cal/share/nvim/lazy/trouble.nvim/lua/trouble/promise.lua:45: in function 'resolve'
	...share/nvim/lazy/trouble.nvim/lua/trouble/sources/lsp.lua:142: in function 'handler'
	.../neovim/0.10.1/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>```

Steps To Reproduce

  1. open a java fala
  2. toggle document symbols

Expected Behavior

no error

Repro

No response

@idelice idelice added the bug Something isn't working label Nov 26, 2024
@idelice idelice changed the title bug: bug: Unhandled promise rejection Nov 26, 2024
@JazzXP
Copy link

JazzXP commented Nov 26, 2024

I'm getting the same but with Typescript

@bryangrimes
Copy link

bryangrimes commented Nov 26, 2024

Lua and python for me so I assume it's across the board

@mattups
Copy link

mattups commented Nov 26, 2024

Python for me, popping up even if Trouble is not triggered

@jar3k
Copy link

jar3k commented Nov 26, 2024

A quick fix: switch trouble.nvim to this commit: 3dc00c0

It seems like this commit 86746d2 added an hour ago is causing this issue.

@folke folke closed this as completed in c633e85 Nov 26, 2024
folke pushed a commit that referenced this issue Jan 28, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.7.0](v3.6.0...v3.7.0)
(2025-01-15)


### Features

* **config:** add `close` counterparts to jump split actions
([#584](#584))
([928e6d0](928e6d0))
* **preview:** allow sources to decorate the preview buffer/window
([affd249](affd249))
* **sources:** added snacks picker source
([fa32f71](fa32f71))


### Bug Fixes

* **format:** for "attempt to index local 'signs' (a boolean value)"
errors in nvim-0.10.1+
([#579](#579))
([2e7cb80](2e7cb80))
* **lsp:** always use actual symbol kind names. See
[#568](#568)
([11bcbc0](11bcbc0))
* **lsp:** handle invalid line positions
([1a2efaf](1a2efaf))
* **lsp:** use new vim.str_byteindex if available to calculate start
positions of LSP ranges
([86746d2](86746d2))
* **lsp:** use old-style args for vim.str_byteindex. Fixes
[#604](#604)
([c633e85](c633e85))
* **snacks:** use filtered items instead of all
([2423cd2](2423cd2))


### Performance Improvements

* **debug:** don't create obj dumps
([1fe80c7](1fe80c7))
* **treesitter:** set regions early
([#587](#587))
([20aa858](20aa858))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants