# Problem with the implementation of verifying document with verifier-life.js

**URL:** <https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973>\
**Category:** Uncategorized\
**Created:** [October 3, 2021, 5:27pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973 "2021-10-03T17:27:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dampap](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dampap](https://community.blockcerts.org/u/dampap)\
**Post date:** [October 3, 2021, 5:27pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/1 "2021-10-03T17:27:08Z")

</div>

I cant implement verifier-life.js in my front end for simple verification of json files, I get the response “cant get Transaction Id”.  
I will attach my code from front-end as well as the response from console log.  
\*\*  
-Code: getTransactionId Getting transaction ID - Status: starting  
-Code: getTransactionId Getting transaction ID - Status: failure  
-The step getTransactionId fails with the error: Cannot verify this certificate without a transaction ID to compare against.  
-Certificate verification: failure  
\*\*

 ![image](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/3f9d6dd660cda5f0c8cff28819bd7a583087a9ed.png)

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 7, 2021, 12:14pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/2 "2021-10-07T12:14:44Z")

</div>

It looks like it would be a problem with the document you are trying to verify rather than the code itself. Could you share said document?

---

<div class="post-metadata">

**Author:** ![dampap](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dampap](https://community.blockcerts.org/u/dampap)\
**Post date:** [October 8, 2021, 3:01pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/3 "2021-10-08T15:01:44Z")

</div>

I upload .json example certificates and I tested them in another portal which using also the blockcerts api. I will attach the drive link to the certificates and the MIT documents verification portal.  
[https://drive.google.com/drive/folders/1Gez1yv1gGZ9vBWQmEydhsgIBbxEXrk4Q?usp=sharing](https://drive.google.com/drive/folders/1Gez1yv1gGZ9vBWQmEydhsgIBbxEXrk4Q?usp=sharing)  
[https://credentials.mit.edu/?fbclid=IwAR038mJIQ3ft5yQ5DDx8wEO4\_N19PYfPisOOVnnhHPihj-mYnGRqbJLTlxI](https://credentials.mit.edu/?fbclid=IwAR038mJIQ3ft5yQ5DDx8wEO4_N19PYfPisOOVnnhHPihj-mYnGRqbJLTlxI)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/ff62644e3fbd1cbe81232e97e117b00a1653fe92.png)

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 11, 2021, 2:51pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/4 "2021-10-11T14:51:16Z")

</div>

I am very confused.

You pointed me to some certificates which I believe are the Learning Machine’s examples. I have tested locally and I cannot replicate the issue.

What are you trying to achieve? With which document are you encountering the initial error?

---

<div class="post-metadata">

**Author:** ![dampap](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dampap](https://community.blockcerts.org/u/dampap)\
**Post date:** [October 13, 2021, 7:44am UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/5 "2021-10-13T07:44:15Z")

</div>

Yes these documents are the Learning Machine’s examples. I am getting the error I mentioned before with all the example documents. I think the problem is with my code and I didn’t manage to solve it.  
Basically I am trying to develop a simple implementation of blockcerts verification for documents. Is enough for me to work with the example documents I attached at my previous reply.  
To be more clear I have a main html page with a simple form. In this form I have an input that takes documents and a “verify” button. When the user inserts a document and press “verify” the js function I mentioned earlier is called to verify the document through blockcerts, and show a simple message to the user if the document is verified or not(I don’t need any metadata to be shown).  
I will appreciate any help for solving my problem.

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 13, 2021, 12:40pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/6 "2021-10-13T12:40:47Z")

</div>

could you point me to a repro?

---

<div class="post-metadata">

**Author:** ![dampap](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dampap](https://community.blockcerts.org/u/dampap)\
**Post date:** [October 13, 2021, 4:22pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/7 "2021-10-13T16:22:25Z")

</div>

Yes of course, this is the GitHub repository of the entire project:

> **[GitHub - damianosp7/Certified](https://github.com/damianosp7/Certified)**
>
> Contribute to damianosp7/Certified development by creating an account on GitHub.

But this is the file that we are interested in, is the main page. Here I must verify the user’s certificates through blockcerts. To be more specific the code for input file is at lines 166-168. And the code for verification through blockcerts is at lines 294-315.

> <https://github.com/damianosp7/Certified/blob/master/src/main/resources/templates/doc.html>

Here is the program running in Azure you can connect using “root” for username and password. Is not working properly because i have the problem with the verification as i mentioned before.

[http://certified-webapp.azurewebsites.net/login](http://certified-webapp.azurewebsites.net/login)

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 13, 2021, 4:28pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/8 "2021-10-13T16:28:32Z")

</div>

ok thanks, I am a bit busy in the coming days so I won’t have time to go through a proper debug but I’ll do my best to support you

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 13, 2021, 4:31pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/9 "2021-10-13T16:31:31Z")

</div>

![Screenshot 2021-10-13 at 18.30.31](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/4425b06d79df6fb5e838ba7d3291686f3dfc2af9.png)

I notice you have commented `await certificate.init()`, you need this piece of code to execute before starting the verification process

---

<div class="post-metadata">

**Author:** ![dampap](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dampap](https://community.blockcerts.org/u/dampap)\
**Post date:** [October 13, 2021, 4:31pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/10 "2021-10-13T16:31:34Z")

</div>

Thank you very much, I appreciate it a lot!

---

<div class="post-metadata">

**Author:** ![dampap](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dampap](https://community.blockcerts.org/u/dampap)\
**Post date:** [October 13, 2021, 4:38pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/11 "2021-10-13T16:38:04Z")

</div>

I removed the command from the comment as you suggested and I am getting the following error in console log:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/2a8fe2befecd669dbb2be0051b860180e4571daf.png)

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 13, 2021, 4:46pm UTC](https://community.blockcerts.org/t/problem-with-the-implementation-of-verifying-document-with-verifier-life-js/2973/12 "2021-10-13T16:46:33Z")

</div>

hm, I guess you are using the official build which is minified.  
It seems a piece of data is missing, but if you are using the certs from the examples, that’s strange.  
You could potentially try to clone the cert-verifier-js repo, disable terser for the iife build and build and link it to your project. I would normally try and do that myself but since I have not a lot of focus time on the matter ahead of me, this might get you unstuck faster.
