guide

We have collected common errors experienced by users of the JS SDK with information on how to address them.

AreaError messagePotential reason and a remedy
When launching requestor scriptError: Unable to create allocation for driver/network erc20/goerli. There is no requestor account supporting this platform.Payment driver is not initialized for the network you use in the requestor script. Run yagna payment init
When launching requestor scriptError: 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-allocationsYou can add additional funds on the test network by yagna payment fund or unlock the funds via yagna payment release-allocations
When launching requestor scriptError: Unable to get requestor accounts Invalid application keyPlease make sure your script uses the defined api-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 Yagna installation example for instructions on how to do it.
When launching requestor script in browserAccess 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.Make sure you start Yagna with proper parameters: yagna service run --api-allow-origin='http://localhost:3000'
When launching requestor scriptError: Unable to get requestor accounts Error: connect ECONNREFUSED 127.0.0.1:7465Make sure your yagna service is up and running i.e. yagna --version
after running yagna payment fund --network goerliError: deadline has elapsedRun the command again
When starting yagna with --api-allow-originError: Found argument '--api-allow-origin' which wasn't expected, or isn't valid in this contextCORS is supported in versions 0.13 - please download release candidate of that version if the stable is not available
In requestor script outputError: connect ECONNREFUSED 127.0.0.1:7465Please make sure your yagna is still running and available