3

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.

Community
  • 1
  • 1
Alan Dávalos
  • 2,568
  • 11
  • 19
  • On mobile right now so can't write a full answer; search for devModeUrlWhitelistRegexp on SO (and GWT release notes). – Thomas Broyer Jun 18 '15 at 07:21
  • 1
    Thanks for answering, I tried adding this line to my .gwt.xml file but I still get the same problem `` – Alan Dávalos Jun 18 '15 at 16:26
  • I now added a `-bindAddress 192.168.150.66` argument to the run config and now it only works there but not in localhost, is there any way to make it work on both? – Alan Dávalos Jun 18 '15 at 16:45
  • 1
    Never mind that, I changed the -bindAddress for 0.0.0.0 and now everything works locally, it seems that the problem I have with the deployed app is a classcastexception during an initwidget in a UI for my app (which for some reason only occurs while deployed) – Alan Dávalos Jun 18 '15 at 17:19
  • You should answer your own question if/when you can. – Thomas Broyer Jun 18 '15 at 21:29

1 Answers1

4

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.

Alan Dávalos
  • 2,568
  • 11
  • 19