Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.49k stars 174 forks source link

Exception Error after "F5" on KHA init project...(Can't get it to work at all...) #1243

Closed Lykdraft closed 4 years ago

Lykdraft commented 4 years ago

This happens when I "F5" the KHA init project... Any idea what is going on here?



A JavaScript error occurred in the main process

Uncaught Exception:
ReferenceError: dialog is not defined
    at Object.<anonymous> (/Applications/Kode Studio.app/Contents/Resources/app/out/main.js:77:4)
    at Object.<anonymous> (/Applications/Kode Studio.app/Contents/Resources/app/out/main.js:671:3)
    at Module._compile (module.js:642:30)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Object.<anonymous> (/Applications/Kode Studio.app/Contents/Resources/electron.asar/browser/init.js:186:8)
    at Object.<anonymous> (/Applications/Kode Studio.app/Contents/Resources/electron.asar/browser/init.js:188:3)
    at Module._compile (module.js:642:30)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Function.Module.runMain (module.js:683:10)
    at startup (bootstrap_node.js:196:16)
    at bootstrap_node.js:622:3

Then, next, a popup window:


Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:14474).

With some other test project I get:

Task 'Kha: Build for Debug HTML5' can not be referenced from a launch configuration that is in a different workspace folder.

But at least when I do "debug anyway' a window opens, but black and I get a warning in the terminal: kha/graphics4/PipelineState.hx:111: Warning: Sampler tex not found

That's all I could get out of it after an hour or two trying. So I give it up for now. Any help?

Thanks, tL.

(This is on OSX 10.14.6.)

RobDangerous commented 4 years ago

So I see you are using Kode Studio from the first error message but it looks like some vscode things are going wrong there. Can you try with vscode and the Kha extension pack instead and see if you get the same result? Also curious about that "that is in a different workspace folder" message, did you maybe somehow create a multi-workspace project? Because those are not supported. The "Sampler tex not found" warning is really just a warning and can be ignored. Whether it's right that the window is black depends on the application you were running.

Lykdraft commented 4 years ago

Visual Studio Code:

/usr/local/bin/npm run-script debug
Debugger listening on ws://127.0.0.1:53142/253fac63-b7c5-4ff9-a231-e1f24c3e7ad7
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
--- Truncated to last 15 messages, set outputCapture to 'std' to see all ---
 -2
npm ERR! enoent ENOENT: no such file or directory, open '/Volumes/HDD2/Luetze/Haxe/KHA/TEST/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Volumes/HDD2/Luetze/.npm/_logs/2020-09-06T16_37_55_902Z-debug.log
Waiting for the debugger to disconnect...
Process exited with code 254
Lykdraft commented 4 years ago

However: I just finished cloning the "empty project template" and updated kha submodules via git like in the instructions and that project builds without errors.

So I guess something was wrong somewhere inbetween... Not sure what it was but I think I can consider this problem solved for now.

Thanks, tL.

Lykdraft commented 4 years ago

(I'd also like to add that I tried this now in both VSCode and KODE and both work now.)

RobDangerous commented 4 years ago

"npm run-script debug" was definitely not the right thing, looks like you had additional debug configs in there (you can always just delete the .vscode subdir in your project when something like that happens).