Invalid email while trying to create users

Enonic version: 6.6.2-SNAPSHOT
OS: Mac and Linux

In our QA and Production environment we are unable to create users.
We get the error message: Invalid email.

On my machine however, I can create users just fine.

I have one suspicion which might have nothing to do with this, but anyways:

In QA and Prod we have mapped admin twice in the com.enonic.xp.web.vhost.cfg file:

#───────────────────────────────────────────────────────────────────────────────
# localhost/admin/
#───────────────────────────────────────────────────────────────────────────────
mapping.admin2.host = localhost
mapping.admin2.source = /admin
mapping.admin2.target = /admin
mapping.admin2.userStore = system

#───────────────────────────────────────────────────────────────────────────────
# <snipped>
#───────────────────────────────────────────────────────────────────────────────
mapping.admin.host =  <snipped>
mapping.admin.source = /admin
mapping.admin.target = /admin
mapping.admin.userStore = system

Perhaps listing the userStore twice is the problem?

After some more testing it looks like it works from my machine, but not from webmasters machine.
We both use a mac and chrome. So we cannot blame Internet Explorer :slight_smile:

So there must be some kind of network setup issue again.

And pointers what to look for?

It also works when connected directly though ssh tunnel to localhost on all 3 nodes in qa.

So I’m left with two possible problem theories:

  1. Me and the webmaster got locked with sticky session to different nodes. She got unlucky twice, one in prod and one in qa. And I got lucky twice. Sounds unreasonable. The problem here could be some kind of broken Enonic cluster setup.

  2. The fact she is on a different network, and I’m on VPN is the game changer. The problem here could be some kind of network setup. But as long as the webmaster has access to User Manager web, shouldn’t that be enough? Or are there some other port openings needed?

Guess I should also mention that we both used the default su:password user.

Hello,

What I understood is that the webmaster has a problem when creating a user in the “Users” admin tool: The field Email is invalid and the error message “Invalid email” is displayed.
But you do not reproduce this problem yourself.

I am not sure about the network problem. If you get the error “Invalid email” it is because this input is invalid.
There is a regular expression on this input checking the value that you entered and I think that this is the problem here.

Could we have the email address that was typed by the webmaster?

The syntax of the email is not wrong. Actually the error message goes away, and then you the same error message on save. We’ve tried multiple email addresses. I don’t believe the problem is the email address.

We have been able too do it from another machine on the same network that did not work before, so I don’t think its the network anymore.

What I’m going to try next is only let 1 server run at a time, and stop the other two.
And then test from the “public” url, instead of ssh tunnel to localhost.

This way, if one node is broken, I should be able to find that node.

I saw a new message now: Timeout waiting for task

This happens when I only have one node running. And yes I have remembered to change from 2 to 1 here:

[xp@alq-boslic config]$ grep ‘nodes = 1’ com.enonic.xp.elasticsearch.cfg
gateway.expected_nodes = 1
gateway.recover_after_nodes = 1
discovery.zen.minimum_master_nodes = 1

Same problem with just one of the other nodes running to:

Same with just the third node running:

17:15:46.322 ERROR c.e.x.j.i.e.JsonExceptionMapper - Timeout waiting for task.
org.elasticsearch.ElasticsearchTimeoutException: Timeout waiting for task.
       	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:73) ~[na:na]
       	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:65) ~[na:na]
       	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:55) ~[na:na]
       	at com.enonic.xp.repo.impl.elasticsearch.storage.ElasticsearchStorageDao.doStore(ElasticsearchStorageDao.java:92) ~[na:na]
       	at com.enonic.xp.repo.impl.elasticsearch.storage.ElasticsearchStorageDao.store(ElasticsearchStorageDao.java:67) ~[na:na]
       	at com.enonic.xp.repo.impl.version.VersionServiceImpl.store(VersionServiceImpl.java:32) ~[na:na]
       	at com.enonic.xp.repo.impl.storage.StorageServiceImpl.storeVersionMetadata(StorageServiceImpl.java:276) ~[na:na]
       	at com.enonic.xp.repo.impl.storage.StorageServiceImpl.store(StorageServiceImpl.java:55) ~[na:na]
       	at com.enonic.xp.repo.impl.node.StoreNodeCommand.execute(StoreNodeCommand.java:43) ~[na:na]
       	at com.enonic.xp.repo.impl.node.CreateNodeCommand.execute(CreateNodeCommand.java:108) ~[na:na]
       	at com.enonic.xp.repo.impl.node.NodeServiceImpl.doCreate(NodeServiceImpl.java:202) ~[na:na]
       	at com.enonic.xp.repo.impl.node.NodeServiceImpl.create(NodeServiceImpl.java:190) ~[na:na]
       	at com.enonic.xp.core.impl.security.SecurityServiceImpl.lambda$createUser$18(SecurityServiceImpl.java:559) ~[na:na]
       	at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:101) ~[core-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.core.impl.security.SecurityServiceImpl.callWithContext(SecurityServiceImpl.java:1007) ~[na:na]
       	at com.enonic.xp.core.impl.security.SecurityServiceImpl.createUser(SecurityServiceImpl.java:558) ~[na:na]
       	at com.enonic.xp.admin.impl.rest.resource.security.SecurityResource.createUser(SecurityResource.java:304) ~[na:na]
       	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
       	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
       	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
       	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
       	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) ~[resteasy-3.0.8_2.jar:na]
       	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) ~[resteasy-3.0.8_2.jar:na]
       	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) ~[resteasy-3.0.8_2.jar:na]
       	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) ~[resteasy-3.0.8_2.jar:na]
       	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-3.0.8_2.jar:na]
       	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-3.0.8_2.jar:na]
       	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-3.0.8_2.jar:na]
       	at com.enonic.xp.jaxrs.impl.JaxRsServlet.service(JaxRsServlet.java:54) [jaxrs-impl-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.portal.impl.auth.AuthFilter.doHandle(AuthFilter.java:43) [portal-impl-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.impl.auth.BasicAuthFilter.doHandle(BasicAuthFilter.java:31) [web-impl-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.impl.context.ContextFilter.lambda$doHandle$0(ContextFilter.java:34) [web-impl-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:101) ~[core-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.impl.context.ContextFilter.doHandle(ContextFilter.java:33) [web-impl-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:26) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:73) ~[na:na]
       	at com.enonic.xp.web.vhost.impl.VirtualHostFilter.doHandle(VirtualHostFilter.java:43) ~[na:na]
       	at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33) [web-api-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at com.enonic.xp.web.impl.dos.DosFilterWrapper.doFilter(DosFilterWrapper.java:60) ~[na:na]
       	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:124) ~[na:na]
       	at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:61) ~[na:na]
       	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [web-jetty-6.6.2-SNAPSHOT.jar:6.6.2-SNAPSHOT]
       	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:821) ~[na:na]
       	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) ~[na:na]
       	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[na:na]
       	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:375) ~[na:na]
       	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[na:na]
       	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158) ~[na:na]
       	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) ~[na:na]
       	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[na:na]
       	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090) ~[na:na]
       	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[na:na]
       	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) ~[na:na]
       	at org.eclipse.jetty.server.Server.handle(Server.java:517) ~[na:na]
       	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306) ~[na:na]
       	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) ~[na:na]
       	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261) ~[na:na]
       	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) ~[na:na]
       	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) ~[na:na]
       	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) ~[na:na]
       	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) ~[na:na]
       	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) ~[na:na]
       	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) ~[na:na]
       	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91]

Running all 3 nodes again, it works fine for me. But probably still not for the webadmin.

Hello,
here is an example from my machine (in QA) Email not validating - this is after I click Save

And here is the input field

Hi Kristin,

What browser are you using? Recently we fixed a problem with validation of email addresses in that form, but it was specific to Chrome Canary browser. Maybe that’s what you’re using?

I’m using regular Chrome

This error shows in Console:

Yes, that is the error we fixed. The fix will be available in upcoming version 6.7 of XP we are about to release in a few days. Or you can download our release candidate from https://github.com/enonic/xp/releases and try with that.

It is linked to the chrome version.

On my machine:
Chrome 52.0.2743.116: Working
Updated to Chrome 53.0.2785.101 : Invalid email bug reproduced with the same pattern error.
Chrome 55.0.2858.0 canary: Invalid email bug reproduced with the same pattern error.

As a workaround to unblock you for now, you could also use Firefox for the user creation

1 Like