com.vaadin.ui.Window.handleURI returning exception

Hi,

I’m using Vaadin 6.7.2 and I’m receiving the following error:

java.lang.RuntimeException: handleURI for https://my.fake.url.org/myappname/ uri: ‘1/loginHandler’ returns ambigious result.
at com.vaadin.ui.Window.handleURI(Window.java:428)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleURI(AbstractCommunicationManager.java:2264)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleURI(CommunicationManager.java:348)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.handleURI(AbstractApplicationServlet.java:1093)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:535)

This only happens in one situation; all other situations where the code is called, I don’t receive the error and the code works fine.

My application works as follows (from a high level):

Using the Vaadin login form, the user logs in for the first time and is redirected to Google’s API consent page. Once the user grants access, the callback is a URL that Vaadin interprets as a ParameterHandler. Inside there, I call a window.setContent(new MainAppComponent()) which displays the main application on the screen. The application works fine at this point. There is a logout button that calls a window.setContent(new LoginComponent()). When that button is clicked, I’m taken back to the login form. If the user enters his credentials again and logs in, I get the error. The workaround is to get the user to close the browser (ending the session); everything works fine the next time the user tries to login.

As I stepped through the code with the debugger, there seems to be 2 LoginForm objects in the method that is throwing the exception. I even used the debugger to set a variable in the method to null so that it could get out of the method without throwing the exception and, if I do that, the application works fine.
I realize I haven’t provided enough code to give much to go on, but maybe someone has an idea of what might be causing the problem. How do I get that extra LoginForm object out of the Window object’s uriHandlerList? Or rather, how do I not get it duplicated in the first place? I figure there must be something I’m doing that is odd with the ParameterHandler and the Google consent redirection…
I can elaborate with more code, if necessary, if someone wants to try to debug it…but it’ll get messy…

Any thoughts?

FYI, I replaced the LoginForm component with my own fields (text field, password field, and a login button) and the problem went away.
It seems like there’s a bug in LoginForm or I’m not using it correctly…