clojure.lang.ExceptionInfo: handler ':open' in context ':global' failed at ':run' with message 'Value too long:[...]

Hello there!

Yesterday, out of the blue, when I tried to open a script in the editor, I got this error message and since then, I can build but cannot open anything in the editor apart from images. No script, no gui, no atlas, nothing:

clojure.lang.ExceptionInfo: handler ':open' in context ':global' failed at ':run' with message 'Value too long: 

There follows a long list of every project folder and its contents I opened in the past couple of days, 28 in total - as if Defold tries to open all of them at once.

I tried to open files in other projects and have the same problem now.
I removed build folders and .internal folders, this did not help.
Next, I cleared the list of recently opened projects Defold presents, this helped for a couple of minutes, same when reinstalling Defold.

Is there anywhere I should look on my mac mini m1 that could help to solve this?

Edit: I then transported one of the projects to my Linux laptop, where everything is ok.

HI @anon95708182 !
What does your latest editor log say?
I think it would be good to have a look at it.

1 Like

Hello Mathias, thank you! I’ll pm you the files, the log and the error.

For @vlaaad is is reported in Sentry as here and here

1 Like

Thanks, I’ll have a look on Monday!

2 Likes

Great - thank you, @vlaaad!

@anon95708182 while I’m fixing the issue, I can provide a workaround: remove your java preferences. Depending on the OS, it might be in different places. If you are on a mac, try deleting ~/Library/Preferences/com.apple.java.util.prefs.plist and see if it helps. If you are on a different OS, please tell me and I’ll try to find where its location is (or you can google it yourself, what you need to find is where java user root preferences are located on your OS).

4 Likes

Ah, that’s the file! I’ve been looking in every folder on the mac for anything with “Defold” in the name, deleted and then reinstalled and then ran out out of ideas as to where these data might have been stored.
The error is gone now :partying_face: - @vlaaad, thank you so much for your help :smiling_face_with_three_hearts:

4 Likes

Face the same issue on Windows(Cause by too many projects, I think).
The java preference is located at HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\defold,
Look for recent-files-by-workspace-root key and delete/modify.

2 Likes

Hello! i have same problem. I just setup external editor in defold for mac os. I cannot open script files.

clojure.lang.ExceptionInfo: handler ‘:open’ in context ‘:global’ failed at ‘:run’ with message ‘Cannot run program “/Applications/Visual Studio Code.app” (in directory “/Users/user/Documents/druid-master”): error=13, Permission denied’
java.io.IOException: Cannot run program “/Applications/Visual Studio Code.app” (in directory “/Users/user/Documents/druid-master”): error=13, Permission denied
java.io.IOException: error=13, Permission denied


Removing ~/Library/Preferences/com.apple.java.util.prefs.plist directory did not solve the problem

hey there
the path you’re using in the custom editor is not complete. You should use something like:
/Applications/Visual Studio Code.app/Contents/MacOS/Electron

follow this guide to use vscode:

2 Likes

Thank you! Dont know how I missed it :confused: