clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_33_g$(...).style_86_g$ is not a function
Asked Answered
V

5

6

Well, all of a sudden everything seems to be broken. I can't recall what I changed. I cleaned the whole project, I checked out an older version of it, I removed all code-server compiled files, restarted Eclipse etc. but I am getting the following error here:

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : this.get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_17_g$(...).style_48_g$ is not a function
ConsoleLogger.java:32 TypeError: this.get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_17_g$(...).style_48_g$ is not a function
    at Jmg_g$ [as build_style_17_g$] (HomeView_BinderImpl.java:74)
    at Dmg_g$ (HomeView_BinderImpl.java:43)
    at ymg_g$ [as createAndBindUi_17_g$] (HomeView_BinderImpl.java:31)
    at zmg_g$ [as createAndBindUi_0_g$] (HomeView_BinderImpl.java:28)
    at tmg_g$ (HomeView.java:20)
    at qng_g$ [as com$mz$client$application$admin$home$HomeView_com$mz$client$application$admin$home$HomeView_methodInjection_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:116)
    at xng_g$ [as get_Key$type$com$mz$client$application$admin$home$HomeView$_annotation$$none$$_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:106)
    at ung_g$ [as get_Key$type$com$mz$client$application$admin$home$HomePresenter$MyView$_annotation$$none$$_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:30)
    at vng_g$ [as get_Key$type$com$mz$client$application$admin$home$HomePresenter$_annotation$$none$$_0_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:57)
    at Gng_g$ [as get_27_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:78)
    at Hng_g$ [as get_21_g$] (com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java:77)
    at I5f_g$ [as get_16_g$] (StandardProvider.java:47)
    at b7d_g$ [as getPresenter_0_g$] (ProxyImpl.java:44)
    at lag_g$ [as handleRequest_0_g$] (ProxyPlaceAbstract.java:263)
    at xag_g$ [as onPlaceRequest_0_g$] (ProxyPlaceAbstract.java:201)
    at L6d_g$ [as dispatch_54_g$] (PlaceRequestInternalEvent.java:130)
    at K6d_g$ [as dispatch_1_g$] (PlaceRequestInternalEvent.java:129)
    at W6b_g$ [as dispatch_0_g$] (GwtEvent.java:76)
    at Ngc_g$ (EventBus.java:40)
    at rhc_g$ [as doFire_0_g$] (SimpleEventBus.java:193)
    at yhc_g$ [as fireEventFromSource_0_g$] (SimpleEventBus.java:96)
    at x4d_g$ [as fireEvent_1_g$] (PlaceManagerImpl.java:158)
    at v4d_g$ [as doRevealPlace_0_g$] (PlaceManagerImpl.java:133)
    at R4d_g$ [as revealPlace_1_g$] (PlaceManagerImpl.java:354)
    at Q4d_g$ [as revealPlace_0_g$] (PlaceManagerImpl.java:335)
    at Jxg_g$ [as redirectToLoggedOnPage_0_g$] (LoginPresenter.java:169)
    at Mug_g$ [as loggedInAndInitialized_0_g$] (LoginPresenter.java:125)
    at Vug_g$ [as done_1_g$] (LoginPresenter.java:115)
    at Wce_g$ [as onChildRequestFailure_0_g$] (ParallelRequest.java:144)
    at Xce_g$ [as onChildRequestSuccess_0_g$] (ParallelRequest.java:120)
    at gde_g$ [as onSuccess_0_g$] (Request.java:68)
    at Lfd_g$ [as onResponseReceived_0_g$] (RequestCallbackAdapter.java:232)
    at pjc_g$ [as fireOnResponseReceived_0_g$] (Request.java:250)
    at xkc_g$ [as onReadyStateChange_0_g$] (RequestBuilder.java:412)
    at XMLHttpRequest.<anonymous> (XMLHttpRequest.java:329)
    at DI_g$ (Impl.java:233)
    at GI_g$ (Impl.java:285)
    at XMLHttpRequest.<anonymous> (Impl.java:71)

It is happening now after I login and reveal the home place which looks like this:

private void revealAdminHomePlace() {
    this.placeManager.revealPlace(new PlaceRequest.Builder()
            .nameToken(AdminNameTokens.home)
            .build());
}

Here is the HomeModule:

public class HomeModule extends AbstractPresenterModule {
    @Override
    protected void configure() {
        this.bindPresenter(HomePresenter.class, HomePresenter.MyView.class,
                HomeView.class, HomePresenter.MyProxy.class);
    }
}

The HomePresenter

public class HomePresenter extends Presenter<HomePresenter.MyView, HomePresenter.MyProxy> {

    private final static Logger LOGGER = Logger.getLogger(HomePresenter.class.getName());

    public interface MyView extends View {
    }

    @ProxyStandard
    @NameToken(AdminNameTokens.home)
    public interface MyProxy extends ProxyPlace<HomePresenter> {
    }

    @Inject
    public HomePresenter(EventBus eventBus, MyView view, MyProxy proxy) {
        super(eventBus, view, proxy, AdminToolPresenter.SLOT_AdminToolMainContent);
    }

    @Override
    protected void onReveal() {
        LOGGER.fine("HomePresenter.onReveal()");
        super.onReveal();
    }
}

The HomeView:

public class HomeView extends ViewImpl implements HomePresenter.MyView {

    public interface Binder extends UiBinder<Widget, HomeView> {
    }

    @Inject
    public HomeView(Binder uiBinder) {
        this.initWidget(uiBinder.createAndBindUi(this));
    }
}

As well as the HomeView.ui.xml file:

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
    xmlns:g="urn:import:com.google.gwt.user.client.ui"
    xmlns:m="urn:import:gwt.material.design.client.ui"
    xmlns:m.addins="urn:import:gwt.material.design.addins.client.ui">
    <ui:style>

    </ui:style>
    <g:HTMLPanel>
        <m:MaterialLabel text="Welcome home!"/>
    </g:HTMLPanel>
</ui:UiBinder> 

I have no idea what is wrong here and I can't seem to figure out the problem. I have absolutely no clue what this is all of a sudden..

Vizcacha answered 12/3, 2016 at 17:57 Comment(4)
I feel like the error is from either CalendarView or OfferModalView dependencies. Can you share a bit more code from those two? The java and ui.xml files would do. For instance, this get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay method is generated by GWT to access css you embed in ui.xml files.Conditioner
@Christopher I am just realizing that eveything in my project just broke. I don't even know where to start. I checked out an older version my project but now even going to HomePlace stopped working giving me the same issue. I am going crazy here.. I'll add the whole Home* thing now ..Vizcacha
@Christopher Please let me know what else you'd need in terms of code!Vizcacha
Without more detail, all it shows here is that somehow the generated clientbundle is failing to generate, which suggests something has gone totally nuts in your setup. Can you share the full log, and possibly make sure that the compiler is in 'strict' mode so that it fails on the first error it hits (rather than letting that snowball into more seemingly unrelated errors).Robbyrobbyn
E
2

In my case this seemed to have been caused by including some modern CSS in the widget's ui:style... No idea how that caused the error but I suspect the offending line is this: grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));. Once I put this piece of styling in a normal CSS file everything worked.

Eu answered 19/7, 2018 at 20:42 Comment(0)
C
1

Just make sure you have enabled

<generateJsInteropExports>true</generateJsInteropExports>

when using gwt-maven-plugin.

Cheerio answered 17/8, 2017 at 12:52 Comment(0)
H
0

I ran into this as well, turned out my browser was still having SuperDev mode turned on and I had recompiled the whole project.

Turning SuperDev mode off, and the issue was gone.

Holub answered 17/5, 2016 at 18:56 Comment(0)
S
0

Yes this error was caused by <ui:style> element.
You may need just clear cache of codeserver under SuperDevMode by clicking on "clean" Button. enter image description here

Sapwood answered 20/12, 2018 at 11:7 Comment(0)
A
0

I got this error when I had accidently put a widget directly inside a <g:HTMLPanel>.

Eg:

<ui:style>
  .myStyle {
    width: 100%;
  }
</ui:style>

<g:HTMLPanel>
  <g:VerticalPanel ui:field="myPanel" styleName="{style.myStyle}" />
</g:HTMLPanel>

Changing to use HTMLPanel correctly, fixed it:

<ui:style>
  .myStyle {
    width: 100%;
  }
</ui:style>

<g:HTMLPanel>
  <div>
    <g:VerticalPanel ui:field="myPanel" styleName="{style.myStyle}" />
  </div>
</g:HTMLPanel>
Acherman answered 19/9 at 6:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.