Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reblog -- Global Properties Unrecognized #204

Open
Atherz97 opened this issue Jan 11, 2018 · 9 comments
Open

Can't reblog -- Global Properties Unrecognized #204

Atherz97 opened this issue Jan 11, 2018 · 9 comments

Comments

@Atherz97
Copy link

Atherz97 commented Jan 11, 2018

In order to resteem, I have to create a signed transaction using the head BlockId.

BlockId headBlock = api.getDynamicGlobalProperties().getHeadBlockId();
SignedTransaction t = new SignedTransaction(headBlock, operations, null);
[...]

However while in an earlier version I used (0.4.3) this caused no problems, now I get an exception:

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "current_reserve_ratio" (class eu.bittrade.libs.steemj.plugins.apis.database.models.DynamicGlobalProperty), not marked as ignorable (26 known properties: "virtual_supply", "confidential_supply", "num_pow_witnesses", "total_reward_shares2", "pending_rewarded_vesting_shares", [more properties...])
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: java.lang.Object[0]->eu.bittrade.libs.steemj.plugins.apis.database.models.DynamicGlobalProperty["current_reserve_ratio"])

Basically I can't repost because getting the global properties are breaking the program somehow.

P.S. using api.reblog() is basically the same thing, so it throws the same error. What should I do?

@marvin-we
Copy link
Owner

Hay @Atherz97,

Which version of SteemJ are you using right now? 0.4.3 is the latest release so far and, as you wrote, the field is known there.

In case you are using the master branch: I have started to work on HF 0.20 there and a lot of fields have been rem8ved there, so that would explain your issue :)

Best regards! 😊

@Atherz97
Copy link
Author

Well, it's 0.4.3 (but I cloned the newest version from github today, and building it with "mvn clean package" gave a .jar called "steemj-core-0.5.0-SNAPSHOT-jar-with-dependencies")

And my bad, the older version was 0.4.1. I updated today because that version seemed to have died.

@marvin-we
Copy link
Owner

I am only online via phone and can't test it right now, but from what I have seen right now the 0.4.x still contains this property while on the master branch its already removed.

I think the savest way would be to dowload the souces of the 0.4.3 release.

And my bad, the older version was 0.4.1. I updated today because that version seemed to have died.

Ah yeah, the 0.4.1 was using the websocket connection which has been disabled by Steem 🙈 so yeah, version 0.4.3 should work again :)

Can you let me know if it does? :)

@Atherz97
Copy link
Author

Atherz97 commented Jan 11, 2018

I did use the latest version. It was giving me issues, but I'll try to clone and build again.

... so I'm getting compilation errors. All I did was clone the repo and "mvn clean package" again. Was this latest build still able to work under maven?

@marvin-we
Copy link
Owner

You did a 'git checkout 0.4.x' before the mvn package to do not build the master branch, right?

@Atherz97
Copy link
Author

It works :) I found an already build jar on one of your sites. Thanks.

@Atherz97
Copy link
Author

Atherz97 commented Jan 12, 2018

api.reblog(d.getAuthor(), d.getPermlink());
// d is a Discussion object returned from searching using a query

Uhh so this issue is sort of the same thing, it doesn't throw an exception and returns successful, however there are no posts appearing on the blog itself.

@Atherz97 Atherz97 reopened this Jan 12, 2018
@marvin-we
Copy link
Owner

Hay @Atherz97 and sorry for the late reply.

Thanks for testing the latest release and for the feedback :)

Uhh so this issue is sort of the same thing, it doesn't throw an exception and returns successful, however there are no posts appearing on the blog itself.

The reason why no exception is thrown is that a Steem Node only checks if the JSON is valid. If it is, the method returns success even if the operation is processed or not. I have some ideas to change/improve this with 0.5.0, but this won't help you right now :P

Are you sure that you have provided the correct default account (SteemJConfig.setDefatultAccount) and its posting key? If this the case, could you also share the value of "d.getAuthor()" and "d.getPermlink()" with me?

Thanks and best regards!

@Atherz97
Copy link
Author

Well I guess my bot is stuck in the water until then, lol.

Yes, the posting key is correct; it's able to post messages like this. And in the case of this comment, d.getAuthor() would return the AccountName of "roundbeargames", and d.getPermlink() returns the Permlink for "mdquedjx". What allowed the bot under the previous SteemJ versions to help out with making sure it posted or not, was erroring if it didn't post, lol.

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

No branches or pull requests

2 participants