Let me begin by saying, I don't enjoy making these sort of posts. They feel like I'm complaining about a tool that I get to use for free, and although it could be taken like that, this is not the case at all.
This tool is a powerhouse, and it's help me onboard more people than ever before with just a few clicks. My motive here is to see if I can help Sagar and Matt from a distance, if anything I can say may give them the ability to make this tool work even better.
For a few days now, I've been having issues using it, and I think I figured out what is the problem.
Looking under the hood, inspecting the error messages, I got the following information to share:
The obvious thing we can quickly see is that the transaction simply failed. But, why did it fail? What's wrong with this post? After all, it's just a little post, right?
Without being able to look at the code, I can only guess, but this is my best estimation as to what is happening.
The result:
{"success":false,"errorCode":5000,"error":"failed to sign and/or broadcast transaction"}
Now, that error usually pops up when there’s either a signing problem or a broadcast problem. Since it failed with both Keychain and using the posting key directly, we can scratch off the idea that it’s an authentication issue. It’s definitely not an active key problem either, since the app only posts – no transfers or sensitive calls.
But then I saw something interesting.
There’s this weird image URL popping up:
https://images.hive.blog/600x0/https://images.hive.blog/1000x0/http://be…
I mean, it technically loads if you click on it, but it looks… off. Double prefixes, multiple chained resizing parameters, all jammed together. Hive’s markdown parser isn’t as forgiving as a browser. Even if it loads in a tab, it might still throw off the post body parsing or the json_metadata array.
That’s my top suspicion right now.
But, just to be sure, I’d recommend testing a text-only post. Strip out the image entirely(for debugging, that is). If that goes through clean, then the culprit is definitely the malformed image URL.
If it still fails without an image, then I’d look at permalink generation logic (make sure there are no uppercase letters, spaces, or duplicates) and validate the json_metadata structure for stray commas or unescaped characters.
Anyway, I just wanted to share my two hivetoshis here. You know I’m rooting for Hive to win. This app is too cool to stay down for long.
Hopefully this helps...
MenO