Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

CommandService Stateless invalid tx - Wrongly formed creator_account_id, passed value: '' #141

Open
truongnmt opened this issue Aug 8, 2018 · 3 comments

Comments

@truongnmt
Copy link

truongnmt commented Aug 8, 2018

I'm trying to create an Android app with Hyperledger Iroha. So first user will type Username and Account details to register an account.

enter image description here

Here is my IrohaConnection.kt file to form a request to send to Iroha server. Basically, I just copy and port from Java to Kotlin from this iroha-android-sample repo.

This is the message I get from Iroha console:

[2018-08-08 01:57:17.221326506][th:35][warning] CommandService Stateless invalid tx: Transaction: [[Transaction should contain at least one command Wrongly formed creator_account_id, passed value: ''. Field should match regex '[a-z_0-9]{1,32}\@([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' bad timestamp: too old, timestamp: 0, now: 1533693437216 Quorum should be within range (0, 128] ]]
, hash: 2526b8c49021a34172deb7255509e34b45822c07c822808176498bec1f0cb1fe
[2018-08-08 01:57:17.270612531][th:38][warning] CommandService Stateless invalid tx: Transaction: [[Transaction should contain at least one command Wrongly formed creator_account_id, passed value: ''. Field should match regex '[a-z_0-9]{1,32}\@([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' bad timestamp: too old, timestamp: 0, now: 1533693437270 Quorum should be within range (0, 128] ]]
, hash: 2526b8c49021a34172deb7255509e34b45822c07c822808176498bec1f0cb1fe
[2018-08-08 01:57:18.274183120][th:35][warning] CommandService StatusStream request processing timeout, hash: 7e184190581756a5d7192e9491b4f9bf9a33f077ecb0044782a5057aa8212eea

It's said that:

  • CommandService Stateless invalid tx
  • Transaction should contain at least one command
  • Wrongly formed creator_account_id, passed value: ''
  • bad timestamp: too old, timestamp: 0, now: 1533693437270
  • Quorum should be within range (0, 128] ]]

I'm not really understand how Iroha receive variables but when debug I see:

enter image description here

createdTime_ , creatorAccountId_, quorum_ these 3 vars has value which is kind of what Iroha ask for, but somehow the server not get it.

Another weird things is, on this sample Iroha-android repo: build.gradle:

release {
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        resValue "string", "iroha_url", "199.247.26.56"
        resValue "integer", "iroha_port", "50051"
    }
    debug {
        resValue "string", "iroha_url", "199.247.26.56"
        resValue "integer", "iroha_port", "50051"
    }

You see those IP? When using this default IP 199.247.26.56, the app work, but when I change to my local IP, which is the same PC - my own Iroha deployment, it's not. I think that on this IP 199.247.26.56, you guys have deployed Iroha correctly.

So on that though, I have deploy Iroha following these:

But still the same error:

  • CommandService Stateless invalid tx
  • Transaction should contain at least one command
  • Wrongly formed creator_account_id, passed value: ''
  • bad timestamp: too old, timestamp: 0, now: 1533693437270
  • Quorum should be within range (0, 128] ]]
@truongnmt
Copy link
Author

truongnmt commented Aug 8, 2018

Just debug in to app, params correctly I think. Maybe problem with my Iroha peer setup. Any idea @BulatMukhutdinov @mrZizik @kobaken0029 I got this error for several days 😢

screenshot from 2018-08-08 10-41-20

@truongnmt truongnmt changed the title Wrongly formed creator_account_id, passed value: '' CommandService Stateless invalid tx - Wrongly formed creator_account_id, passed value: '' Aug 30, 2018
@truongnmt
Copy link
Author

Update:
Iroha: master branch
Proto: copy from master branch here and here
Android SDK: 1.4
But still get error, the public key and private key I got from admin@test from example folder.

[2018-08-18 11:10:08.916164400][th:45][warning] CommandService Stateless invalid tx: Signature: [[Wrong signature [353f151fc9a7db3ec484156647e7c24014af250576699a59eb257a8666615e2ae350e9b7dbead36d203be73c527c1ab8b10a0c98d61defbb04b9fabe25924404;313a07e6384776ed95447710d15e59148473ccfc052a681317a72a69f2a49910] ]]
Transaction: [[Transaction should contain at least one command Wrongly formed creator_account_id, passed value: ''. Field should match regex '[a-z_0-9]{1,32}\@([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' bad timestamp: too old, timestamp: 0, now: 1534590608915 Quorum should be within range (0, 128] ]]
, hash: 708713afdb215a7fdd1b3246ec662a3d992648dc262ca1d5360be94b6d75313b

@truongnmt
Copy link
Author

Tested on iroha-android repository:
This is what client send:
screen shot 2018-08-20 at 09 48 37

  • iroha server master branch response:
[2018-08-20 02:45:00.811779200][th:23][warning] CommandService Stateless invalid tx: Transaction: [[Transaction should contain at least one command Wrongly formed creator_account_id, passed value: ''. Field should match regex '[a-z_0-9]{1,32}\@([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' bad timestamp: too old, timestamp: 0, now: 1534733100811 Quorum should be within range (0, 128] ]]
, hash: 50433a976fa5653f2f6636f6c1260845e47f1b734497e55264f06678aa8e842d
  • iroha server develop branch response:
[2018-08-20 02:55:36.283199200][th:21][warning] CommandService Stateless invalid tx: Transaction: [[Transaction should contain at least one command Wrongly formed creator_account_id, passed value: ''. Field should match regex '[a-z_0-9]{1,32}\@([a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?' bad timestamp: too old, timestamp: 0, now: 1534733736282 Quorum should be within range (0, 128] ]]
, hash: 39835987c5c57ef1ff092b8cdbc55b53f78dd83425743efdfb32cfacf6390da6

Weird that the default IP of the app 199.247.26.56 just worked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant