manolo / gwt-polymer-elements

Polymer Web Components for GWT. A collection of Material Design widgets for desktop and mobile.
Apache License 2.0
156 stars 49 forks source link

Cannot get hello world example working #148

Closed dmg46664 closed 7 years ago

dmg46664 commented 7 years ago

Got the following error trying to get the simple paper button example to work:

Polymer.java:231 Uncaught TypeError: this$static.com_vaadin_polymer_Polymer$2_val$hrefs1.size__I is not a function
    at com_vaadin_polymer_Polymer$2_$$init__Lcom_vaadin_polymer_Polymer$2_2V (Polymer.java:231)
    at com_vaadin_polymer_Polymer$2_Polymer$2__V (Polymer.java:230)
    at com_vaadin_polymer_Polymer_ensureCustomElement__Ljava_lang_Object_2_3Ljava_lang_String_2V (Polymer.java:319)
    at com_vaadin_polymer_paper_widget_PaperButton_PaperButton__Ljava_lang_String_2V.com_vaadin_polymer_PolymerWidget_PolymerWidget__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2V (PolymerWidget.java:16)
    at com_vaadin_polymer_paper_widget_PaperButton_PaperButton__Ljava_lang_String_2V (PaperButton.java:112)
    at borrowingsucks_client_Contacts_Contacts__V.borrowingsucks_client_Contacts_onModuleLoad__V [as onModuleLoad__V] (Contacts.java:26)
    at Array.com_google_gwt_lang_borrowingsucks_100046Module_1_1EntryMethodHolder_init__V (borrowingsucks_00046Module__EntryMethodHolder.java:3)
    at initializeModules (ModuleUtils.java:44)
    at com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 (Impl.java:239)
    at com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 (Impl.java:298)
    at Impl.java:77
    at com_google_gwt_lang_ModuleUtils_gwtOnLoad__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2V (ModuleUtils.java:55)
    at UnexpectedTypeException.java:26
com_vaadin_polymer_Polymer$2_$$init__Lcom_vaadin_polymer_Polymer$2_2V   @   Polymer.java:231
com_vaadin_polymer_Polymer$2_Polymer$2__V   @   Polymer.java:230
com_vaadin_polymer_Polymer_ensureCustomElement__Ljava_lang_Object_2_3Ljava_lang_String_2V   @   Polymer.java:319
com_vaadin_polymer_PolymerWidget_PolymerWidget__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2V  @   PolymerWidget.java:16
com_vaadin_polymer_paper_widget_PaperButton_PaperButton__Ljava_lang_String_2V   @   PaperButton.java:112
borrowingsucks_client_Contacts_onModuleLoad__V  @   Contacts.java:26
com_google_gwt_lang_borrowingsucks_100046Module_1_1EntryMethodHolder_init__V    @   borrowingsucks_00046Module__EntryMethodHolder.java:3
initializeModules   @   ModuleUtils.java:44
com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2    @   Impl.java:239
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2   @   Impl.java:298
(anonymous) @   Impl.java:77
com_google_gwt_lang_ModuleUtils_gwtOnLoad__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2V    @   ModuleUtils.java:55
(anonymous)

I have no idea how to progress this.

No breakpoints I set in chrome trigger, which suggests something is wrong with source mapping.

screen shot 2017-04-01 at 21 06 32

Moreover, I can't set the breakpoints to the right part in the code as can be seen (clicked every line on the left that was possible). Using the catch on exception feature, I can't inspect any of the variables listed.

I've tried this in Chrome which I understand shouldn't need the webcomponents.js lib. Tried it with and without. Version: 1.7.0.0

Any ideas?

dmg46664 commented 7 years ago

Adding the import manually works around this issue for me (once I bower check the paper elements), but my understanding is I shouldn't have to do this.

<link rel="import" href="myapp/bower_components/paper-button/paper-button.html">
dmg46664 commented 7 years ago

Moved over to the new https://github.com/tbroyer/gwt-maven-plugin from the older Mojo one and the problem went away. No need to investigate further.