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

🐛 INVALID_HASH when trying to add metadata from github #2092

Open
willpiam opened this issue Sep 27, 2024 · 2 comments
Open

🐛 INVALID_HASH when trying to add metadata from github #2092

willpiam opened this issue Sep 27, 2024 · 2 comments
Labels
🐛 Bug Something isn't working 🗳️ Voting Pillar

Comments

@willpiam
Copy link

Area

Voting Pillar

Domain

gov.tools

Which wallet were you using?

No response

Context

When I try to provide context on the Ikigai action by hosting the metadata on github I get "Data validation failed", "INVALID_HASH". Here is the metadata url I am trying to use: https://raw.githubusercontent.com/willpiam/drep/master/vote_context/two.jsonld

Steps to reproduce

  1. select the Ikigai action
  2. choose how to vote
  3. add context
  4. type message
  5. continue & download metadata
  6. create & commit new file using github browser interface, making sure to get the file extension correct
  7. navigate in browser to new file
  8. press "raw" to view the raw file
  9. copy raw file URL
  10. come back to gov tools and paste in the copied URL
  11. press continue

Actual behavior

After pressing continue all I see is "Data validation failed" with the subtext "INVALID_HASH".

Expected behavior

It should validate the hashes match (they should as I have not modified the content at all) and allow me to continue on to the next step in the voting process.

@willpiam willpiam added the 🐛 Bug Something isn't working label Sep 27, 2024
@jdyczka
Copy link
Contributor

jdyczka commented Oct 2, 2024

It's an issue with GitHub browser interface. Although not visible at first glance, when you inspect the raw file on GitHub you can see that there is an extra new line at the end. That causes the hash to be different.
The solution would be to upload the file downloaded from GovTool directly instead of copying its contents.

@willpiam
Copy link
Author

willpiam commented Oct 2, 2024

Hummm perhaps the the process should minify the json before hashing it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 🗳️ Voting Pillar
Projects
Status: No status
Status: No status
Development

No branches or pull requests

3 participants