Discussion:
GWT 2.8b1: "runAsyncCallback7 is not a function" - compiler error with GWT.runAsync(...)?
c***@gmail.com
2016-05-06 20:21:01 UTC
Permalink
Hi there,

I've been migrating an application from GWT 2.5 to GWT2.8b1. After working
around how to debug in Super Dev Mode and getting the app to run relatively
smoothly, we've encountered an odd issue in the generated JS code which
does not show up when debugging:

Stack Trace from Chrome:
Uncaught TypeError: $wnd.MY_MODULE_LAUNCHER.runAsyncCallback7 is not a
function
(anonymous function) @ VM420:1
MY_MODULE_LAUNCHER.__installRunAsyncCode @ MY_MODULE_LAUNCHER.nocache.js:11
__gwtInstallCode @ MY_MODULE_LAUNCHERr-0.js:1
hSn @ MY_MODULE_LAUNCHER-0.js:15518
XSn @ MY_MODULE_LAUNCHER-0.js:14712
YSn.b.onreadystatechange @ MY_MODULE_LAUNCHER-0.js:15550

Problematic line (referenced as VM420:1 above):
$wnd.MY_MODULE_LAUNCHER.runAsyncCallback7("VERY_VERY_LONG_STRING_OF_JS_CODE_HERE");

I've removed all the code-splitting (GWT.runAsync()) from the application
and this JS error disappears, which gets us moving for now but I'm
wondering:
- is this a regression bug? This had worked fine in GWT 2.5. Bug to be
fixed because it is beta?
- is this just a change in GWT.runAsync I missed somewhere?
- Am I just bad at code-splitting/GWT.runAsync and this is a case of user
error?
- Infamous "other"

Thanks for any input/feedback.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2016-05-24 20:06:04 UTC
Permalink
I haven't managed to find any further info here... suppose I'll regard
GWT.runAsync() as "broken" avoid it going forward.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Jens
2016-05-24 21:53:04 UTC
Permalink
Post by c***@gmail.com
I haven't managed to find any further info here... suppose I'll regard
GWT.runAsync() as "broken" avoid it going forward.
I don't think its generally broken, otherwise lots of people would complain
about it, myself included as we use code splitting at work. Does your app
use a custom GWT linker?

By default GWT 2.8 uses com.google.gwt.core.linker.CrossSiteIframeLinker
and if you take a look at that class and at the method
wrapDeferredFragment() you will see that this method is responsible
creating the runAsyncCallback functions. Somehow these runAsyncCallback
functions do not exist in your app and thus GWT.runAsync() fails in your
app as it can not install the downloaded code.

-- J.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2016-05-25 17:57:24 UTC
Permalink
I did add a custom linker in order to get HTTPS sort of working for SDM
debugging. A very simple class derived from CrossSiteIframeLinker and only
overriding getJsDevModeRedirectHookPermitted(...). No custom linker was
used previously.

Feels like a regression to me... I guess I'd need to check what linker was
used in GWT 2.5 and which is used during SDM, as the issue didn't manifest
in either place (only in production).
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Phuoc Huynh
2018-07-25 04:03:38 UTC
Permalink
We were also getting this issue when we migrated it to 2.8.2. With the
upgrade, we had to define a custom linker name instead of overloading the
"xsiframe" name like we were doing in 2.7. We thought that was enough but
then this error occurred. The fix was to basically replicate this deferred
binding that GWT had defined in CrossSiteIframeLinker.gwt.xml, but for our
custom linker name.

<replace-with class="com.google.gwt.core.client.impl.ScriptTagLoadingStrategy">
<when-type-is
class="com.google.gwt.core.client.impl.AsyncFragmentLoader.LoadingStrategy" />
<any>
<when-linker-added name="custom_linker" />
</any>
</replace-with>
Post by c***@gmail.com
I did add a custom linker in order to get HTTPS sort of working for SDM
debugging. A very simple class derived from CrossSiteIframeLinker and only
overriding getJsDevModeRedirectHookPermitted(...). No custom linker was
used previously.
Feels like a regression to me... I guess I'd need to check what linker was
used in GWT 2.5 and which is used during SDM, as the issue didn't manifest
in either place (only in production).
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Loading...