# Troubleshooting

## Common TX Issues

{% tabs %}
{% tab title="Error" %}

## Out of gas

Your transaction failed, and you received such sorts of warning messages &#x20;

1. <mark style="color:red;">"</mark><mark style="color:red;">**Warning! Error encountered during contract execution \[execution reverted]**</mark><mark style="color:red;">"</mark>

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FO7bTzFkdjMlD518jdKcC%2Ftelegram-cloud-document-2-5393322353507707320.jpg?alt=media\&token=bec4a626-ed62-4bc6-82ef-965dab77d79e)

2. &#x20;<mark style="color:red;">"</mark><mark style="color:red;">**Error encountered during contract execution \[out of gas]**</mark><mark style="color:red;">"</mark> &#x20;

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FUcOQTBxM4CzMt08hA1Kg%2Ftelegram-cloud-document-2-5393322353507707321.jpg?alt=media\&token=14a23fcb-dfe3-4c44-86d6-11ed1342432a)
{% endtab %}

{% tab title="Solution" %}
Try manually **increasing the gas LIMIT** to 1 000 000. This way, the transaction will only use the gas it needs without running out.

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FaGy6Jtx6FdgtPtVqnWQh%2Fimage.png?alt=media\&token=7cf8728c-04ac-4578-9aa1-d99af5830ec9)
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## SafeERC20: low-level call failed

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FZwzSnBgCaxUf2yMkeLzE%2Ftelegram-cloud-document-2-5393322353507707323.jpg?alt=media\&token=f69aa84f-065a-4225-8db9-95473e146304)
{% endtab %}

{% tab title="Solution" %}
To fix <mark style="color:red;">**'SafeERC20: low-level call failed'**</mark> error, simply increase the gas LIMIT to 1 000 000. This way, the transaction will only use the gas it needs without running out.

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## Internal JSON-RPC errors

{% endtab %}

{% tab title="Solution" %}
If you encounter this issue with MetaMask, the underlying cause remains unclear. However, you can try the following methods to resolve the issue:

1\. Consider using an **alternative wallet app** as a solution.

2\. Ensure the **BNB network** has been added correctly. Refer to our [article](https://blog.biswap.org/article/how-to-connect-metamask-to-binance-smart-chain-bsc) and find detailed instructions on how to add BNB Smart Chain to your wallet.

3\. Ensure you have **sufficient BNB balance** to cover gas fees.

4\. Verify that you are using the app's most recent **version** or browser extension.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## Іnternal JSON-RPC error. { "code": -32000, "message": "insufficient funds for transfer" } - Please try again.

{% endtab %}

{% tab title="Solution" %}
The transaction cannot be completed due to insufficient funds for transfer. Please try again with a **sufficient** **BNB amount** to cover the transaction fees.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## Error: \[ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":-32000,"message":"transaction underpriced"}}}

{% endtab %}

{% tab title="Solution" %}
Increase the **gas** **LIMIT** for the transaction in your wallet. Check your wallet's documentation to learn how to increase your gas limit.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## Swap failed: Error: \[ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":-32603,"message":"handle request error"}}}'

{% endtab %}

{% tab title="Solution" %}
The reason behind this issue is currently unclear. Try **increasing the gas LIMIT** and **slippage** before trying again.
{% endtab %}
{% endtabs %}

## Common Exchange Issues

{% tabs %}
{% tab title="Error" %}

## Biswap: TRANSFER\_FAILED

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FpFIzsfyXXdUWaAIiCzYU%2Ftelegram-cloud-document-2-5393322353507707322.jpg?alt=media\&token=34b8b7aa-3f7d-4ee4-a298-e88d4899d979)
{% endtab %}

{% tab title="Solution" %}
The exchange on Biswap fails with the error status <mark style="color:red;">**'Biswap: TRANSFER\_FAILED'**</mark> when there's an issue with the token transfer during the swap process. This error could be caused by various reasons, such as:

1. Insufficient liquidity: Ensure that there is enough liquidity in the pool for the token you are trying to swap. If the pool has insufficient liquidity, the swap cannot be completed.
2. Approvals: Ensure you have approved the Biswap router contract to spend your tokens.&#x20;
3. Slippage tolerance: The price of tokens can fluctuate between when you submit your transaction and when it is mined. The transaction will fail if the price moves beyond your slippage tolerance during this time.
4. Gas fees: Ensure you have provided enough gas for the transaction to complete. If the gas supplied is too low, the transaction may fail.

To troubleshoot the issue, double-check these factors and ensure they are correctly configured. Additionally, check Biswap Support if the problem persists.

<br>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## BiswapV2Router: INSUFFICIENT\_OUTPUT\_AMOUNT&#x20;

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FXegbdDKyCwi7S7imRDvU%2Ftelegram-cloud-document-2-5393322353507707325.jpg?alt=media\&token=55b716e6-b8ab-4a1b-bb87-9c5a61938781)
{% endtab %}

{% tab title="Solution" %}
If you encounter <mark style="color:red;">**'INSUFFICIENT\_OUTPUT\_AMOUNT'**</mark> error while swapping tokens, low slippage tolerance may be likely the cause. To modify your slippage tolerance, perform the following steps:&#x20;

1\. Head to the settings icon located on the liquidity page.&#x20;

2\. Increase your slippage tolerance gradually and attempt the swap again.&#x20;

3\. Additionally, try entering an amount with fewer decimal places.&#x20;

Alternatively, <mark style="color:red;">**'INSUFFICIENT\_OUTPUT\_AMOUNT'**</mark> issue often occurs when exchanging tokens with limited liquidity, indicating that there may not be a sufficient amount of one of the tokens you're attempting to swap in the Liquidity Pool. This is likely due to the token being small-cap and infrequently traded. If the problem persists, you can try refreshing the page, attempting the transaction later, or exploring the option of trading a different token. You may also try to change a fraudulent token that cannot be sold. Biswap cannot restrict the token or refund your funds in such cases.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## BiswapV2Router: EXCESSIVE\_INPUT\_AMOUNT

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FbRHrmjjSNHC6U7PtxpM2%2Ftelegram-cloud-document-2-5393322353507707324.jpg?alt=media\&token=d911810c-4393-4653-969f-aa44e339806b)
{% endtab %}

{% tab title="Solution" %}
The <mark style="color:red;">**'BiswapV2Router: EXCESSIVE\_INPUT\_AMOUNT'**</mark> error occurs when attempting to swap many tokens in a pool or a pool with low liquidity on the Biswap platform. To resolve this issue, try reducing the amount you are trading, rounding off token amounts to avoid tiny fractions, and verifying the pool's liquidity before proceeding with the transaction.&#x20;

By following these steps, you should be able to successfully execute your token swap on the Biswap platform without encountering the error.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## BiswapV2Router: INSUFFICIENT\_A\_AMOUNT or BiswapV2Router: INSUFFICIENT\_B\_AMOUNT

{% endtab %}

{% tab title="Solution" %} <mark style="color:red;">**'INSUFFICIENT\_A\_AMOUNT'**</mark> or '<mark style="color:red;">**INSUFFICIENT\_B\_AMOUNT'**</mark> error occurs when adding or removing liquidity from a liquidity pool (LP). There needs to be more quantity of either token A or B in the token pair. Rapid price fluctuations and a low slippage tolerance could be contributing factors.

To resolve the issue, refresh the webpage and attempt the transaction again, or wait and try later.

If the problem persists, navigate to the settings icon on the liquidity page, slightly increase your slippage tolerance, and try the transaction again.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## BiswapV2Router: EXPIRED

{% endtab %}

{% tab title="Solution" %}
Make sure to confirm the transaction promptly after creating it.

The expiration occurred because the transaction was not signed and broadcasted to the blockchain before the deadline. In other words, you needed to confirm the transaction in your wallet faster.

If this advice doesn't resolve the <mark style="color:red;">**'BiswapV2Router: EXPIRED'**</mark> issue, consider raising the slippage tolerance and clearing your browser's cache as an additional troubleshooting step.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## TransferHelper::transferFrom: transferFrom failed

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FwIfR5lILSw6VtVRCLRGC%2Ftelegram-cloud-document-2-5393322353507707320.jpg?alt=media\&token=44af7f0e-f8d9-4ce7-b44e-f017fd317834)
{% endtab %}

{% tab title="Solution" %}
Several possible reasons exist for the <mark style="color:red;">**'TransferHelper::transferFrom: transferFrom failed'**</mark> error during a token swap transaction. To troubleshoot the issue, check the wallet's token balance to ensure sufficient tokens to perform the swap. Verifying the token approval has been granted to the router contract and the allowance is adequate for the desired swap amount.&#x20;

Additionally, assess the slippage tolerance and consider increasing it. After addressing any relevant issues, resubmit the transaction with the appropriate adjustments.
{% endtab %}
{% endtabs %}

## Common Farms and Launchpools Issues

{% tabs %}
{% tab title="Error" %}

## BEP20: transfer amount exceeds the balance

{% endtab %}

{% tab title="Solution" %}
You're probably trying to unstake from a pool with a low amount of rewards in it. This causes the transaction to fail due to <mark style="color:red;">**BEP20: transfer amount exceeds allowance**</mark>.

If not, you may be trying to send tokens you don't have in your wallet (for example, trying to send a token already assigned to a pending transaction). In this case, just ensure you have the tokens you're trying to use.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## BEP20: transfer amount surpasses allowance

{% endtab %}

{% tab title="Solution" %}
This occurs when you initially establish a spending cap during the contract approval process and later attempt to use an amount exceeding the cap.

Utilize [**https://bscscan.com/tokenapprovalchecker**](https://bscscan.com/tokenapprovalchecker) to revoke approval for the smart contract you want to engage with. Reapprove the contract, this time setting a higher limit for the spending allowance and attempting to interact with the contract once more.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Error" %}

## The already approved Pool or Farm looks inactive

![](https://1945296110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYxuX082CiatAs0SbU8%2Fuploads%2FnN6Tgw5wEOjBkTM9ESSO%2Ftelegram-cloud-document-2-5393322353507707560.jpg?alt=media\&token=83153f8e-0eec-46bc-b146-e7011077aaf6)
{% endtab %}

{% tab title="Solution" %}
We've identified an issue when using the Metamask wallet app, where approvals can sometimes be revoked for unknown reasons. If you encounter this issue, please follow the steps below:

1\. Clear your browser cache.

2\. Approve the contract again.

In this tab, you can enter a number of tokens that can be used by the contract for spending either now or in the future. You should click on the "Use default" button for the maximum amount.

After these steps, everything should work correctly.
{% endtab %}
{% endtabs %}

<br>
