Invalid Redirect Location Exception

I was testing the connector for 360Alumni <> DonorPerfect in the client’s dev account and encountered an issue with below error:

   Tue Oct 22 08:13:13.563 EDT 2019 -- Assembly [Action #5 (360Alumni - Two-way sync add or update a contact (Christina))] Subassembly [Two-way sync add contact (Christina)] Module [Extension - Server-Side Script #10] appModules.J_moduleException: org.apache.commons.httpclient.InvalidRedirectLocationException: Invalid redirect location: https://leadershipakron.360alumni.com/api/users/?email=apiant02%40test.com, https://leadershipakron.360alumni.com/api/users/?email=apiant02%40test.com on line #159 -> int status_code = httpClient.executeMethod(httpClient.getHostConfiguration(), get);
	at appModules.J_basemodule._threadError(J_basemodule.java:3094)
	at appModules.J_basemodule._utilHandleHTTPRequestResponse(J_basemodule.java:3706)
	at appModules.J_f4f3ff66cd1248568dee84f70bc86fd4._utilHandleHTTPRequestResponse(J_f4f3ff66cd1248568dee84f70bc86fd4.java:124)
	at appModules.J_basemodule$_utilHTTPRequestThread.run(J_basemodule.java:3455)

All the assemblies are aproved and working fine on the production except this issue. Could just look into it whether problem in assembly or module.

Client dev: christina@360alumni.com
Action assembly: 9f136144767448c98fc6fa87187eacc6
Subassembly: 8547b053ba41411e859e310b33366a74 (error encountered)
Automation: https://dev.apiant.com/automation-editor?view_history_item=7470852&view_history_item_tenant_uuid=&view_history_item_person_uuid=991e33aceb764340833c1f2ec9798fe8

Let me know if require more details.

Thank you
Vishwanath

Study the error message. See how 2 URL’s are listed, separated by a comma? Seems to be a problem with the input data. Probably an array of values is being input, while that assembly is not written to support it. So the Java code is trying to invoke 2 URL’s at the same time. So either the automation needs to be fixed so to not send an array, or the assembly needs to be fixed to support it.

1 Like

I’ve gone through the logs again and checked all the input and output data of modules, and all look just as expected, nothing unusual but when data comes in “Server-Side Script #10” it throws the same error.

Just for the information: It’s been long time since we’ve configured this connector in the client production account and all the assemblies and the connector was working perfectly fine. Now the client has reported this issue and I’ve created records in two different ways to test the integration:

  1. DonorPerfect > 360Alumni: When I create a record in DonorPerfect, it goes to 360Alumni successfully with the same error. Here record has been synced successfully but with error in the automation. I’ve checked the Mapping and database dump which also looks fine.

Now if I update record in DonorPerfect then nothing gets trigger in the automation although updated data appear if I execute trigger from the assembly editor. If I update record from 360Alumni, it perfectly working fine.

  1. 360Alumni > DonorPerfect: Everything is working fine when I create records 360Alumni to DonorPerfect. All the operation working fine, create/update.

Automation: https://apiant.com/automation-editor?view_history_item=400455546&view_history_item_tenant_uuid=&view_history_item_person_uuid=663a7ea65a13471988c9268a59c35f43

Help me out here, I couldn’t locate exact cause of this issue, why “2 URL’s are listed, separated by a comma” with message InvalidRedirectLocationException.

Thank you

The error occurs in subassembly 8547b053ba41411e859e310b33366a74 which was built by Dhruvit. You will need to get with him or troubleshoot it on your own. Someone needs to trace the Java code and see what value for the URL is being used. The error seems to indicate the URL string has two URL’s separated by a comma.

I’ve asked Dhruvit to look into this issue and the execution get stop on line “int status_code = httpClient.executeMethod(httpClient.getHostConfiguration(), get);” in server-side script module. We’ve called the same API by using the HTTP module and no issue with that. We’ve created a sample assembly to call get API, and while execution, it is going to throw the same error.

Assembly UUID: d98e63fc6472426f8fdc2426a490ef9f
Credentials: Sent in teamchat

This indicates the endpoint is doing a redirect: curl https://leadershipakron.360alumni.com/api/users?email=apiant03%40test.com

It doesn’t make sense b/c the redirect is to the same URL, instead of redirecting to a different URL. That seems to be the reason for the error.

You either need to get with the owner of leadershipakron.360alumni.com and have them fix their system’s redirect, or try to find a workaround.

1 Like

Understood, Thank you so much for all your help.