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

Melty screen black after first task. #85

Open
iamlasse opened this issue Sep 21, 2024 · 12 comments
Open

Melty screen black after first task. #85

iamlasse opened this issue Sep 21, 2024 · 12 comments

Comments

@iamlasse
Copy link

After running melty ai once, the extension overlay goes blank and just shows a black screen. I've attached some screenshots of the issue.

The console running melty:code also shows some warnings and notices

pi/browser/mainThreadExtensionService.js (55)
[57253:0921/130303.571144:INFO:CONSOLE(56)] "SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /Users/lasselarsen/.meltycode-dev/extensions/mohamedbenhida.laravel-intellisense-0.2.0-universal/src/ViewItemProvider.ts:58:25", source: vscode-file://vscode-app/Users/lasselarsen/Developer/melty/out/vs/workbench/api/browser/mainThreadExtensionService.js (56)
[57253:0921/130303.940735:INFO:CONSOLE(104)] "%c[Extension Host] %c[Codeium Chat] no webview to send message to. %c(at console.<anonymous> (/Users/lasselarsen/Developer/melty/out/vs/workbench/api/common/file:/Users/lasselarsen/Developer/melty/src/vs/workbench/api/common/extHostConsoleForwarder.ts:50:10)) color: blue color:  color: grey", source: vscode-file://vscode-app/Users/lasselarsen/Developer/melty/out/vs/base/common/console.js (104)
[57253:0921/130306.945685:INFO:CONSOLE(104)] "%c[Extension Host] %c[Codeium Chat] no webview to send message to. %c(at console.<anonymous> (/Users/lasselarsen/Developer/melty/out/vs/workbench/api/common/file:/Users/lasselarsen/Developer/melty/src/vs/workbench/api/common/extHostConsoleForwarder.ts:50:10)) color: blue color:  color: grey", source: vscode-file://vscode-app/Users/lasselarsen/Developer/melty/out/vs/base/common/console.js (104)
[57253:0921/130308.575467:INFO:CONSOLE(104)] "%c[Extension Host] %crejected promise not handled within 1 second: SyntaxError: Unexpected end of JSON input %c(at console.<anonymous> (/Users/lasselarsen/Developer/melty/out/vs/workbench/api/common/file:/Users/lasselarsen/Developer/melty/src/vs/workbench/api/common/extHostConsoleForwarder.ts:50:10)) color: blue color:  color: grey", source: vscode-file://vscode-app/Users/lasselarsen/Developer/melty/out/vs/base/common/console.js (104)
[57253:0921/130308.576120:INFO:CONSOLE(104)] "%c[Extension Host] %cstack trace: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /Users/lasselarsen/.meltycode-dev/extensions/mohamedbenhida.laravel-intellisense-0.2.0-universal/src/ViewItemProvider.ts:58:25 %c(at console.<anonymous> (/Users/lasselarsen/Developer/melty/out/vs/workbench/api/common/file:/Users/lasselarsen/Developer/melty/src/vs/workbench/api/common/extHostConsoleForwarder.ts:50:10)) color: blue color:  color: grey", source: vscode-file://vscode-app/Users/lasselarsen/Developer/melty/out/vs/base/common/console.js (104)
[57253:0921/130308.576267:INFO:CONSOLE(55)] "[mohamedbenhida.laravel-intellisense]Unexpected end of JSON input", source: vscode-file://vscode-app/Users/lasselarsen/Developer/melty/out/vs/workbench/api/browser/mainThreadExtensionService.js (55)
[57253:0921/130308.576332:INFO:CONSOLE(56)]
Screenshot 2024-09-21 at 13 01 03 Screenshot 2024-09-21 at 13 02 07 Screenshot 2024-09-21 at 13 02 24
@erson
Copy link

erson commented Sep 22, 2024

remove node_modules and pull the latest version. reinstall with yarn.
try again with ./scripts/code.sh
I think your issue is going to be resolved.

@iamlasse
Copy link
Author

I've pulled down the latest (I was already on the latest main) and deleted node_modules. The problem still persists. Each task ends in a blank black screen and I have to quit to get the melty ai screen back

@abhi12299
Copy link
Contributor

what's the error on the devtools?

@iamlasse
Copy link
Author

I will check, i hadn't thought of the devtools.

@jacksondc
Copy link
Collaborator

Hey, I believe there's a memory leak introduced in the latest version. Need to look into this.

@iamlasse
Copy link
Author

iamlasse commented Sep 24, 2024

main.js:40 TypeError: Cannot read properties of undefined (reading 'map')
at wse (main.js:393:9810)
at Yy (main.js:38:16998)
at HE (main.js:40:3139)
at LL (main.js:40:44804)
at OL (main.js:40:39766)
at Q$ (main.js:40:39694)
at Ec (main.js:40:39547)
at ev (main.js:40:35914)
at AL (main.js:40:34865)
at _ (main.js:25:1539)

main.js:393 Uncaught TypeError: Cannot read properties of undefined (reading 'map')
at wse (main.js:393:9810)
at Yy (main.js:38:16998)
at HE (main.js:40:3139)
at LL (main.js:40:44804)
at OL (main.js:40:39766)
at Q$ (main.js:40:39694)
at Ec (main.js:40:39547)
at ev (main.js:40:35914)
at AL (main.js:40:34865)
at _ (main.js:25:1539)

ERR [uncaught exception in main]: net::ERR_CONNECTION_REFUSED: Error: net::ERR_CONNECTION_REFUSED
at SimpleURLLoaderWrapper. (node:electron/js2c/browser_init:2:114482)
at SimpleURLLoaderWrapper.emit (node:events:519:28)

These are some errors that show up when the screen goes black.

@rrfaria
Copy link

rrfaria commented Sep 24, 2024

Same issue here after some interactions.

I just asked Melty to rewrite my app using React.
After thinking a little and writing some code, it broke.

image

@rrfaria
Copy link

rrfaria commented Sep 24, 2024

I solved this issue by adding optional chain on each map in.
Just search on folder for .map

extensions/spectacular/src/backend/

image

But another issue appeared, if I have more time I'll help investigate:

image

another error that always happen and I yet don't found solution:

mainThreadExtensionService.ts:79 Error: No such branch: master.
	at Repository.getBranch (vscode-file://melty/extensions/git/out/git.js:2077:31)
	at async Repository.retryRun (vscode-file://melty/extensions/git/out/repository.js:1667:24)
	at async Repository.run (vscode-file://melty/extensions/git/out/repository.js:1641:28)
	at async Repository.getBranch (vscode-file://melty/extensions/git/out/repository.js:1122:16)
	at async Repository.getBranchBase (vscode-file://melty/extensions/git/out/repository.js:1131:24)
	at async GitHistoryProvider.resolveHEADMergeBase (vscode-file://melty/extensions/git/out/historyProvider.js:283:27)
	at async GitHistoryProvider.onDidRunGitStatus (vscode-file://melty/extensions/git/out/historyProvider.js:43:27)

I some case this error happen but is sporadically:

  ERR [uncaught exception in main]: net::ERR_CONNECTION_REFUSED: Error: net::ERR_CONNECTION_REFUSED
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:2:114482)
    at SimpleURLLoaderWrapper.emit (node:events:519:28)

@jacksondc
Copy link
Collaborator

I think the .map issue was introduced by a change I made a few days ago; if so, this should fix it.

I'll try to take a look at the other issues soon.

@iamlasse
Copy link
Author

I've pulled down the latest version of main, reinstalled yarn deps and recorded a video for you to see the issue still happens

https://share.vidyard.com/watch/bn879qwyBb9RaL3Sq3ficx?

@rrfaria
Copy link

rrfaria commented Sep 25, 2024

@iamlasse @jacksondc

For me, to works, I did these steps:

  • add optional chain on each map in. Just search on folder for .map

extensions/spectacular/src/backend/

image

Note:

Sometimes, the AI didn't follow instructions to <change_code> and broke because it didn't save the file. To address this, I made some tweaks on prompt and force model to remember system prompt instructions.

image

then ai fixed this issue.

Another issue is with git commit, when model tries to commit code it brokes, to avoid it, I asked to model to postpone the commit until I finish implementation. It didn't solve the problem but I could finish the code generation using melty.

@iamlasse
Copy link
Author

I have changed to optional .map in 2 places and that seemed to work for this issue. I can make a pr if you want, or just tell you where I made the changes here.

Screenshot 2024-09-30 at 09 42 15 Screenshot 2024-09-30 at 09 42 37

Very simple changes really.

GQAdonis pushed a commit to GQAdonis/melty that referenced this issue Oct 22, 2024
* bot changes

* prompt adjustments (FileContents tag name)

* undo bad bot changes

* copy types to webview

* bot changes

* bot changes

* human changes

* bot changes

* bot changes

* bot changes
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

5 participants