Comments (3)
@silliman Is it possible for you to try out @hyperledger/fabric-gateway@unstable
to see if that successfully fixes the problem on s390x? A fix was published as @hyperledger/[email protected]
, and tagged as unstable
. If this fix works for you then I will publish it as a v1.3.2 release.
from fabric-gateway.
Thank you @bestbeforetoday, the fix does work. I installed a new chaincode to get a fresh ledger, changed package.json to point to the @hyperledger/fabric-gateway@unstable
and then the sample gives the expected results:
barry@fabric01:~/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript$ rm -rf node_modules package-lock.json
barry@fabric01:~/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript$ npm install
> [email protected] prepare
> npm run build
> [email protected] build
> tsc
added 177 packages, and audited 178 packages in 25s
35 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
barry@fabric01:~/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript$ grep fabric-gateway package-lock.json
"@hyperledger/fabric-gateway": "unstable"
"node_modules/@hyperledger/fabric-gateway": {
"resolved": "https://registry.npmjs.org/@hyperledger/fabric-gateway/-/fabric-gateway-1.3.2-dev.20230911.1.tgz",
barry@fabric01:~/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript$ npm start
> [email protected] start
> node dist/app.js
channelName: mychannel
chaincodeName: basicgo4
mspId: Org1MSP
cryptoPath: /home/barry/go/src/github.com/silliman/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com
keyDirectoryPath: /home/barry/go/src/github.com/silliman/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore
certPath: /home/barry/go/src/github.com/silliman/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/cert.pem
tlsCertPath: /home/barry/go/src/github.com/silliman/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
peerEndpoint: localhost:7051
peerHostAlias: peer0.org1.example.com
--> Submit Transaction: InitLedger, function creates the initial set of assets on the ledger
*** Transaction committed successfully
--> Evaluate Transaction: GetAllAssets, function returns all the current assets on the ledger
*** Result: [
{
AppraisedValue: 300,
Color: 'blue',
ID: 'asset1',
Owner: 'Tomoko',
Size: 5
},
{
AppraisedValue: 400,
Color: 'red',
ID: 'asset2',
Owner: 'Brad',
Size: 5
},
{
AppraisedValue: 500,
Color: 'green',
ID: 'asset3',
Owner: 'Jin Soo',
Size: 10
},
{
AppraisedValue: 600,
Color: 'yellow',
ID: 'asset4',
Owner: 'Max',
Size: 10
},
{
AppraisedValue: 700,
Color: 'black',
ID: 'asset5',
Owner: 'Adriana',
Size: 15
},
{
AppraisedValue: 800,
Color: 'white',
ID: 'asset6',
Owner: 'Michel',
Size: 15
}
]
--> Submit Transaction: CreateAsset, creates new asset with ID, Color, Size, Owner and AppraisedValue arguments
*** Transaction committed successfully
--> Async Submit Transaction: TransferAsset, updates existing asset owner
*** Successfully submitted transaction to transfer ownership from Tom to Saptha
*** Waiting for transaction commit
*** Transaction committed successfully
--> Evaluate Transaction: ReadAsset, function returns asset attributes
*** Result: {
AppraisedValue: 1300,
Color: 'yellow',
ID: 'asset1694449457740',
Owner: 'Saptha',
Size: 5
}
--> Submit Transaction: UpdateAsset asset70, asset70 does not exist and should return an error
*** Successfully caught the error:
EndorseError: 10 ABORTED: failed to endorse transaction, see attached details for more info
at /home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/client.js:47:347
at Object.callback (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/client.js:101:27)
at Object.onReceiveStatus (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client.js:192:36)
at Object.onReceiveStatus (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
... 2 lines matching cause stack trace ...
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 10,
details: [
{
address: 'peer0.org1.example.com:7051',
message: 'chaincode response 500, the asset asset70 does not exist',
mspId: 'Org1MSP'
}
],
cause: Error: 10 ABORTED: failed to endorse transaction, see attached details for more info
at callErrorFromStatus (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client.js:192:76)
at Object.onReceiveStatus (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
at Object.onReceiveStatus (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
at /home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/resolving-call.js:99:78
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
at Client.makeUnaryRequest (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client.js:160:32)
at /home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/client.js:47:110
at new Promise (<anonymous>)
at GatewayClientImpl.endorse (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/client.js:47:16)
at ProposalImpl.endorse (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/proposal.js:56:95)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ContractImpl.submitAsync (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/contract.js:61:29)
at async ContractImpl.submit (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/contract.js:53:27)
at async updateNonExistentAsset (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/dist/app.js:179:9)
at async main (/home/barry/go/src/github.com/silliman/fabric-samples/asset-transfer-basic/application-gateway-typescript/dist/app.js:92:9) {
code: 10,
details: 'failed to endorse transaction, see attached details for more info',
metadata: Metadata { internalRepr: [Map], options: {} }
},
transactionId: '6a51a379b7ff55c8413b8dcdb8658acd3f9cf092e63dd60965222bb16aad1005'
}
from fabric-gateway.
Excellent! Thank you for the quick feedback. v1.3.2 has now been published including this fix.
from fabric-gateway.
Related Issues (20)
- Can't build the project. Fabric-gateway build is broken !!!IMPORTNAT!!! HOT 2
- error: no combination of peers can be derived which satisfy the endorsement policy HOT 2
- node SDK contract.Newproposal fail when used with arguments HOT 2
- Enable TypeScript/JavaScript implementation to be used in a browser HOT 2
- Support Go 1.21
- Support Node 20
- End support for Node 16
- End support for Go 1.19
- error sending: chaincode stream terminated HOT 3
- Support Java 21
- Migration of fabric-ca-client package to be included in fabric-gateway HOT 2
- Explicit resource management (`using` keyword) for Node API
- Improve off-line signing documentation
- Use TypeScript formatter instead of ESLint format rules
- Update (or remove) dependency-check-maven HOT 1
- Scenario test failures with Java 8 and 11
- Import fail in ES module format application HOT 2
- Add support for Go 1.22
- Use noble-curves for Node crypto implementation (again)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabric-gateway.