I am trying to download a mobile driver’s license in the inji setup guide. I have successfully downloaded farmer’s credentials but no the mDL.
The flow I follow to reproduce the error is I clicked “Transport Department” on the list of issuers, select the “Mobile Driving License” type, log in in eSignet with the UIN 5860356276
and 111111
for OTP. But I only get the message “An Error Ocurred: Due to technical error, we were unable to download the card” on Inji-Web.
Inji-certify doesn’t seem to have any errors in the logs. But This is the error log in the mimoto service:
ERROR 1 --- [mimoto] [nio-8099-exec-3] [67f7decd2889f93d85294a0c5bdc44ec-04ca60e2517fbe2f] i.m.m.controller.CredentialsController : Exception occurred while generating pdf
java.lang.NullPointerException: Cannot invoke "io.mosip.mimoto.dto.mimoto.CredentialDefinitionResponseDto.getType()" because the return value of "io.mosip.mimoto.dto.mimoto.CredentialsSupportedResponse.getCredentialDefinition()" is null
at io.mosip.mimoto.service.impl.CredentialServiceImpl.generateVCCredentialRequest(CredentialServiceImpl.java:152)
The error log that I get the in inji-web is really similar:
"POST /v1/mimoto/credentials/download HTTP/1.1" 500 299 "http://localhost:3001/redirect?state=T2TNzAO~FKzjr4DQ2uLbekcmYIC-Bs~KYIix4wPYDcH&code=LCmPGYsTzfIUJfqMvkoGezEwfJT3va3eGa3bsT77MA8"
This is the response of the request:
{
"response": null,
"errors": [
{
"errorCode": "RESIDENT-APP-028",
"errorMessage": "Cannot invoke \"io.mosip.mimoto.dto.mimoto.CredentialDefinitionResponseDto.getType()\" because the return value of \"io.mosip.mimoto.dto.mimoto.CredentialsSupportedResponse.getCredentialDefinition()\" is null"
}
]
}
I ran the script that is in digital-credential-plugins/mock-certify-plugin at release-0.3.x · mosip/digital-credential-plugins and paste the content of the resulting issuerSecret.txt in certify-mock-mdl.properties in the property mosip.certify.mock.mdoc.issuer-key-cert
mosip.certify.cache.secure.individual-id=false
mosip.certify.cache.store.individual-id=false
mosip.certify.cache.security.algorithm-name=AES/ECB/PKCS5Padding
#TODO:Onboard issuer key and certificate data here format - "$base64EncodedPrivateKey||$base64EncodedCertificate"
mosip.certify.mock.mdoc.iss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DM5a3JMTjhYczR6eTVNeGxBaG1ybGM3Vm1ZUUlNN1J4QnRuR1JiDQpmVEFLQmdncWhrak9QUVFEQWdOSkFEQkdBaUVBOE5HSVB3RGRBVjJmVjU0eG9rUGZaQlMzc2dSRkNSNEJhUWl3DQpGSi9DZldVQ0lRRFF6NWVqVWk3YlpUU0pVWmhnbGljNXJROUVIa3kzVDFoRmtpWGU4NnU3ZGc9PQ0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ0K
mosip.certify.mock.vciplugin.mdoc.issuer-key-cert=${mosip.certify.mock.mdoc.issuer-key-cert}
I’ll post my docker-compose.yaml in case that’s useful:
version: '3.8'
services:
database:
image: 'postgres:latest'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./certify_init.sql:/docker-entrypoint-initdb.d/certify_init.sql
networks:
- network
ports:
- "5433:5432"
certify:
# build:
# context: ../../certify-service # Relative path from the location of docker-compose.yaml
# dockerfile: Dockerfile # Explicitly specify the Dockerfile
image: mosipid/inji-certify:latest
user: root
ports:
- 8090:8090
environment:
- container_user=mosip
- active_profile_env=default, mock-mdl
- SPRING_CONFIG_NAME=certify
- SPRING_CONFIG_LOCATION=/home/mosip/config/
- enable_certify_artifactory=false
- download_hsm_client=false
- mosipbox_public_url=http://certify:8090
volumes:
- ./config/certify-default.properties:/home/mosip/config/certify-default.properties
- ./config/certify-csvdp-farmer.properties:/home/mosip/config/certify-csvdp-farmer.properties
- ./config/certify-mock-mdl.properties:/home/mosip/config/certify-mock-mdl.properties
- ./data/CERTIFY_PKCS12:/home/mosip/CERTIFY_PKCS12
- ./loader_path/certify/:/home/mosip/additional_jars/
# modify the below file to change the identity fields in the VC
- ./config/farmer_identity_data.csv:/home/mosip/config/farmer_identity_data.csv
networks:
- network
depends_on:
- database
mimoto-service:
container_name: 'Mimoto-Service'
image: mosipid/mimoto:0.15.0
user: root
ports:
- '8099:8099'
environment:
- container_user=mosip
- active_profile_env=default, mock-mdl
- SPRING_CONFIG_NAME=mimoto
- SPRING_CONFIG_LOCATION=/home/mosip/
networks:
- network
volumes:
- ./config/mimoto-default.properties:/home/mosip/mimoto-default.properties
- ./config/mimoto-issuers-config.json:/home/mosip/mimoto-issuers-config.json
- ./config/mimoto-trusted-verifiers.json:/home/mosip/mimoto-trusted-verifiers.json
- ./certs/oidckeystore.p12:/home/mosip/certs/oidckeystore.p12
inji-web:
container_name: 'inji-web'
image: mosipid/inji-web:0.11.0
ports:
- '3001:3004'
environment:
- DEFAULT_LANG=en
- MIMOTO_HOST=http://localhost:3001/v1/mimoto
volumes:
- ./config/mimoto-default.properties:/home/mosip/mimoto-default.properties
- ./config/mimoto-issuers-config.json:/home/mosip/mimoto-issuers-config.json
- ./config/mimoto-trusted-verifiers.json:/home/mosip/mimoto-trusted-verifiers.json
- ./config/credential-template.html:/home/mosip/credential-template.html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- mimoto-service
networks:
- network
networks:
network:
name: mosip_network
external: true
volumes:
cache:
driver: local