Error with cert-issuer

Hi, When making “cert-issuer -c conf.ini” I receive this error. Unsigned certificates have been copied from the sample folder. What can happen? Thank you

    sudo cert-issuer -c ./conf.ini
WARNING - Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - This run will try to issue on the ethereum_ropsten chain
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Processing 1 certificates
INFO - Processing 1 certificates
INFO - Processing 1 certificates under work path=./data/work
INFO - Processing 1 certificates under work path=./data/work
INFO - Balance check succeeded: {'result': '1000000000000000000', 'message': 'OK', 'status': '1'}
INFO - Balance check succeeded: {'result': '1000000000000000000', 'message': 'OK', 'status': '1'}
INFO - Total cost will be 500000000000000 wei
INFO - Total cost will be 500000000000000 wei
INFO - Starting finalizable signer
INFO - Starting finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - Stopping finalizable signer
INFO - Stopping finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - here is the op_return_code data: c65c6184e3d5a945ddb5437e93ea312411fd33aa1def22b0746d6ecd4aa30f20
INFO - here is the op_return_code data: c65c6184e3d5a945ddb5437e93ea312411fd33aa1def22b0746d6ecd4aa30f20
INFO - Nonce check went correct: {'result': '0x0', 'jsonrpc': '2.0', 'id': 1}
INFO - Nonce check went correct: {'result': '0x0', 'jsonrpc': '2.0', 'id': 1}
INFO - Starting finalizable signer
INFO - Starting finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - Stopping finalizable signer
INFO - Stopping finalizable signer
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
WARNING - app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - signed Ethereum trx = {'error': True, 'message': Exception('Invalid key format: \'{"version":3,"id":"5df2b8b9-8387-4dcd-abae-773804464b6b","address":"c58634be1b3507b2fbab603dc64ccaf50cdb5fe4","Crypto":{"ciphertext":"6b9b129a73035bcbd0c54b1fabed37d7d2cb50ef812f9e79f8a4f88162ccf72d","cipherparams":{"iv":"ca1f9b04277d749785c63648f6dfa319"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"c34ff621b04aa901985b2780eb4c738d794b6b62e82234af66d88b47e4c098fa","n":8192,"r":8,"p":1},"mac":"b4ed081012857fe8ed8399da0dc04e72db00a32d92dc79a7a213c0103f6d5c28"}}\'',)}
INFO - signed Ethereum trx = {'error': True, 'message': Exception('Invalid key format: \'{"version":3,"id":"5df2b8b9-8387-4dcd-abae-773804464b6b","address":"c58634be1b3507b2fbab603dc64ccaf50cdb5fe4","Crypto":{"ciphertext":"6b9b129a73035bcbd0c54b1fabed37d7d2cb50ef812f9e79f8a4f88162ccf72d","cipherparams":{"iv":"ca1f9b04277d749785c63648f6dfa319"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"c34ff621b04aa901985b2780eb4c738d794b6b62e82234af66d88b47e4c098fa","n":8192,"r":8,"p":1},"mac":"b4ed081012857fe8ed8399da0dc04e72db00a32d92dc79a7a213c0103f6d5c28"}}\'',)}
INFO - verifying ethDataField value for transaction
INFO - verifying ethDataField value for transaction
Traceback (most recent call last):
  File "/usr/local/bin/cert-issuer", line 9, in <module>
    load_entry_point('cert-issuer==2.0.15', 'console_scripts', 'cert-issuer')()
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/__main__.py", line 17, in cert_issuer_main
    issue_certificates.main(parsed_config)
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/issue_certificates.py", line 36, in main
    return issue(app_config, certificate_batch_handler, transaction_handler)
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/issue_certificates.py", line 22, in issue
    tx_id = issuer.issue(app_config.chain)
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/issuer.py", line 27, in issue
    txid = self.transaction_handler.issue_transaction(blockchain_bytes)
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/blockchain_handlers/ethereum/transaction_handlers.py", line 61, in issue_transaction
    self.verify_transaction(signed_tx, eth_data_field)
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/blockchain_handlers/ethereum/transaction_handlers.py", line 92, in verify_transaction
    tx_utils.verify_eth_transaction(signed_tx, eth_data_field)
  File "/usr/local/lib/python3.5/dist-packages/cert_issuer-2.0.15-py3.5.egg/cert_issuer/blockchain_handlers/ethereum/tx_utils.py", line 24, in verify_eth_transaction
    for s in signed_hextx.split('80a0'):
AttributeError: 'dict' object has no attribute 'split'

Try to comment display_html in cert_tools and try again to issue certificates.

@alvarogar Did you find the fix for this issue? I’m running into the same error.
@sandoche Tried commenting the display_html line in cert_tools conf and reissuing certificates - still the same error!

Maybe try with this branch: https://github.com/blockchain-certificates/cert-tools/pull/27
But use the python script instead of the command like: python create_v2_certificate_template.py -c conf.ini

Figured out why that error occurs. Its because it wants the private key to be in a plain text format. If we give the json (encrypted), it cannot create the transaction in the required format and then .split() fails.

1 Like

Hi @dev, I already gave the key_file = pk.txt format only, still getting the same error, any lead?
Thanks in advance.
-Gaurav

in conf.ini file
key_file=privatekey.txt
and privatekey.txt file should contain your private key associated to your issuing_address public key

to get your private key go to -> metamask extension ->click on details -> and export private key -> copy this key into your privatekey.txt file
cert_issuer will work

@hellodhakad, I used metamask earlier now I am planning to move ahead and do the process without metamsk, any help?

Thanks!

  • Gaurav

your error msg shows that your format of private key is invalid so you should use a valid public private key pair .
Using metamask you have your account address as a public key and in profile you can get private key or you can generate a public private key pair to use with Ethereum testnet blockchain.