Application with code splitting not working in dev mode

99 views
Skip to first unread message

Thomas Lefort

unread,
Oct 6, 2014, 8:52:02 AM10/6/14
to google-we...@googlegroups.com
I have a strange problem.

My application runs fine in prod but I can't get it to start in dev mode. This happend from the day I started to add some code splitting into it.

I use gwt 2.6.1. I have used a "pattern" for code splitting which might not go down well with dev mode? The pattern is as follows: I wanted to have my code splitting around groups of activities (ie before login, after login), so I created two abstract activities which call the runAsync in their start method, when the callback is called, the activity overriding this abstract class is started using a new method called startAsync, which effectively does what the start method normally does. Could this be a problem?


Thomas Lefort

unread,
Oct 9, 2014, 6:31:52 AM10/9/14
to google-we...@googlegroups.com
Hi,

turns out it doesn't work in SuperDevMode either. I looked at the boot sequence and the iframe is never created and the module never loaded by the *.nocache.js file (which is loaded fine). So, looks like something is wrong with the generation of the bootstrap file. There is no error raised in the javascript console. I am not quite where to go from here... any idea of something I could test to isolate further the root of my app not loading? I still have a strong feeling it is linked to the code splitting, but may be not...

Thanks

Joseph Lust

unread,
Oct 9, 2014, 11:02:36 AM10/9/14
to google-we...@googlegroups.com
Error messages? Traces? 

FWIW, code splitting in GWT-P has always worked 100% for me in DM and SDM.

-Joe

Thomas Lefort

unread,
Oct 9, 2014, 12:39:04 PM10/9/14
to google-we...@googlegroups.com

No trace, nada. The module doesn't get loaded at all. In dev mode I set a breakpoint first line on the entry point but it never gets to this point. I have several modules and applications under the same war. The ones without code splitting are working fine as always, the one with stopped working the day I added the split points. I sure did some other changes but this is the most important one.
I will try removing the split points to see if it gets better (quite a lot of them though, which is why I haven't done it yet).

Apart from that I use intellij idea 13 and gwt 2.6.1

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/DpqEVihJo6E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Joseph Lust

unread,
Oct 9, 2014, 3:32:12 PM10/9/14
to google-we...@googlegroups.com
I meant any errors in the browser. Usually you'll get at least something the dev JS console. If not, you can compile in pretty mode and step through your .nocache bootstrap JS file and see how far it gets through there before failing, since you're not seeing it get to your entry point.

In these cases I'm using Super Dev Mode, so that might be different from your experience.

Joe

Thomas Lefort

unread,
Oct 10, 2014, 4:09:48 AM10/10/14
to google-we...@googlegroups.com
Thanks Joe.

I removed all split points and I still have the same situation... My dev mode or super dev mode won't work, whilst my compiled code works (although not all compilations work! sometimes it hangs the same).

Re your suggestion, I set my compiler sttings to compile to PRETTY but all I'm getting from my server is the obsfucated version of the nocache file (I use the embedded jetty server). I guess it's the case until I start the Dev Mode On, but it never starts because it can't find the module...
In any case, I noticed then that the nocache file was an old one (pre my change of sdk from 2.5.1 to 2.6.1), cleaned my directory so that it'd be regenerated. I restarted dev mode and I now have a message in my console ;-) ie the devmode file is missing. For some reason the devmode file isn't created/added to the directory, why would that happend? how can I get back to "normal"?

Looks like it's nothing to do with code splitting but more with something that got messed up when I switched sdks...


--

Thomas Lefort

unread,
Oct 11, 2014, 5:16:37 AM10/11/14
to google-we...@googlegroups.com
FOUND IT! Nothing to do with all the previous... It was due to a module I created to share code between the different applications. The module is in the same project and it messes up the dev mode compilation, but not the production compilation for some reason... gashhhhh. I don't know if it is something to do with Intellij IDEA or the gwt compiler, my hunch is that it's more likely to be the former.


On Friday, 10 October 2014 10:09:48 UTC+2, Thomas Lefort wrote:
Thanks Joe.

I removed all split points and I still have the same situation... My dev mode or super dev mode won't work, whilst my compiled code works (although not all compilations work! sometimes it hangs the same).

Re your suggestion, I set my compiler sttings to compile to PRETTY but all I'm getting from my server is the obsfucated version of the nocache file (I use the embedded jetty server). I guess it's the case until I start the Dev Mode On, but it never starts because it can't find the module...
In any case, I noticed then that the nocache file was an old one (pre my change of sdk from 2.5.1 to 2.6.1), cleaned my directory so that it'd be regenerated. I restarted dev mode and I now have a message in my console ;-) ie the devmode file is missing. For some reason the devmode file isn't created/added to the directory, why would that happend? how can I get back to "normal"?

Looks like it's nothing to do with code splitting but more with something that got messed up when I switched sdks...

On 9 October 2014 21:32, Joseph Lust <lifeo...@gmail.com> wrote:
I meant any errors in the browser. Usually you'll get at least something the dev JS console. If not, you can compile in pretty mode and step through your .nocache bootstrap JS file and see how far it gets through there before failing, since you're not seeing it get to your entry point.

In these cases I'm using Super Dev Mode, so that might be different from your experience.

Joe

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/DpqEVihJo6E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages