[GH-ISSUE #3719] Internal Error: josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0) #2457

Closed
opened 2026-02-26 07:35:38 +03:00 by kerem · 3 comments
Owner

Originally created by @blade1989 on GitHub (Apr 23, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3719

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug

When requesting a certificate for a domain, from the Add Let's Encrypt Certificate modal, I get an Internal Error message, with the following message:

CommandError: Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
An unexpected error occurred:
josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.

    at /app/lib/utils.js:16:13
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

In the docker compose logs, the following entry is found:

nginxproxymanager  | [4/23/2024] [7:32:23 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
nginxproxymanager  | [4/23/2024] [7:32:23 PM] [Nginx    ] › ℹ  info      Reloading Nginx
nginxproxymanager  | [4/23/2024] [7:32:23 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -s reload
nginxproxymanager  | [4/23/2024] [7:32:29 PM] [SSL      ] › ℹ  info      Requesting Let\'sEncrypt certificates for Cert #65: sub.domain.tld
nginxproxymanager  | [4/23/2024] [7:32:29 PM] [SSL      ] › ℹ  info      Command: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-65" --agree-tos --authenticator webroot --email "account@domain.tld" --preferred-challenges "dns,http" --domains "sub.domain.tld" 
nginxproxymanager  | [4/23/2024] [7:32:29 PM] [Global   ] › ⬤  debug     CMD: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-65" --agree-tos --authenticator webroot --email "account@domain.tld" --preferred-challenges "dns,http" --domains "sub.domain.tld" 
nginxproxymanager  | [4/23/2024] [7:32:29 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/temp/letsencrypt_65.conf
nginxproxymanager  | [4/23/2024] [7:32:29 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
nginxproxymanager  | [4/23/2024] [7:32:30 PM] [Nginx    ] › ℹ  info      Reloading Nginx
nginxproxymanager  | [4/23/2024] [7:32:30 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -s reload
nginxproxymanager  | [4/23/2024] [7:32:30 PM] [Express  ] › ⚠  warning   Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
nginxproxymanager  | An unexpected error occurred:
nginxproxymanager  | josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0)
nginxproxymanager  | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.

The letsencrypt logs shows the following:

2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:certbot version: 2.9.0
2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:Location of certbot entry point: /opt/certbot/bin/certbot
2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:Arguments: ['--config', '/etc/letsencrypt.ini', '--work-dir', '/tmp/letsencrypt-lib', '--logs-dir', '/tmp/letsencrypt-log', '--cert-name', 'npm-65', '--agree-tos', '--authenticator', 'webroot', '--email', 'account@domain.tld', '--preferred-challenges', 'dns,http', '--domains', 'sub.domain.tld']
2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2024-04-23 19:32:29,459:DEBUG:certbot._internal.log:Root logging level set at 30
2024-04-23 19:32:29,461:DEBUG:certbot._internal.plugins.selection:Requested authenticator webroot and installer None
2024-04-23 19:32:29,461:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * webroot
Description: Saves the necessary validation files to a .well-known/acme-challenge/ directory within the nominated webroot path. A seperate HTTP server must be running and serving files from the webroot path. HTTP challenge only (wildcards not supported).
Interfaces: Authenticator, Plugin
Entry point: EntryPoint(name='webroot', value='certbot._internal.plugins.webroot:Authenticator', group='certbot.plugins')
Initialized: <certbot._internal.plugins.webroot.Authenticator object at 0x7f3f98da6650>
Prep: True
2024-04-23 19:32:29,461:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.webroot.Authenticator object at 0x7f3f98da6650> and installer None
2024-04-23 19:32:29,462:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator webroot, Installer None
2024-04-23 19:32:29,462:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/opt/certbot/lib/python3.11/site-packages/josepy/interfaces.py", line 175, in json_loads
    loads = json.loads(json_string)
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/certbot/bin/certbot", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 1894, in main
    return config.func(config, plugins)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 1582, in certonly
    le_client = _init_le_client(config, auth, installer)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 833, in _init_le_client
    acc, acme = _determine_account(config)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 729, in _determine_account
    accounts = account_storage.find_all()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/account.py", line 186, in find_all
    return self._find_all_for_server_path(self.config.server_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/account.py", line 168, in _find_all_for_server_path
    accounts.append(self._load_for_server_path(account_id, server_path))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/account.py", line 223, in _load_for_server_path
    key = jose.JWK.json_loads(key_file.read())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/certbot/lib/python3.11/site-packages/josepy/interfaces.py", line 177, in json_loads
    raise errors.DeserializationError(error)
josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0)
2024-04-23 19:32:29,466:ERROR:certbot._internal.log:An unexpected error occurred:
2024-04-23 19:32:29,467:ERROR:certbot._internal.log:josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0)

Nginx Proxy Manager Version

v2.11.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to SSL Certificates
  2. Click on Add SSL Certificates
  3. Scroll down to Lets's Encrypt
  4. Fill in the form: Domain Names: sub.domain.tld
  5. See error: described above

Expected behavior

My newly requested Let's Encrypt certificate

Screenshots

Operating System

Ubuntu 22.04

Additional context

Docker installation

Originally created by @blade1989 on GitHub (Apr 23, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3719 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** <!-- A clear and concise description of what the bug is. --> When requesting a certificate for a domain, from the `Add Let's Encrypt Certificate` modal, I get an `Internal Error` message, with the following message: ```bash CommandError: Saving debug log to /tmp/letsencrypt-log/letsencrypt.log An unexpected error occurred: josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0) Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details. at /app/lib/utils.js:16:13 at ChildProcess.exithandler (node:child_process:430:5) at ChildProcess.emit (node:events:518:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) ``` In the docker compose logs, the following entry is found: ```bash nginxproxymanager | [4/23/2024] [7:32:23 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" nginxproxymanager | [4/23/2024] [7:32:23 PM] [Nginx ] › ℹ info Reloading Nginx nginxproxymanager | [4/23/2024] [7:32:23 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload nginxproxymanager | [4/23/2024] [7:32:29 PM] [SSL ] › ℹ info Requesting Let\'sEncrypt certificates for Cert #65: sub.domain.tld nginxproxymanager | [4/23/2024] [7:32:29 PM] [SSL ] › ℹ info Command: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-65" --agree-tos --authenticator webroot --email "account@domain.tld" --preferred-challenges "dns,http" --domains "sub.domain.tld" nginxproxymanager | [4/23/2024] [7:32:29 PM] [Global ] › ⬤ debug CMD: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-65" --agree-tos --authenticator webroot --email "account@domain.tld" --preferred-challenges "dns,http" --domains "sub.domain.tld" nginxproxymanager | [4/23/2024] [7:32:29 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/temp/letsencrypt_65.conf nginxproxymanager | [4/23/2024] [7:32:29 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" nginxproxymanager | [4/23/2024] [7:32:30 PM] [Nginx ] › ℹ info Reloading Nginx nginxproxymanager | [4/23/2024] [7:32:30 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload nginxproxymanager | [4/23/2024] [7:32:30 PM] [Express ] › ⚠ warning Saving debug log to /tmp/letsencrypt-log/letsencrypt.log nginxproxymanager | An unexpected error occurred: nginxproxymanager | josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0) nginxproxymanager | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details. ``` The letsencrypt logs shows the following: ```bash 2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:certbot version: 2.9.0 2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:Location of certbot entry point: /opt/certbot/bin/certbot 2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:Arguments: ['--config', '/etc/letsencrypt.ini', '--work-dir', '/tmp/letsencrypt-lib', '--logs-dir', '/tmp/letsencrypt-log', '--cert-name', 'npm-65', '--agree-tos', '--authenticator', 'webroot', '--email', 'account@domain.tld', '--preferred-challenges', 'dns,http', '--domains', 'sub.domain.tld'] 2024-04-23 19:32:29,440:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot) 2024-04-23 19:32:29,459:DEBUG:certbot._internal.log:Root logging level set at 30 2024-04-23 19:32:29,461:DEBUG:certbot._internal.plugins.selection:Requested authenticator webroot and installer None 2024-04-23 19:32:29,461:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * webroot Description: Saves the necessary validation files to a .well-known/acme-challenge/ directory within the nominated webroot path. A seperate HTTP server must be running and serving files from the webroot path. HTTP challenge only (wildcards not supported). Interfaces: Authenticator, Plugin Entry point: EntryPoint(name='webroot', value='certbot._internal.plugins.webroot:Authenticator', group='certbot.plugins') Initialized: <certbot._internal.plugins.webroot.Authenticator object at 0x7f3f98da6650> Prep: True 2024-04-23 19:32:29,461:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.webroot.Authenticator object at 0x7f3f98da6650> and installer None 2024-04-23 19:32:29,462:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator webroot, Installer None 2024-04-23 19:32:29,462:DEBUG:certbot._internal.log:Exiting abnormally: Traceback (most recent call last): File "/opt/certbot/lib/python3.11/site-packages/josepy/interfaces.py", line 175, in json_loads loads = json.loads(json_string) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/certbot/bin/certbot", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/main.py", line 19, in main return internal_main.main(cli_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 1894, in main return config.func(config, plugins) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 1582, in certonly le_client = _init_le_client(config, auth, installer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 833, in _init_le_client acc, acme = _determine_account(config) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/main.py", line 729, in _determine_account accounts = account_storage.find_all() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/account.py", line 186, in find_all return self._find_all_for_server_path(self.config.server_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/account.py", line 168, in _find_all_for_server_path accounts.append(self._load_for_server_path(account_id, server_path)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/certbot/_internal/account.py", line 223, in _load_for_server_path key = jose.JWK.json_loads(key_file.read()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/certbot/lib/python3.11/site-packages/josepy/interfaces.py", line 177, in json_loads raise errors.DeserializationError(error) josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0) 2024-04-23 19:32:29,466:ERROR:certbot._internal.log:An unexpected error occurred: 2024-04-23 19:32:29,467:ERROR:certbot._internal.log:josepy.errors.DeserializationError: Deserialization error: Expecting value: line 1 column 1 (char 0) ``` **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> v2.11.1 **To Reproduce** Steps to reproduce the behavior: 1. Go to `SSL Certificates` 2. Click on `Add SSL Certificates` 3. Scroll down to `Lets's Encrypt` 4. Fill in the form: Domain Names: sub.domain.tld 5. See error: described above **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> My newly requested Let's Encrypt certificate **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Ubuntu 22.04 **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. --> Docker installation
kerem 2026-02-26 07:35:38 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@blade1989 commented on GitHub (May 6, 2024):

@jc21 I updated to the latest NGINX Proxy Manager, v2.11.2. But, the same issue persist. My certs wil expire in less than 2 weeks, any help is greatly appreciated!

<!-- gh-comment-id:2096643696 --> @blade1989 commented on GitHub (May 6, 2024): @jc21 I updated to the latest NGINX Proxy Manager, v2.11.2. But, the same issue persist. My certs wil expire in less than 2 weeks, any help is greatly appreciated!
Author
Owner

@github-actions[bot] commented on GitHub (Dec 28, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2564138792 --> @github-actions[bot] commented on GitHub (Dec 28, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Jan 18, 2026):

Issue was closed due to inactivity.

<!-- gh-comment-id:3764713209 --> @github-actions[bot] commented on GitHub (Jan 18, 2026): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2457
No description provided.