Series of Errors and Malfunctions with Custom Connector and Studio

Hello,

I’m working on a Creating a Custom Connector. There are a series of errors and malfunctions as listed below.

Custom Connector Side:

Authentication:
Connects successfully when I set the Authentication to custom. The Authorization input text box would have Bearer myToken appear and on replacing the myBearer with the actual API token, it would connect.

However, if I change the Authentication to Personal Access Token, it would not connect. And after I changed it back to Custom, the place holder “Bearer” myToken disappeared from the Authorization box.

If I dismiss the connection dialog and try to bring it up again with the Connect button, I get this error:

I had to use the Reset to Default button to change back and forth between these two modes before making the selection from the Authentication type drop down . Despite that, this problem exists.

As of today, the Bearer myToken does not appear in the Authentication box at design time despite creating a new connector from scratch. The Example hint also does not appear anywhere in the connection box to help the user.

But if I enter Bearer followed by my actual token, it connects successfully!

That said, the placeholder does appear once I publish the connector and create a connection.

Creating API Resource and Testing

I used the Generate from Payload feature to generate the Request body parameters.
I’m sure that my JSON payload has no issues because Postman returns me the expected results.
When I test the request method, I get this error:

The only difference I see is that the JSON Body attributes in the Custom Connector are sorted alphabetically by attribute names and not in the manner I submitted the payload. I’m suspecting this to be the case because if I submit the JSON body as defined by the API documentation, it works successfully!

Timeout errors when Deleting a Custom connector:

Despite removing all references to the connector from Studio, the connector delete operation times out. I’ve tried two times across 2 days to no effect.

Finally on the 3rd attempt, I got this error after I reloaded the entire browser window following the delete action. And this time the connector was factually deleted.

Studio Side Issues

This is the Custom Connector Scope v4.0.4. It renders correctly in Studio and I’m able to select the Connector and connection-test it. However, when I select the API resource method, an error pops us as shown below:

From the request definition I’ve confirmed that all String inputs to the API method are correct except one parameter that expects a null value as default. This parameter has been mapped as String. I confirmed that this is an Integer. But correcting the definition to Integer and adding a sample value did not fix the problem.

However, attempts to republish the connector failed with this error. I had to delete the connection to get it to successfully publish. Does this mean I have to remove all connections before republishing? If yes, what happens to already connected clients? :neutral_face:

Connector Not found in Studio after Republish

Despite refreshing the connection from Studio several times, the newly published connection would not appear in Studio. I have to close and reopen the project and then redo the scope and the object. Despite that the casting error did not go away.

Upgrading to Connector Activity 5.* makes it worse. The scope does not render in Studio:

Here is the Package Stack. If I try to upgrade all of them to the latest versions, Studio project crashes with multiple errors and the Main.xaml becomes unresponsive. :neutral_face:
I had to recreate the project to get back to working status.

Lastly, this is the Studio Version:

image

Thanks,
Andy

1 Like

Hi @AndyMenon,

Greetings of the day!
I’m face the same error while I’m trying to access my customer connector method in studio.
Error: System.Exception: Unable to cast object of type ‘System.String’ to type ‘System.Activities.InArgument`1[System.String]’.

Could you please help me to resolve the issue with elaborated steps.

Regards,
Maninder Singh

@AndyMenon as far as the connection not showing up in Studio, I had to add a connection to the custom connector directly to the Orchestrator folder that I was connected to in Studio (so, if you’re running Studio connected to your personal workspace, you would add the connection to your desired connector in your personal workspace folder.

As for the other issues, particularly the argument type mismatch (System.String), I’m having a lot of the the same problems now 10 months after your initial post. Did you ever reach a conclusion on the matter?