GWT 2.7 Super Dev Mode not working while testing on the same network

3.3k views Asked by At

I recently began using GWT 2.7 in Eclipse Luna and I was running my projects seamlessly while testing them in localhost:8888, the thing is, when I tried to test them (any of them, even a new app with only the autogenerated content) with another device on the same local network using (pc running eclipse ip):8888 I get a message like this:

The page at (ip):8888 says: Couldn't load (app) from Super Dev Mode server at http://(ip):9876. Please make sure this server is ready. Do you want to try again?

This also happens when I try to access to the app in the pc running eclipse with (its own ip):8888.

I've checked these four similar questions, but they didn't have any really helpful answers, these are a few things I've tried or discovered already:

  • I enabled the 9876 port on the firewall
  • I've deleted the .nocache.js and .devmode.js so that they're generated again
  • I noticed that when this problem occurs it's because the browser can't get the (ip):9876/recompile-requester/(app) file
  • I tried deploying the app to GAE and it doesn't work there either, nothing that happens on the modules Java code runs (And for some reason, I get a "Uncaught java.lang.ClassCastException" message on the chrome console, but this only happens on the deployed version, it doesn't happen on localhost:8888 or in (local ip):8888)

But nothing has worked and the four questions I mentioned are pretty much the only things related to this I've found, so I really don't know what else to try.

1

There are 1 answers

1
Alan Dávalos On BEST ANSWER

As Thomas pointed out, the problem I had was that from GWT 2.6 onwards, if you want to test from other devices in the same network, you have to whitelist the addresses you'll be using in each *.gwt.xml file using a command line like this:

<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(localhost|127\.0\.0\.1|192\.168\.150\.(\d{1,3}))(:\d+)?/?.*" />

I also had to add a -bindAddress 0.0.0.0 attribute to the run config for it to work.