Problem with ICEPush

Hi, I’m having client side code problem with the ICEPush add-on (tested versions 0.1.2 and 0.2.1) and
Vaadin 6.6.2
. I try to add embedded image to mainWindow and then refresh the client side with ICEPush like this:


		StreamResource picture = webcam.getPicture();
		if (image != null) {
			mainWindow.removeComponent(image);
		}
		image = new Embedded("Image from webcam", picture);
		image.setImmediate(true);
		mainWindow.addComponent(image);
		pusher.push();

In the browser (fx5.0) nothing is happened but when I open the debug console the following error is shown (widgetset compiled as “detailed”):


JavaScriptException: (TypeError): uidl[1]
[$intern_291]
 is undefined fileName: http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html stack: org_vaadin_webcamforvaadin_gwt_client_ui_VWebCamForVaadin_updateFromUIDL__Lcom_vaadin_terminal_gwt_client_UIDL_2Lcom_vaadin_terminal_gwt_client_ApplicationConnection_2V([object Array]
,[object Object]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:45235 com_vaadin_terminal_gwt_client_ui_layout_ChildComponentContainer_$renderChild__Lcom_vaadin_terminal_gwt_client_ui_layout_ChildComponentContainer_2Lcom_vaadin_terminal_gwt_client_UIDL_2Lcom_vaadin_terminal_gwt_client_ApplicationConnection_2IV([object Object]
,[object Array]
,[object Object]
,1436)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:41013 com_vaadin_terminal_gwt_client_ui_VOrderedLayout_updateFromUIDL__Lcom_vaadin_terminal_gwt_client_UIDL_2Lcom_vaadin_terminal_gwt_client_ApplicationConnection_2V([object Array]
,[object Object]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:26321 com_vaadin_terminal_gwt_client_ApplicationConnection$8_$execute__Lcom_vaadin_terminal_gwt_client_ApplicationConnection$8_2V([object Object]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:12936 com_vaadin_terminal_gwt_client_ApplicationConnection_$handleUIDLMessage__Lcom_vaadin_terminal_gwt_client_ApplicationConnection_2Ljava_util_Date_2Ljava_lang_String_2Lcom_vaadin_terminal_gwt_client_ValueMap_2V([object Object]
,[object Object]
,"{\"changes\":[[\"change\",{\"format\": \"uidl\",\"pid\": \"PID16\"},[\"1\",{\"id\": \"PID16\",\"width\": \"100.0%\",\"margins\":15,\"alignments\": {},\"expandRatios\": {}},[\"2\",{\"id\": \"PID17\",\"cached\":true}]
,[\"3\",{\"id\": \"PID18\",\"width\": \"100.0%\",\"mode\": \"xhtml\"},[\"data\",{},[\"div\",{\"xmlns\": \"http:\\/\\/www.w3.org\\/TR\\/xhtml1\\/DTD\\/xhtml1-strict.dtd\"},\"\"]
]],[\"4\",{\"id\": \"PID19\",\"cached\":true}]
,[\"4\",{\"id\": \"PID20\",\"cached\":true}]
,[\"3\",{\"id\": \"PID22\",\"cached\":true}]
,[\"6\",{\"id\": \"PID_SVAADIN_WEBCAM_PID\",\"cached\":true}]
,[\"7\",{\"id\": \"PID26\",\"immediate\":true,\"caption\": \"Image from webcam\",\"src\": \"app:\\/\\/APP\\/6\\/webcamimagedata\",\"mimetype\": \"application\\/octet-stream\"}]
]]], \"meta\" : {}, \"resources\" : {}, \"locales\":[]}",[object Object]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:12129 com_vaadin_terminal_gwt_client_ApplicationConnection$2_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V([object Object]
,[object Object]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:12757 com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V([object Object]
,[object Object]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:2741 com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V([object XMLHttpRequest]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:2961 ([object Event]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:11505 com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((function () {handler.onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(_this);}),[object XMLHttpRequest]
,[object Arguments]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:371 com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((function () {handler.onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(_this);}),[object XMLHttpRequest]
,[object Arguments]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:401 ([object Event]
)@http://localhost:8081/WebCam/VAADIN/widgetsets/org.vaadin.webcamforvaadin.gwt.WebcamforvaadinWidgetset/F1E7272456F91B66D2303A35ABB2D6EF.cache.html:386 @:0 lineNumber: 45235

Same application worked onVaadin 6.4.8. Any help is appreciated!

Well… It seems that I was little bit too hasty when “blaming” the ICEPush. Problem seems to be in some other place. But I found workaround: instead of replacing the the Embedded component I just set a new source to it (if remember correct that didn’t work year or some ago but now it works fine)…