ApproveENJ error 404

Hello,

When trying to approve my wallet allowance I get the following error:

“message”: “No records found for Model: EnjinCoin\EnjinOauthClient”,
“code”: 404

I am logged into the Enjin site, my wallet daemon is running and I substituted my identity_id into identity_id field of the mutation script.

What is the problem here? I get the same issue trying to ApproveMAXENJ

mutation ApproveENJ{
CreateEnjinRequest (
identity_id: 1419,
type: APPROVE,
approve_enj_data: {
value: 0
}
) {
id,
encodedData
}
}

I switched to the mobile wallet instead of the Windows wallet. I was able to approve the Enjin allowance in the REQUESTS section of the wallet upon linking to the identity and getting the default pop-up.

However when trying to CreateEnjinRequest and request a new token, I receive the same error:

“message”: “No records found for Model: EnjinCoin\EnjinOauthClient”,
“code”: 404

This error doesn’t return with all mutation scripts, as I AM able to create Enjin apps from GraphQL.

It seems GraphQL has trouble talking to my wallet, and it has something to do with the Oauth client. Still need help determining what this is please!

SOLUTION: Include the appId argument in the CreateEnjinRequest mutation.

1 Like

Very nice no error any more, but still enj_allowance is still 0! Help! @filip

Using this link worked for me. https://kovan.cloud.enjin.io/graphql/playground

1 Like

I’m experiencing the same issue.

Followed all steps successfully up until this point, but when I try to set enj_allowance via mutation (code below), it remains at 0.

mutation ApproveMaxENJ {
  
  CreateEnjinRequest (
    identityId:xxxx,
    appId:xxxx,
    type:APPROVE,
    approve_enj_data: {
      value:-1
    }
  ) {
    id,
    encodedData
  }
}

This code runs fine (getting back valid response), but enj_allowance doesn’t change. First time I ran this code I tried to set it to -1. I now realize it should be ran setting to 0 first. I have since run the code setting to 0, and then back to -1 (also tried 99999 etc.), and still no result.

can you please help - am I missing something here?

Here’s viewIdentities output after running above code:

{
  "data": {
    "EnjinIdentities": [
      {
        "id": xxxx,
        "app": {
          "name": "xxxx",
          "id": xxxx
        },
        "linkingCode": null,
        "wallet": {
          "enjAllowance": 0,
          "enjBalance": 200,
          "ethAddress": "0x087e4Ce37B749df698301ADeA954E1ce8B5ba4E2",
          "ethBalance": 0.1
        }
      }
    ]
  }
}

Thanks in advance


Edit: Solution was to actually run the Daemon Wallet after install, as explicitly mentioned in the Creating Game Item video (https://academy.ivanontech.com/products/enjin-blockchain-development-101/categories/1684917/posts/5658338) :man_facepalming: