After upgrading to Jetpack version 5.0, one of the following error messages may appear when attempting to change settings of Jetpack by WordPress.com, and the settings were not changed:

Error updating settings. SyntaxError (DOM Exception 12): The string did not match the expected pattern

Error updating settings. SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Jetpack Error Updating Settings

In addition to error when changing the Jetpack settings, the issue also happens when users attempt to remove various ads on the Jetpack settings pages, such as getting WordPress Apps for every device.

The issue seemed to be caused by the plugin WP-SpamShield, which coincidentally has an update a day or two apart from Jetpack.

While waiting for author of either Jetpack or WP-SpamShield to resolve the conflict that caused the error updating settings of Jetpack, the workaround to resolve the problem is by disabling the WP-SpamShield plugin. When WP-SpamShield is disabled, the settings for Jetpack can be changed successfully.

Once configuration of Jetpack is done, one can re-enable WP-SpamShield plugin if required.