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

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.

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.

Related

Error when deploying my app to shiny server

I have created a shiny app on my computer that runs with no error. Now, I deployed the same app to the shiny server we have in our organization, and i cannot initiate the app. I receive the following error message:
transpose listening on http://127.0.0.1:43202
Warning: Error in tabPanel: argument "tabName" is missing, with no default
65: tabPanel
Execution halted
here are my questions:
(1) I do use shinydashboard and shinydashboardplus libraries in my app and both are installed on the shiny server as well so this shouldnt be a problem since tabsetPanel and tabPanel are in these libraries, correct?
(2) tabPanel and tabSetPanel do NOT have a tabName argument. so what is this error specially because the app does work on my computer with no issue.
I know probably I need to provide the code but I cannot at the moment unless i significantly take stuff out of it (government property) but I was hoping someone can help considering the fact that it works on my computer but it doesnt when i deploy it.
Just a quick note that the R version installed on my laptop is 3.5.2 but the one on the server is 3.6! can this be an issue?
Thanks!
I think a library bs4Dash was masking tabSetPanel which is quite confusing because i didnt have that problem running the app on my laptop...

How to deploy angular2 on tomcat?

First I'd like to describe my set up:
I have a web service, let's call it "Cars", written in Java, that I've tested in eclipse with tomcat v6, working local (it was a requirement, so that once it works locally I can switch to do it with a "real" tomcat server so others can access). It works, it access the database, it offers an answer for certain URIs and so on.
I have coded in Plunker an angular 2 application, "WebCar", and I now want to run that on my computer, with a Tomcat server (unless there is a better way of doing it, I've been told to do it with Tomcat. Since I do not know any better option, that's why I talk about tomcat all of the time). With eclipse, I have already managed to get the app running, using palantir plugin for typescript https://marketplace.eclipse.org/content/typescript , and then running the project with a server-launch.js which contains require('lite-server'); , this allows me to see the same I saw on plunker, so, it works, but before I upload anything to the business servers I wanted to check everything works (hence the set up, which may not be necessary but it's what I come up with).
I now want to go one step further and use, if possible, tomcat v6 to run my angular 2 app, instead of simply using that lite server, so that I can test that it works, and then uploading it to a "real", remote server.
I would like to know what options are there, what would be a better option, and anything that is required to make an angular 2 deployment properly. So far I've found this
https://stackoverflow.com/a/34408495/6028947 " You only have to deploy
.js files, since anyway browser won;t" which I don't fully get,
http://jspm.io/ which is for SystemJS (I have an older version of
Angular 2 and use config.js)
https://stackoverflow.com/a/37568235/6028947 which talks about
angular-cli or webpack, which makes a bundle but if I got that
running, I still don't know what to do with it to upload to Tomcat
and then connect it to my web service.
So maybe the question should be (I don't know for sure): Once you get your angular 2 code bundled, what's next?
Btw there are a few other questions on stackOverflow, similar to this, but as far as I've seen, without any answer at all or with answers only obliquely related to this (and of course, nothing resembling a guide or step by step required)
Thanks to #nuzz for this ..
I'm running a little script to build the project and then copy it to tomcat. I'm telling angular what the base directory is that it will run under in tomcat.
#!/bin/sh
ng build --base-href /angular/ --prod
mkdir -p /home/xxx/apache-tomcat-8.0.37/webapps/angular
cp -R /home/xxx/angular-clitest/dist/* /home/xxx/apache-tomcat-8.0.37/webapps/angular/
Once thats run, start tomcat and you can access it at: http://localhost:8080/angular

GWT - DevMode: 'gwt.google.com not found' - 'Cannot display web page'

really need some help.
I have been working for the past 3 days trying to get a webpage to open when I run my web based Java-GWT-eclipse program. IE gives me error "Internet Explorer cannot display webpage" and chrome says "The webpage is not available- The server at gwt.google.com can't be found, because the DNS lookup failed."
I have tried this project on multiple other computers with an older eclipse-gwt plugin installed and it works great. All of these computers are dev boxes and do not have internet access. It does, however, have a solid connection to the database (SQL dev works fine).
what i have tried
copied eclipse and gwt plugin files from another dev box and installed. Gave me above error.
deleted/ uninstalled everything and installed newest version eclipse and gwt plugin. I was able to install gwt in eclipse but it could not locate GWT-user.jar file and would not allow me to create project.
Tried #2 again, same problem. Tried again on another computer, same problem.
Applied older version SDK to newer eclipse version. Gave same error as posted above/ #1.
ran wireshark on a working dev and the problem dev and the problem dev box was trying to communicate with google while the good one was going to some local IP address.
messed around with every setting in eclipse and nothing has worked.
What is left to try??? I am going insane.
What is the web page you are trying to open: http://gwt.google.com ?
Does this page load if you write the url directly in the address box of your browser ?
Does Internet work in that computer? try to access google or any other page.
This error is a clear case of a miss-configuration on your PC internet stack:
The server at gwt.google.com can't be found, because the DNS lookup failed.
What does return this command in your console?
nslookup gwt.google.com
EDITED:
After reading your comments I figure out what is happening: your browser has not the gwt-plugin installed, so the first time it connects to a gwt-dev-mode app, the app redirects it to the gwt site to download the plugin and install it.
You have either, connect this computer to the internet to install the plugin the first time it is requested, or download the plugin and install it manually.

GWT: Running the development mode code server (from Eclipse)

i am only start learning GWT by following their tutorial on https://developers.google.com/web-toolkit/doc/2.1/tutorial/create
On that page, when i reach the heading Running the development mode code server (from Eclipse), i copied the generated url http://127.0.0.1:8888/StockWatcher.html?gwt.codesvr=127.0.0.1:9997 to my browser.
It eventually times out, says page not loading...the plugin page did not show up initially, so i manually installed the plugin...but it still times out...
On the screen, it says...
===============================================================================
The connection was reset
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web
==============================================================================
Am i missing any configurations etc?
Thanks very much in advance
It still looks like your browser is missing the GWT developer plugin. Try a different browser (preferably Chrome). You can also check the instalation of GWT in Eclipse. Look into Windows/Preferences and under Google/WebToolkit you should see checked GWT SDK. Also you can check if a jetty server runs on port 8888, when you type "netstat -na" on the command line.

Debugging a GWT application in a remote environment

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.
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.
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...