You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faqs/content/issuer-node-404-error-verifying-credential.md
+17-93
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,12 @@
2
2
id: issuer-node-404-error-verifying-credential
3
3
title: "Resolving Mobile App Credential Verification 404 Error"
4
4
sidebar_label: Mobile App Verification 404 Error
5
-
description: Explains how to address the 404 error encountered in the mobile app wallet during credential verification with the issuer node. Provides steps to ensure a stable URL and to update the issuer node URL in the database.
5
+
description: Explains the 404 error encountered in the mobile app wallet during credential verification with the issuer node.
6
6
keywords:
7
7
- faq
8
8
- issuer-node
9
9
- mobile app
10
10
- credential verification
11
-
- ngrok
12
-
- database update
13
-
- pgAdmin
14
11
---
15
12
16
13
import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -25,18 +22,24 @@ Error creating proof: [AuthenticateUseCase] error: status is not OK with code 0:
25
22
26
23
## Answer
27
24
28
-
The "unexpected status code: 404" error during credential verification typically stems from the URL stored in the `authCoreClaim` being unavailable. This situation arises when the URL of the issuer node used during the creation of the issuer's identity is no longer accessible, thus hindering the revocation status check required for generating the proof.
25
+
The "unexpected status code: 404" error during credential verification typically stems from the credential status of issuer key or credential status of this credential being unavailable. This situation arises when the URL of the issuer node used during the creation of the issuer's identity is no longer accessible, thus hindering the revocation status check required for generating the proof.
29
26
30
27
To determine if this is the root cause of the error you are encountering, perform the following check:
31
28
32
-
Retrieve the problematic credential using the core API of the issuer node, which operates on port 3001. The endpoint format is:
29
+
Retrieve the problematic credential using the core API of the issuer node, which operates on port 3001. The endpoint format could be
33
30
34
31
```
35
32
GET /v1/{identifier}/claims/{id}
36
33
```
37
34
38
35
Here, `{identifier}` is the DID of the issuer node, and `{id}` is the ID of the credential within the database.
39
36
37
+
or
38
+
39
+
```
40
+
POST v1/agent
41
+
```
42
+
40
43
:::note
41
44
42
45
The issuer node's DID can be retrieved by executing the command `make print-did`.
@@ -51,110 +54,31 @@ Authenticate with this API using the credentials found in the `ISSUER_API_AUTH_U
51
54
52
55
The returned claim from this API endpoint provides detailed information, including the URL of the issuer node at the time the issuer's identity was established. This typically corresponds to the initial setup of the issuer node, involving the creation of the `authCoreClaim` credential, the issuer DID, and the genesis state of the issuer identity.
53
56
54
-
Locate this URL within the JSON response at `proof[0].issuerData.credentialStatus.id`.
57
+
Locate this URL within the JSON response at `proof[0].issuerData.credentialStatus.id` or credentialStatus.id` .
55
58
56
59
If this URL is no longer operational, proceed with the following instructions. If not, the issue may differ.
57
60
58
61
### Ensuring a Stable URL
59
62
60
-
First and foremost, ensure your issuer node has a stable URL. Services like ngrok or localtunnel often change URLs with each session, which can cause this issue. If utilizing ngrok, setting up a [custom domain](https://ngrok.com/docs/guides/how-to-set-up-a-custom-domain) is advisable for consistency.
61
-
62
-
### Manually Updating the URL in the Database
63
-
64
-
:::note
65
-
66
-
Manually updating the URL of the credentials in the database is not a straightforward process. For development or testing purposes, it might be simpler to recreate the issuer node's identity and start from scratch. This can be accomplished by removing and restarting the Docker containers. However, be advised that this approach **will erase all existing data**.
67
-
68
-
:::
69
-
70
-
To manually update the URL in existing credentials, particularly if using Docker, follow these detailed steps:
71
-
72
-
1. Launch a pgAdmin container for UI-based interaction:
63
+
First and foremost, ensure your issuer node has a stable URL. If you're still on a testing phase, take into account that services like ngrok or localtunnel often change URLs with each session, which can cause this issue. If utilizing ngrok, setting up a [custom domain](https://ngrok.com/docs/guides/how-to-set-up-a-custom-domain) is advisable for consistency.
6. On the tree to the left, explore the nodes to `Servers > Issuer Node > Databases > platformid > Schemas > public > Tables`, right-click the `claims` table, and choose "View/Edit Data > All Rows".
67
+
If your issuer node's domain changes, ensure that appropriate redirections are set up so that the old URLs redirect to the new domain. This will help in maintaining the accessibility of the credentials and their verification process.
8. Identify the credential with the `revocationNonce` of `0` (the `authCoreClaim` credential). Modify the URL within the `id` property of the JSON to the new domain of your issuer node.
By following these steps, new credentials issued will utilize the updated issuer node URL. Note that previously issued credentials will need their URLs updated individually to resolve any verification issues.
123
-
124
-
### Updating the Issuer URL in Database Records
125
-
126
-
For those comfortable with direct database manipulation, the issuer node URL within existing credentials can be updated using a SQL command. This method is particularly useful if you have a large number of credentials that need updating to a new issuer node URL. Here is the SQL command to perform this update:
WHERE jsonb_extract_path_text(credential_status, 'id') LIKE'https://123456/%'AND identifier ='myDID';
132
-
```
133
-
134
-
In this command:
135
-
136
-
-`https://123456` represents the old URL to be replaced.
137
-
-`https://0.0.0.0` is the new URL you're updating to.
138
-
-`myDID` should be replaced with the actual DID of the issuer whose credentials you're updating.
139
-
140
-
This SQL command specifically targets the `credential_status` JSONB column within the `claims` table, replacing the old URL with the new one only in records where the `id` field of the `credential_status` matches the specified pattern and belongs to the specified issuer DID.
141
-
142
-
:::warning
143
-
144
-
Direct manipulation of database records can lead to data integrity issues if not performed carefully. Ensure you have backups or other recovery methods available before executing direct database updates.
145
-
146
-
:::
69
+
Never update the URL of a credential in the database. Signed credentials or credentials that are included in a Merkle tree are like monuments that we admire but can’t touch. Manually changing anything in the credential would ruin the Merkle root of the credential, making generation of proof impossible. Therefore, it is key to use the agent API for any updates or modifications in the domain.
147
70
148
71
### Recommendations
149
72
150
73
-**Stable URL**: Secure a stable URL for your issuer node to prevent similar issues in the future.
151
-
-**Database Caution**: Directly modifying database entries should be done with caution to avoid unintended data corruption.
74
+
-**Use Agent API**: Always use the agent API for any updates to ensure the integrity of the credentials.
75
+
-**Redirections**: Set up proper redirections if there is a change in the issuer node's domain to maintain verification capabilities.
152
76
153
77
For further assistance or if you encounter additional challenges, do not hesitate to seek help from the support team.
154
78
155
79
<divclassName="hidden">
156
80
Wrong answer:
157
81
158
-
To resolve the "unexpected status code: 404" error, simply retry the verification process until it succeeds, without needing to check or update the issuer node's URL in the database or reconsider the stability of your ngrok setup.
82
+
To resolve the "unexpected status code: 404" error, simply retry the verification process until it succeeds. Alternatively, update the issuer node's or agent URL in the database.
0 commit comments