Frequently asked questions

Trying to deploy a job throws Role DEPLOY is required

This error means your account doesn’t have permission to access the “First Developers” program. If you haven’t yet, please sign up. If you have already done this and the system doesn’t resolve the issue after a couple of minutes, please send a message in the #dev-connection channel on Slack or by email at info@distributed.computer.

In the event this error persists once your account gains approval, this error could signal that the Identity Keystore you are using isn’t associated with your Portal account. Check the Identity Keystore section of the First Devs tab in the Portal to confirm that the Identity Keystore you are trying to use is one of the ones listed in the table. If it’s not, try creating and downloading a new Identity Keystores following the instructions form earlier, and upload it when prompted instead of the one that caused the error.

console.log in the worker not working

Every JavaScript programming environment features an implementation of console.log, and DCP is no different. When your work function invokes console.log(), DCP stringifies the log message and sends it over the network to the scheduler, which relays it to your DCP client app. To capture these events in your client program, do the following with your Job():

job.on('console', (message) => console.log(message));

No errors are being received by the Job

If your work function throws an uncaught exception, DCP relays its details back to your client app as an event.

Note

Your job is cancelled by the scheduler if it does this too many times.

To capture these events and get details on the exception in your client program, do the following with your Job():

job.on('error', (message) => console.log(message));

Receiving an ENOPROGRESS error

This happens when your work function hasn’t called the progress() function within 30 seconds.

Caution

Remember that some worker computers can be much slower than yours!

Note

Every work function must invoke progress() at least once.

The ideal way to invoke progress() is to place it somewhere in your inner loops where you can reasonably expect the work function to call it every 3 or 4 seconds. If your program invokes it too frequently, DCP throttles these calls to help your workload run faster.

Warning

Don’t be tempted to use setInterval() or setTimeout() to invoke progress() - it will not behave the way you think it will unless you are very familiar with the inner workings of the JavaScript event loop.