Tools

"java.lang.NullPointerException" error when saving the incoming email configuration on Web Help Desk

Saving the incoming email configuration for a Gmail account results in the error "java.lang.NullPointerException".

First published date

3/2/2026 7:23 PM

Last published date

3/2/2026 7:23 PM

Overview

When configuring the incoming email account, after entering the client_id and client_secret fields and authorizing the email account, the authorization completes without any error, but when saving the configuration, it generates a "java.lang.NullPointerException" in the UI. IN the logs, the following is shown:

2026-02-24 13:49:52.938 [MailTicketDaemonExecutor-thread-1] ERROR whd.daemon.daemons.emailticket - javax.mail.MessagingException: java.lang.NullPointerException;
nested exception is:
java.lang.Exception: java.lang.NullPointerException
E-Mail Server: null
Account: null
Tickets Address: helpdesk@sample.domain
WHD Address: helpdesk@sample.domain
Subscriber ID: 1

javax.mail.MessagingException: java.lang.NullPointerException
at com.macsdesign.whd.util.EmailUtils.mailStoreForEmailAccount(EmailUtils.java:328)
at com.macsdesign.whd.daemon.WHDEmailTicketDaemon$WHDEmailAccountReader.checkInbox(WHDEmailTicketDaemon.java:727)

 

Product section

Web Help Desk

Cause

On Gmail, the permission for the Web Help Desk application in the Third-party apps & services is out of sync and may need to be cleared.

Resolution

1) Log in to the Gmail account https://myaccount.google.com/ using the incoming email account
2) Navigate to https://myaccount.google.com/connections
3) Find and select the name of your OAuth 2.0 client used in Web Help Desk
4) Select Delete all connections you have with (name of the Oauth 2.0 client)
5) Select Confirm
6) Navigate to the incoming email account again on Web Help Desk
7) Click Authorize and follow the steps
8) Allow and confirm the Authorization
9) Click Save to save the incoming account settings
10) Navigate to the Email History tab to see if the connection is successful