Parse error: Failed parsing args: missing field > account_id" on NEAR dApp - nearprotocol

I deployed the contract on another computer and it worked, and now on a new envirenment and account the NEAR dApp is failing; here is the code:
https://github.com/bobmakesmagics/Multi-Near-NFT-Minter
// Get blockchian state once on component load and wallet is connected:f
nft.nftSupply(wallet.accountId)
.then(setTotalSupply)
.catch(console)
Error: [-32700] Parse error: Failed parsing args: missing field
account_id"
before I make the RPC call I actually console.log the args.. and there you see the account_id not missing... so what's the problem?

Related

Module parse failed: Unexpected token in npm package

I have a React App and I am trying to use react-player but I get this error:
Module parse failed: Unexpected token
I have 13 similar errors coming from: ReactPlayer.jsx, YouTube.jsx, Facebook.jsx, Twitch.jsx and so on. What can I do? Or an alternative for ReactPlayer?

There is no .trace file found for performance profile ‘Leaks’

Following this example and using Javascript, get the following error when run my tests. The error is generated on the following command:
enter code heredriver.executeScript('mobile: stopPerfRecord', [
{ profileName: 'Leaks' },
]);
Error:
Got this error “Request failed with status 500 due to An unknown server-side error occurred while processing the command. Original error: There is no .trace file found for performance profile ‘Time Profiler’ and device XXXX. Make sure the selected profile is supported on this device”

Why do I get a "0x1004" when trying to deploy my solana anchor IDL?

When I try to deploy an IDL with anchor, I get a cryptic "Custom Error 0x1004" message. What does this mean:?
$ anchor idl init --provider.cluster testnet --filepath ./target/idl/myprogram.json sa3BafcCxwD6G3tUbvTcvnCD28sCXhpasauLtpw9HdA
Error: Error processing Instruction 0: custom program error: 0x1004
0x1004 is hexadecimal for 4100, or the DeclaredProgramIdMismatch error.
So somewhere in your program, you're declaring a different program id than the one you deployed with:
declare_id!("some_other_program_id"); // this is not your program id!

: API error (404): network hlfv11_hyperledger not found

✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: failed to execute transaction b5c260c02b4792c4ae4b85b3d4ccb4565a495da399d27917dccc1a84244e631f: error starting container: error starting container: API error (404): network hlfv11_hyperledger not found
Response from attempted peer comms was an error: Error: failed to execute transaction b5c260c02b4792c4ae4b85b3d4ccb4565a495da399d27917dccc1a84244e631f: error starting container: error starting container: API error (404): network hlfv11_hyperledger not found
This looks like it is a Docker problem trying to start a new ChainCode container on a Docker Network bridge called "hlfv11_hyperledger" which doesn't exist.
(The word 'network' here is ambiguous in the error message :-( )
This is the same problem and hopefully the same solution as a previous post.

Composer 0.13.0 - Error: Missing id

I have a problem with the new version of composer. My chaincode worked fine with the 0.11, now with the 0.13, when I add an asset outside of a chaincode, I have the error:
Error: Missing id"
Of course, the ID is present in the new asset after the creation ;-)
When I put the analog code in a chaincode to add the asset, I have the following error:
Error: Error trying invoke business network. Error: chaincode error (status: 500, message: Error: Object with ID 'Resource {id=zzz.yyy.xxx.tttt#e60e56d92a6928d3f4d1c5bc9bb828c3fc0a292c26ccc35935c594ac0e160c28}' in collection with ID 'Asset:zzz.yyy.xxx.tttt' does not exist)
Here an extract of the code (nothing special)
return getAssetRegistry(NS + '.ttt')
.then(function (tttRegistry) {
// Create the asset
var ttt = factory.newResource(NS, 'ttt', '12345');
// Add new ttt
return tttRegistry.add(ttt)
.then(function () {
// Emit an event
The identity which plays the code is the default admin user
Perhaps, I found something in logs, but I don'y know how to interpret it
2017-09-26T20:09:39.841Z ERROR HLFConnectionManager :fabric-client() [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED)) at /home/hyperledger/node_modules/grpc/src/node/src/client.js:554:15 {}$
2017-09-26T20:09:39.842Z ERROR HLFConnection :queryChainCode() {"message":"Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at channel.queryByChaincode.then.catch (/home/hyperledger/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:754:34)"}$
2017-09-26T20:09:39.842Z ERROR HLFConnection :ping() {"message":"Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at _checkRuntimeVersions.then.catch (/home/hyperledger/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:668:34)"}$
The only info I found is this post Hyperledger Composer:: Error: The current identity must be activated (ACTIVATION_REQUIRED) but, in my case, versions of composer and packages are the same
I can't understand what's happening since I upgrade from 0.11 to 0.13
Any idea?
I found where the problem comes from.
It is not a design problem or something wrong with the ACL.
In Composer 0.11, in an event, if you have a relationship to an asset, in your code, you can access directly to its fields
Behavior change in Composer 0.13, the relationship to an element is only a reference, you can not access directly to its fields
Worst, the error is not rised when you call the method factory.newRelationship(), it is rised when you call the method assetRegistry.add()
So be careful
This sounds more like an issue with the model - you are trying to create a resource which has a required field called id and you are not supplying a value for that field.
Do you have a stack trace you can include?
If the Default rule - "All resource:" should be set to "zzz.yyy.xxx.*"
Then deploy your newly updated network and try again.

Resources