Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when assigning user to task with group #523

Open
ajefts opened this issue Feb 18, 2020 · 17 comments
Open

Error when assigning user to task with group #523

ajefts opened this issue Feb 18, 2020 · 17 comments

Comments

@ajefts
Copy link
Contributor

ajefts commented Feb 18, 2020

Steps to reproduce:

  1. Click Launch Challenge
  2. Select F2F and setup a task
  3. Check the Task checkbox
  4. Set a group
  5. Attempt to add a "Assignee".

Results: An error pops up and I can't add any user.

image

Note: It seems to work fine if no group is set.

@Schpotsky
Copy link
Collaborator

@ajefts ,
The error occurs when handling the response from the group member search API.
Can you check which group member api is configured in dev environment, and point to its source code ? (The value of this config parameter https://github.com/appirio-tech/direct-app/blob/dev/token.properties.example#L394)
Thanks

@ajefts
Copy link
Contributor Author

ajefts commented Apr 8, 2020

@Schpotsky
Copy link
Collaborator

@ajefts
Copy link
Contributor Author

ajefts commented Apr 8, 2020

oh, nice catch if that's it!

I'm restarting the dev app with the updated config. Can you please test in a few minutes to see if that resolves it?

@Schpotsky
Copy link
Collaborator

ok, will test in few minutes

@Schpotsky
Copy link
Collaborator

The error disappeared now.
But, cannot assign members, one of the following error occur:
-- Getting no suggestion
-- Getting the error 'The form has already been processed or no token was supplied, please try again.'

@ajefts
Copy link
Contributor Author

ajefts commented Apr 8, 2020

hmmm...I see the same. It seems like when it does find a match it's getting that "already processed" error

@Schpotsky
Copy link
Collaborator

Is it possible to get some logs for these errors from the dev environment ?

@Schpotsky
Copy link
Collaborator

I see that the error that occurs when getting the group members is swallowed at https://github.com/appirio-tech/direct-app/blob/dev/src/web/scripts/launch/main.js#L390
And it returns 'Problem getting members' error text which is not useful for debugging
It could be changed to propagate the error from the api
error: function(e) {
throw e;
}

@ajefts
Copy link
Contributor Author

ajefts commented Apr 8, 2020

sure.


17:42:53,561 INFO  [JWTToken] This JWT Token was issued by https://api.topcoder-dev.com is valid
17:42:53,577 INFO  [AuthenticationInterceptor] [* TonyJ * 52.91.228.53 * POST https://www.topcoder-dev.com/direct/launch/getReviewScorecards *]
17:43:30,931 ERROR [STDERR] java.lang.Exception: The form has already been processed or no token was supplied, please try again.
17:43:30,931 ERROR [STDERR]     at com.topcoder.direct.services.view.ajax.CustomFormatAJAXResult.execute(CustomFormatAJAXResult.java:238)
17:43:30,931 ERROR [STDERR]     at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
17:43:30,931 ERROR [STDERR]     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
17:43:30,931 ERROR [STDERR]     at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:53)
17:43:30,931 ERROR [STDERR]     at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:577)
17:43:30,931 ERROR [STDERR]     at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)
17:43:30,931 ERROR [STDERR]     at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:43:30,931 ERROR [STDERR]     at com.topcoder.direct.filter.ClickjackFilter.doFilter(ClickjackFilter.java:38)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:43:30,931 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
17:43:30,931 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
17:43:30,931 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:43:30,931 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:43:30,931 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
17:43:30,931 ERROR [STDERR]     at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
17:43:30,932 ERROR [STDERR]     at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
17:43:30,932 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
17:43:30,932 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:745)

@ajefts
Copy link
Contributor Author

ajefts commented Apr 8, 2020

17:43:32,431 ERROR [STDERR] org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of NOT_AVAILABLE token
 at [Source: N/A; line: -1, column: -1]
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:246)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:204)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:194)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:30)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2704)
17:43:32,432 ERROR [STDERR]     at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:2015)
17:43:32,432 ERROR [STDERR]     at com.topcoder.direct.services.view.action.contest.launch.GetGroupMemberAction.getGroupMemberByGid(GetGroupMemberAction.java:235)
17:43:32,432 ERROR [STDERR]     at com.topcoder.direct.services.view.action.contest.launch.GetGroupMemberAction.getGroupMembers(GetGroupMemberAction.java:182)
17:43:32,432 ERROR [STDERR]     at com.topcoder.direct.services.view.action.contest.launch.GetGroupMemberAction.getData(GetGroupMemberAction.java:149)
17:43:32,432 ERROR [STDERR]     at com.topcoder.direct.services.view.action.contest.launch.GetGroupMemberAction.executeAction(GetGroupMemberAction.java:112)
17:43:32,432 ERROR [STDERR]     at com.topcoder.direct.services.view.action.BaseDirectStrutsAction.execute(BaseDirectStrutsAction.java:299)
17:43:32,432 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor526.invoke(Unknown Source)
17:43:32,432 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:43:32,432 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:606)
17:43:32,432 ERROR [STDERR]     at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:899)
17:43:32,432 ERROR [STDERR]     at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1544)
17:43:32,432 ERROR [STDERR]     at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
17:43:32,432 ERROR [STDERR]     at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:96)
17:43:32,432 ERROR [STDERR]     at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:88)
17:43:32,432 ERROR [STDERR]     at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1620)
17:43:32,432 ERROR [STDERR]     at ognl.ASTMethod.getValueBody(ASTMethod.java:91)
17:43:32,432 ERROR [STDERR]     at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
17:43:32,432 ERROR [STDERR]     at ognl.SimpleNode.getValue(SimpleNode.java:258)
17:43:32,432 ERROR [STDERR]     at ognl.Ognl.getValue(Ognl.java:470)
17:43:32,432 ERROR [STDERR]     at ognl.Ognl.getValue(Ognl.java:434)
17:43:32,432 ERROR [STDERR]     at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:371)
17:43:32,432 ERROR [STDERR]     at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:423)
17:43:32,432 ERROR [STDERR]     at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:369)

@Schpotsky
Copy link
Collaborator

I'm working on setting up my local environment with direct-app + mock v5 groups API to make debugging easier

@ajefts
Copy link
Contributor Author

ajefts commented Apr 9, 2020

ok, great. I think that will be a good investment for cases where we need to work on the legacy JBoss apps

Schpotsky added a commit to Schpotsky/direct-app that referenced this issue Apr 9, 2020
@Schpotsky
Copy link
Collaborator

Schpotsky commented Apr 9, 2020

Deployed the direct-app locally + a mock v5 groups API and reproduced the issue locally.
Fixed issue demo video: https://monosnap.com/file/r1faO4KZPVf0MMp12WbTQVqhRZSWb3

Please check the PR #524

Also make sure to update the configuration in dev environment :
"@groupMemberApiUrl@=http://api.topcoder-dev.com/v5/groups/%s/members" , this config parameter should use https instead of http to avoid mixed Content error

ajefts added a commit that referenced this issue Apr 9, 2020
@ajefts
Copy link
Contributor Author

ajefts commented Apr 9, 2020

great work @Schpotsky . I'm going to give this a try in dev and see how it goes

@ajefts
Copy link
Contributor Author

ajefts commented Apr 9, 2020

It works in dev. Very nice job!

@Schpotsky
Copy link
Collaborator

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants