'NEAR "ExecutionError":"Exceeded the prepaid gas."

I'm going through the tutorial in https://near.academy/near101/chapter-6

One of the steps is to run this command (but with my account):

near call museum.testnet add_meme \
'{"meme" : "bob", "title" : "god", "data" : "https://9gag.com/gag/ad8K0vj", "category" : 4}' \
--accountId YOUR_ACCOUNT_NAME.testnet --amount 3

I keep getting errors like:

Log [museum.testnet]: attempting to create meme
    Failure [museum.testnet]: Error: {"index":0,"kind":{"ExecutionError":"Exceeded the prepaid gas."}}

Transaction 9F9VUps6nN4myC8wzBUb1W1GTR4xV5WE had 30000000000000 of attached gas but used 2428115526258 of gas

It's a confusing error message because 30,000,000,000,000 > 2,428,178,132,410.

I have also tried running the command with --amount 4 instead, but I got the same error.

What am I doing wrong?



Solution 1:[1]

Benji at https://discord.com/channels/490367152054992913/542945453533036544/912840246524260355 suggested that instead of using --amount 3 I use --amount 3 --gas=75000000000000, which worked.

Solution 2:[2]

If you are using windows then you should use backslash , before every ".

near call museum.testnet add_meme '{"meme" : "Bob", "title" : "Jokes", "data" : "https://9gag.com/gag/aAGQ97L", "category" : 4}' --accountId NAME.testnet --amount 3 --gas=75000000000000

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ryan
Solution 2 shivsharan