# The transaction reverted with an unknown reason

**URL:** <https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013>\
**Category:** TypeScript SDK\
**Created:** [June 24, 2024, 11:29am UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013 "2024-06-24T11:29:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [June 24, 2024, 11:29am UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/1 "2024-06-24T11:29:33Z")

</div>

# **Title: Issue with Order Creation Transaction in Spark Frontend**

Hello everyone,

I’m currently facing an issue while creating an order using our Spark frontend. When I attempt to send the order creation transaction, it fails and throws the error: “The transaction reverted with an unknown reason.”

Despite this error, I notice that the order is actually created successfully. Has anyone encountered a similar issue or have any insights into why this might be happening?

Best regards,

 ![image](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/f/fa414b3cea5d0b246559e22114e991d922ec4b27.png)

Tx id

> **[Fuel Explorer](https://app.fuel.network/tx/0x49a95839ae051749469e041a99bf872f1d5748748d67d8faf688ccaf789fb9d3/simple)**
>
> Fuel Ignition is a high-performance Ethereum layer-2 rollup powered by the FuelVM; built for home verification and scalable for all.

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/nick/32/2330_2.png) [@nick](https://forum.fuel.network/u/nick)\
**Post date:** [June 24, 2024, 11:53am UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/2 "2024-06-24T11:53:28Z")

</div>

Hi @fuel ,

This looks like an error decoding a returned result. Can you please provide the Typescript SDK version you are working with, and the results of `fuelup show` so we can diagnose things from there?

---

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [June 24, 2024, 11:56am UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/3 "2024-06-24T11:56:06Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/6/64beda3945bc64f02b4d506abea9de3bc7a4b318.png)

“fuels”: “^0.89.0”,

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/nick/32/2330_2.png) [@nick](https://forum.fuel.network/u/nick)\
**Post date:** [June 24, 2024, 1:52pm UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/4 "2024-06-24T13:52:57Z")

</div>

Okay, got it.

Can you provide any gist, github project, branch to the exact code causing you this issue?

As well, can you provide the transaction hash and link to the transaction that passed but “failed to decode” on the SDK side?

So the order is created successfully, but your saying that the TS-SDK is throwing an error. Might be the TS SDK decoder @fuel . Let me check with the team.

This may also be related to this issue @fsociety had recently:

> [@TS SDK returns an error even though tx executed successfully](https://forum.fuel.network/t/ts-sdk-returns-an-error-even-though-tx-executed-successfully/6012):
>
> I am using TS SDK v0.89.1. When executing a tx, SDK returns an error even though the tx was successful An example error that returns from the SDK: FuelError: The transaction reverted with an unknown reason

---

<div class="post-metadata">

**Author:** ![anderson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/anderson/32/320_2.png) [@anderson](https://forum.fuel.network/u/anderson)\
**Post date:** [June 24, 2024, 4:19pm UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/5 "2024-06-24T16:19:45Z")

</div>

Yes, we had a similar issue in the past that got fixed, but it seems not 100%.

Do you have the full error `Object`? It should contain more properties. ([example](https://github.com/FuelLabs/fuels-ts/blob/04b58e28b026699053aeb55f97893d4f50767bd1/packages/errors/src/fuel-error.ts#L42-L45))

I suspect we may be failing to map out the exact reason for [this method](https://github.com/FuelLabs/fuels-ts/blob/04b58e28b026699053aeb55f97893d4f50767bd1/packages/account/src/providers/utils/extract-tx-error.ts#L41-L97).

Any repro you can provide will significantly help address the issue.

---

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [June 26, 2024, 11:52am UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/6 "2024-06-26T11:52:04Z")

</div>

Unfortunately, I have already closed the tab, if another problem arises I will post the output

---

<div class="post-metadata">

**Author:** ![nadiia-balaian](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/nadiia-balaian/32/3298_2.png) [@nadiia-balaian](https://forum.fuel.network/u/nadiia-balaian)\
**Post date:** [June 26, 2024, 12:08pm UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/7 "2024-06-26T12:08:17Z")

</div>

![Screenshot 2024-06-26 at 13.05.55](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/f/f482c15e3f853e378221d54fca70a959e01c0391.png)

I have same issue nearly with every 10th transaction when I try to create order

---

<div class="post-metadata">

**Author:** ![maschad](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/maschad/32/2710_2.png) [@maschad](https://forum.fuel.network/u/maschad)\
**Post date:** [July 1, 2024, 4:52pm UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/8 "2024-07-01T16:52:32Z")

</div>

Thanks for sharing this @nadiia-balaian , do you have a reproducible branch? If so could you open an [issue](https://github.com/FuelLabs/fuels-ts/issues/new) on the repo and we can debug there?

---

<div class="post-metadata">

**Author:** ![sarmatdev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sarmatdev/32/3367_2.png) [@sarmatdev](https://forum.fuel.network/u/sarmatdev)\
**Post date:** [July 22, 2024, 1:52pm UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/9 "2024-07-22T13:52:17Z")

</div>

Having the same issue trying to call a function in my smart-contract, it reverts with

> ‘The transaction reverted with an unknown reason: 0’

The metadata receipts:

> [  
> {  
> type: 0,  
> from: ‘0x0000000000000000000000000000000000000000000000000000000000000000’,  
> to: ‘0xb1a89eb7c4d757f64442dc41f07fceb40fc50a46226e6b315cb5398dbceb9c1a’,  
> amount: \<BN: 0x0\>,  
> assetId: ‘0x0000000000000000000000000000000000000000000000000000000000000000’,  
> gas: \<BN: 0x197f058\>,  
> param1: \<BN: 0x28f0\>,  
> param2: \<BN: 0x2901\>,  
> pc: \<BN: 0x2db8\>,  
> is: \<BN: 0x2db8\>  
> },  
> {  
> type: 4,  
> id: ‘0xb1a89eb7c4d757f64442dc41f07fceb40fc50a46226e6b315cb5398dbceb9c1a’,  
> val: \<BN: 0x0\>,  
> pc: \<BN: 0x6740\>,  
> is: \<BN: 0x2db8\>  
> },  
> { type: 9, result: \<BN: 0x1\>, gasUsed: \<BN: 0x80a7\> }  
> ]

---

<div class="post-metadata">

**Author:** ![Akash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/akash/32/3544_2.png) [@Akash](https://forum.fuel.network/u/Akash)\
**Post date:** [August 6, 2024, 7:52am UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/10 "2024-08-06T07:52:23Z")

</div>

Were you able to find a solution or why this error is happening?

---

<div class="post-metadata">

**Author:** ![anderson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/anderson/32/320_2.png) [@anderson](https://forum.fuel.network/u/anderson)\
**Post date:** [August 7, 2024, 11:52pm UTC](https://forum.fuel.network/t/the-transaction-reverted-with-an-unknown-reason/6013/11 "2024-08-07T23:52:36Z")

</div>

I believe we just found the source of the problem:

- [Transaction succeed with revert error · Issue #2898 · FuelLabs/fuels-ts · GitHub](https://github.com/FuelLabs/fuels-ts/issues/2898)
