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

Addons not working right #2653

Closed
ThePython10110 opened this issue May 4, 2024 · 7 comments
Closed

Addons not working right #2653

ThePython10110 opened this issue May 4, 2024 · 7 comments

Comments

@ThePython10110
Copy link

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

When opening the addon manager, the addon manager should open and show available addons.

Actual Behaviour

Sometimes, the addon manager shows an error ("invalid array length"), and sometimes it opens but doesn't show any addons ("Nothing to show 🕳️").

Reproduction steps

Try to open the addon manager...

Additional Notes

At one point, this worked perfectly fine, then stopped. Also, addons only seem to load in one of my workspaces... any other folder just doesn't load them.

I know this is probably just a problem on my computer (a lot of things seem to be), but I don't know what to do about it. I've tried uninstalling/reinstalling the extension, closing/reopening VSCode, rebooting... something I did fixed it temporarily, but now the problem is back.

Log File

There are several log files. If it helps, minecraft_commands is the only one where the addons actually work.
logs.zip

@carsakiller
Copy link
Collaborator

The logs you provided are for the language server. Can you provide the addon manager log? There should be a little notepad icon in the bottom right of the addon manager to open the latest log file.
image

@ThePython10110
Copy link
Author

The button doesn't work, and after using Everything to search my computer, all the addon manager log files I could find were completely empty.

@carsakiller
Copy link
Collaborator

Does the output window for Lua Addon Manager contain anything?
image

@carsakiller
Copy link
Collaborator

Or is there an error for the addon manager in the console of the webview dev tools?
image

@ThePython10110
Copy link
Author

RangeError: Invalid array length
	at String.repeat (c:\Users\Nolan\.vscode\extensions\searking.preview-vscode-2.3.3\dist\extension\node\extension.js:2:386177)
	at padText (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\out\addon_manager\services\string.service.js:11:25)
	at Printf.template (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\out\addon_manager\services\logging.service.js:60:55)
	at Printf.transform (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\logform\printf.js:11:26)
	at Format.transform (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\logform\combine.js:20:24)
	at DerivedLogger._transform (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\winston\lib\winston\logger.js:313:29)
	at Transform._read (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\readable-stream\lib\_stream_transform.js:166:10)
	at Transform._write (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\readable-stream\lib\_stream_transform.js:155:83)
	at doWrite (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\readable-stream\lib\_stream_writable.js:390:139)
	at writeOrBuffer (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\readable-stream\lib\_stream_writable.js:381:5)
	at Writable.write (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\readable-stream\lib\_stream_writable.js:302:11)
	at DerivedLogger.value (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\winston\lib\winston\logger.js:67:18)
	at DerivedLogger.<computed> [as verbose] (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\node_modules\winston\lib\winston\create-logger.js:81:14)
	at a.value (c:\Users\Nolan\.vscode\extensions\sumneko.lua-3.8.3-win32-x64\client\out\addon_manager\panels\WebVue.js:227:27)
	at o.y (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:660)
	at o.fire (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:877)
	at w.$onMessage (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:145:14048)
	at c.S (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:5505)
	at c.Q (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:5271)
	at c.M (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:4361)
	at c.L (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:3579)
	at a.value (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:2227)
	at o.y (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:660)
	at o.fire (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:877)
	at u.fire (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:107:14175)
	at a.value (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:176:8023)
	at o.y (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:660)
	at o.fire (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:877)
	at u.fire (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:107:14175)
	at MessagePortMain.<anonymous> (c:\Users\Nolan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:176:6303)
	at MessagePortMain.emit (node:events:517:28)
	at MessagePortMain.emit (node:domain:489:12)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
	at Object.topLevelDomainCallback (node:domain:161:15)
	at Object.callbackTrampoline (node:internal/async_hooks:128:24)

@carsakiller
Copy link
Collaborator

Well this is an odd one. I'm not sure what is truly causing the problem, as the stack trace you provided points to a different extension (searking.preview-vscode-2.3.3) and then a string padding function that is called by a log function call.

I have a few guesses as to what it could be.

  1. Try disabling the searking.preview-vscode-2.3.3 extension, reloading the window, and then giving the addon manager a shot. It is at the top of the stack trace for some reason and may somehow be responsible. Perhaps it is mistaking the addon manager webview as one of its own?

  2. Git is unable to reach GitHub and the LLS-Addons repo. Try a manual git clone to make sure it can be done.

  3. It could be a permissions issue. The addon manager creates a directory at %appdata%/Code/User/globalStorage/sumneko.lua/addonManager to install addons into. If it cannot read and write into this directory, the addon manager would cease to work. The error should clearly state this is the issue, but perhaps for some reason this is not the case.

  4. Something has corrupted in a really ugly way and just completely removing %appdata%/Code/User/globalStorage/sumneko.lua/addonManager may fix it.

@ThePython10110
Copy link
Author

Disabling the preview extension seems to have worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants