Link to Source Control over MID server: Operation encountered an unexpected error due to the 'bundle' file extension missing from glide.attachment.extensions when configured.


Description

When trying to link to Source Control over a MID server the operation can encounter an unexpected error due to the 'bundle' file extension missing from glide.attachment.extensions when configured.

Errors on the instance logs may look like:

2020-08-12 01:00:17 (797) worker.3 worker.3 txid=6fd37e4edb6e Name: Refreshing metadata from the remote repo
...
2020-08-12 01:00:17 (855) worker.3 worker.3 txid=6fd37e4edb6e SEVERE *** ERROR *** The operation encountered an unexpected error. Check the node log file java.lang.NullPointerException

Since this does not tell you much you want to check the MID server logs instead, that may show the below error:

2020-08-24 10:05:20 (900) Worker-Expedited:ExportNewApplicationProbe-0af7a802db765010d19f07f2ca96197a SEVERE *** ERROR *** com.snc.automation_common.integration.exceptions.AutomationComponentException: Failed to create attachment: Method failed: (/api/now/v1/attachment/file) with code: 400

Release or Environment

Any

Cause

When customers configure the property glide.attachment.extensions it may cause the source control link (over a MID server) to fail.

When the value is empty all extensions are accepted.

If extensions are defined the platform will only allow the listed ones.

https://docs.servicenow.com/csh?topicname=r_AdministeringAttachments.html&version=latest

Resolution

Adding the file extension 'bundle' to the glide.attachment.extensions property (assuming the value is NOT empty) may solve the issue.

/sys_properties_list.do?sysparm_query=name=glide.attachment.extensions

 

If the value of above property is empty, meaning there are no restrictions on extensions, then please check your midserver and/or firewall to ensure the extension 'bundle' is not blocked there.

Additional Information

Also be sure to check the below article for similar issues on this area.

KB0827801 - Unexpected error when Linking to or Importing from Source Control via a MID server