3

I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:

http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997

I get

Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions

My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?

If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)

Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.

Community
  • 1
  • 1
Irfy
  • 9,323
  • 1
  • 45
  • 67
  • 1
    and by deploying you mean GWT compiling and running in a web server? – milan Jan 18 '12 at 13:10
  • yes, i just updated the question to clarify this. – Irfy Jan 18 '12 at 13:20
  • do you get 'web and server code configuration is unrecognized...'? – milan Jan 18 '12 at 13:37
  • 1
    try with 127.0.0.1 instead of localhost, http://deployment_host/gwtapp.html?gwt.codesvr=127.0.0.1:9997 regardless of -bindAddress 0.0.0.0 (you don't need it for this to work) – milan Jan 18 '12 at 13:39
  • Doesn't work, no change. – Irfy Jan 18 '12 at 14:18
  • hm, i get the same error message with localhost but with 127.0.0.1 works fine – milan Jan 18 '12 at 14:21
  • 1
    maybe addblock, firewall, browser cache, ..., issue. which browser? if it's chrome, then maybe you should add your web server to the allow list of the dev plugin. try firefox. – milan Jan 18 '12 at 14:23

2 Answers2

6

If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.

Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.

Colin Alworth
  • 17,801
  • 2
  • 26
  • 39
  • Now GWT doesn't complain, but after a timeout, Chrome responds with a `Oops! Google Chrome could not connect to deployment_host`, however, if I remove the `?gwt.codesvr` URL parameter, it opens fine. Ideas? – Irfy Jan 18 '12 at 17:07
  • It was a caching problem as suggested by milan. Your solution works now, thank you. – Irfy Jan 18 '12 at 17:27
0

Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)

Just enable and disable it in :

chrome://chrome/extensions/

Good luck! It's the only thing wrong with GWT imho...

HaveAGuess
  • 1,231
  • 1
  • 13
  • 23