Troubleshooting

Requestor troubleshooting

Transfer error: Send error: send failed because receiver is gone

Problem

When attempting to upload a file to a provider, you encounter the following error message:

WARN: Task error on provider fractal_01_1.h. Error: Local service error: Transfer error: Send error: send failed because receiver is gone. Stdout: undefined. Stderr: undefined.

Solution

The issue is likely due to the directory where you're attempting to upload the file. It may not be defined as VOLUME in the Dockerfile.

To resolve this:

  1. Check your Dockerfile to confirm the directories defined as VOLUME.
  2. Ensure you are uploading files specifically to the directories marked as VOLUME.
  3. If you are trying to upload to a directory that's not defined as VOLUME, consider updating the Dockerfile to include that directory or select an already defined VOLUME directory for your uploads.

By uploading files exclusively to VOLUME directories, you can avoid this error.

Was this helpful?

Could not create new allocation. Insufficient funds to make allocation. Top up your account or release all existing allocations to unlock the funds via yagna payment release-allocations

Problem

When trying to execute a requestor script, you may encounter the following error message:

Error: Could not create new allocation. Insufficient funds to make allocation. Top up your account or release all existing allocations to unlock the funds via `yagna payment release-allocations`

Solution

This error suggests that the user doesn't have sufficient funds in their account to create the allocation specified in their requestor script.

To resolve the issue:

  1. For testnet users: If you are working on the testnet, simply run the command yagna payment fund to refill your wallet with test tokens.

  2. Release Stuck Allocations: In certain situations, funds may already exist in the wallet, but they are locked due to previous allocations. In such cases, use the command yagna payment release-allocations to free up these locked funds, allowing them to be utilized for new tasks.

Was this helpful?

Unable to create allocation for driver/network erc20/holesky. There is no requestor account supporting this platform.

Problem

When trying to execute a requestor script, you may encounter the following error message:

Error: Unable to create allocation for driver/network erc20/holesky. There is no requestor account supporting this platform.

Solution

The payment driver is not initialized for the network you're trying to use in the requestor script. Run yagna payment init or update the JS SDK to @golem-sdk/task-executor.

Was this helpful?

Access to XMLHttpRequest at 'http://127.0.0.1:7465/payment-api/v1/requestorAccounts' from origin 'http://172.27.80.1:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Problem

When trying to execute a requestor script in the browser, you may encounter the following error message:

Access to XMLHttpRequest at 'http://127.0.0.1:7465/me' from origin 'http://localhost:8080/'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
**GET http://127.0.0.1:7465/me net::ERR_FAILED 200 (OK)**

or

Access to XMLHttpRequest at 'http://127.0.0.1:7465/payment-api/v1/requestorAccounts' from origin 'http://172.27.80.1:8080'
has been blocked by CORS policy: Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
warning

Note that in a case when you have an incorrect api-key, after the message about CORS you will receive response status 401 Unauthorized.

Access to XMLHttpRequest at 'http://127.0.0.1:7465/me' from origin 'http://localhost:8080'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET http://127.0.0.1:7465/me net::ERR_FAILED 401 (Unauthorized)

In such a case please validate that you're providing a valid api-key before diagnosing CORS settings.

Solution

This error suggests that the request was blocked due to CORS not being configured on the endpoint.

To resolve the issue:

  1. Make sure you start Yagna with the proper parameter: yagna service run --api-allow-origin='http://localhost:3000' (on Windows: yagna service run --api-allow-origin=http://localhost:3000) .

  2. Retry the script.

Was this helpful?

Found argument '--api-allow-origin' which wasn't expected, or isn't valid in this context.

Problem

When trying to start yagna with support for CORS, you may encounter the following error message:

Error: Found argument '--api-allow-origin' which wasn't expected, or isn't valid in this context.

Solution

CORS support was introduced in Yagna version 0.13.0

To resolve the issue:

  1. Please install Yagna version 0.13.0 or later.

  2. Retry the command.

Was this helpful?

Unable to get requestor accounts Invalid application key.

Problem

When trying to run a script using the Golem JS SDK, you may encounter the following error message:

Error: Unable to get requestor accounts Invalid application key.

Solution

Please make sure your script uses the configured app-key. You can check what keys are configured using: yagna app-key list or autoconfigure one by setting the environment variable YAGNA_AUTOCONF_APPKEY. Please see the Yagna installation example for instructions on how to do it.

Was this helpful?

Unable to get requestor accounts Error: connect ECONNREFUSED 127.0.0.1:7465.

Problem

When trying to execute a requestor script, you may encounter the following error message:

Error: Unable to get requestor accounts Error: connect ECONNREFUSED 127.0.0.1:7465.

Solution

  1. Ensure Yagna is Active: The error indicates that your script is unable to establish a connection with Yagna on the specified address. Begin by verifying if Yagna is running on your system. If not, you can start it using:
yagna service run
  1. Check the YAGNA_API_URL Setting: If you've previously set the YAGNA_API_URL environment variable to an address different from the default, you need to reflect the same when setting up your SDK. For example:
yagnaOptions: {
  basePath: 'http://127.0.0.1:7645'
}

Alternatively, ensure the same YAGNA_API_URL value is used both when launching the yagna daemon and in the terminal window where you're executing the script.

Was this helpful?

Was this helpful?