Getting issue while self-hosting Aspose.PDF

Even after setting valid env values (LicensePublicKey, LicensePrivateKey) we are getting following error logs in aspose pdf pod.

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter ‘publicKey’)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zAUBjX4TGVPVkdNzT4XVO9vLv4kh6eIBXeVWEbxQ=(Object #=zSl8Dr_8=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zu2q7emown8SWc2$Q4m4NkayXyeDSHvVjCfiEc8k=(#=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE= #=zSl8Dr_8=, #=qyPaytMhM1t_HUaBUCPlq$C3y1F2R_hTDmSj1ynG$Ptg= #=zq1Wb_mc=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zJnAmIX3ViIk3NMKpdQwmTyr2f893()
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zeSPsljAGr3VD7RJgHjEwKicsWO3ACD5A4A==(Boolean #=zSl8Dr_8=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zAUBjX4TGVPVkdNzT4XVO9vLv4kh6eIBXeVWEbxQ=(Object #=zSl8Dr_8=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=z6jgS45K6QIJCsSqZLYRK8LIaLRfB()
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=z8hYUnzfJzBYtHrbMNG464kPN9ddxCmZCu0OSj6g=(Object #=zSl8Dr_8=, UInt32 #=zq1Wb_mc=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zeSPsljAGr3VD7RJgHjEwKicsWO3ACD5A4A==(Boolean #=zSl8Dr_8=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=z4U8Vbm_tCcNWBWv0I6OlbkQfnwjpoQ3Qwg==(Object[] #=zSl8Dr_8=, Type[] #=zq1Wb_mc=, Type[] #=zdNIyZ1I=, Object[] #=zn1nCpWU=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=zAQPHsQ6HE5kQb0XebAclwGo8$tHHpA2$W7uaBW0=(Stream #=zSl8Dr_8=, String #=zq1Wb_mc=, Object[] #=zdNIyZ1I=)
at #=qM2qecYXMXKzQeU8ftmkyarJZ4Btu5ln2s9kd9SvBsaE=.#=z37VDANPXEbwYfgyPoJ2jOARKT3FK(Stream #=zSl8Dr_8=, String #=zq1Wb_mc=, Object[] #=zdNIyZ1I=)
at Aspose.Pdf.Metered.SetMeteredKey(String publicKey, String privateKey)
at Aspose.Pdf.Cloud.Config.PdfCloudConfigExtention.EnableMeteredPdfCloud()
at .(WebApplicationBuilder )
at Aspose.Pdf.Cloud.Web.Program.Main(String[] args)
Aborted (core dumped)

@shubhamirpachi

It seems to be a document related issue. Please share your input document with us for investigation.

Hi @tilal.ahmad
I’m getting these error logs while spinning up the PDF pod. And since the pod itself is not UP, I cannot make any request.

Deployment file of the aspose-pdf-cloud.

apiVersion: apps/v1
kind: Deployment
metadata:
  name:  aspose-pdf-cloud
spec:
  replicas: 1
  selector:
    matchLabels:
      app: aspose-pdf-cloud
  template:
    metadata:
      labels:
        app: aspose-pdf-cloud
    spec:
      volumes:
        - name: aspose-mount
          persistentVolumeClaim:
            claimName: aspose-cloud-pvc
      containers:
        - name: aspose-pdf-cloud
          image: aspose/pdf-cloud:latest
          imagePullPolicy: Always
          env:
            - name: LicensePrivateKey 
              value: <licensePrivateKey>
            - name: LicensePublicKey 
              value: <licensePublicKey>
          ports:
            - containerPort: 80
          volumeMounts:
            - mountPath: "/fonts"
              name: aspose-mount
              subPath: backend/data/appdata/fonts
            - mountPath: "/data"
              name: aspose-mount
              subPath: backend/data/appdata/data

@shubhamirpachi

Thanks for the additional information. I have noticed that it is not working as expected, so I logged a ticket(PDFCLOUD-4048) for further investigation and rectification. We will keep you updated about the issue resolution…

Any update on PDFCLOUD-4048?

@shubhamirpachi

After further investigation, we found that the Aspose.PDF Cloud Docker image is failing in evaluation mode. However, it is working fine in license mode. Please share your public and private key in a private message for further investigation.

@tilal.ahmad I’ve shared the public and private key with you in a private message, please confirm.

1 Like

@shubhamirpachi

Thanks for sharing the keys. We will test the scenario and update you shortly.

@tilal.ahmad Any update?

@shubhamirpachi

We have reproduced the issue and are working on the fix. We will notify you as soon as the issue is resolved.

@shubhamirpachi

Please check the private message. It seems you were passing an incorrect private key, which was causing the problem.