IntelliJ teavm plugin not loading, need help how to debug

90 views
Skip to first unread message

Dylan Scott-Dawkins

unread,
Aug 20, 2022, 11:43:00 AM8/20/22
to TeaVM
Hi all,
I installed the dev version of the idea plugin and all other Teavm deps are on 0.7.0.
When running the dev server I get a timeout when trying to connect from the browser.
I attached the timeout error screenshot. 

Happy to help debug and spend some time looking into this, just not sure where to start.
not:e firefox target/flows-ui-1.0-SNAPSHOT/index.html works as expected.
- Dylan.
Screenshot_20220820_083126.png
Screenshot_timeout_error.png
Screenshot_20220820_083432.png

Dylan Scott-Dawkins

unread,
Aug 20, 2022, 11:55:13 AM8/20/22
to TeaVM
tried SDK 11 and 1.8 same result.

Jeff Martin

unread,
Aug 21, 2022, 1:09:17 PM8/21/22
to Dylan Scott-Dawkins, TeaVM
Hi Dylan! I can’t be of much help since I haven’t used the IJ TeaVM plugin, but here is my simple gradle file I use to build TeaVM apps (and I also use IJ):


Really only the first 70-80 lines are interesting. I haven’t yet tried to incorporate the TeaVM dev, but I suspect it will be easy (once I stop being so lazy).

jeff


--
You received this message because you are subscribed to the Google Groups "TeaVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to teavm+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/teavm/fe86c598-7efa-4144-9dfa-68d0b4ce41ddn%40googlegroups.com.

cyberquarks

unread,
Feb 18, 2023, 12:20:34 PM2/18/23
to TeaVM
Does anyone have any success running the TeaVM development server with IntelliJ? 

Jeff Martin

unread,
Feb 18, 2023, 12:40:14 PM2/18/23
to cyberquarks, TeaVM
I still haven’t tried this, though I’ve been assuming that I just need to add the “-i” (interactive) flag to my tv_compile task.

My workflow is to do all my development in desktop Java, then transpile the final product to JavaScript. It has been a while since I have run into a debug situation with TeaVM/JS that requires multiple compiles. I tried adding the “-i” flag just now, but my build is currently in a bad state that pulls in some advanced JRE - I need to iron that out before I can run a good test again (probably next week).

That build.gradle has served me well, even though I am not a gradle expert. :-)

jeff



reportm...@gmail.com

unread,
Feb 21, 2023, 4:30:58 PM2/21/23
to TeaVM
Well I'm an idiot - the deal is not to use the -i incremental flag (not sure what that does), it is to use the TeaVMDevServerRunner class instead of TeaVMRunner. However, I made a gradle task for that, and it seems to be working, but I can't load the webpage in the browser.

Here is my gradle task:

/**
* Run TeaVM dev server
*/
task tv_dev (type: JavaExec){
description = "Run TeaVM dev server"
jvmArgs = [ '-Xmx1200m' ]
main = 'org.teavm.cli.TeaVMDevServerRunner'
args = [ "-d", TV_OutDir, mainClassName ]
classpath = sourceSets.main.runtimeClasspath
}

Then I try to load localhost:8888 in my browser and it just shows an empty page. It shows this in the console:

2023-02-21 15:16:46.476:INFO:oejs.AbstractConnector:main: Started ServerConnector@706a04ae{HTTP/1.1, (http/1.1)}{0.0.0.0:8888}
2023-02-21 15:16:46.477:INFO:oejs.Server:main: Started @220ms
INFO: Starting build
INFO: Recompiled stale methods: 15800
INFO: Build complete successfully
INFO: Classes compiled: 2384
INFO: Methods compiled: 22758
INFO: Compilation took 30546 ms

jeff
Reply all
Reply to author
Forward
0 new messages