Issues with Autotask

There are 2 issues we are experiencing at the moment.

  1. Editing the Autotask code using your webpanel and trying to save results in errors:

/#/autotask/*removed/edit-code:1 Access to XMLHttpRequest at 'https: //api.defender.openzeppelin .com/autotasks' from origin 'https:// defender.openzeppelin .com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

trycatch.js:181 PUT https: //api.defender.openzeppelin .com/autotasks net::ERR_FAILED 500

  1. uploading a new Autotask using the AutoTaskClient
    await client.updateCodeFromFolder(faucetAutotaskId, "src");
    using a calid autotask id, newly created team api key and secret (or old ones that worked before):

{
response: {
status: 403,
statusText: 'Forbidden',
data: {
message: "'eyJrafV1eBbEw' not a valid key=value pair (missing equal-sign) in Authorization header: 'Bearer eyJraV1eBbEw'."
}
},
message: 'Request failed with status code 403',
request: {
path: '/autotask/autotasks/be8698de***362de',
method: 'PUT'
}
}

So it's now impossible for us to change the working of an autotask, or to create a new one.

The errors remain, we still are unable to change and/or add autotasks.

Is someone monitoring this?

Hi @Rockster

Apologies for the delay.

I'm trying to reproduce the errors, however everything seems to work as expected on my end.

Could you send the autotaskId and the code src folder you're trying to upload to our support email defender-support@openzeppelin.com. I can try and unblock you while I look into this issue further.

Meanwhile, could you make sure the autotask-client package is using the latest version.
"defender-autotask-client": "1.17.0", at the time of writing.

Hi @Rockster

Thank you for your email and the detailed demo. I’m posting your find here so anyone can refer back if they are facing similar issues.

The problem was an in-line comment in the environment file, which was read in by the deploy script.

AUTOTASK_ID=123#comment

By removing the comment #comment (or placing it on a new line), the issue was resolved.