-
Notifications
You must be signed in to change notification settings - Fork 86
Description
We have a photo editing tool on a backend service that uses Filestack's crop() API.
Our custom tool stopped working in the on/around August 3rd. No code changes were made on our end and we can't find any issues on our end that would be causing the problem. We're using the standard 3.x.x SDK JS call from the Filestack delivery CDN, with the following code:
.picker({
transformationsUI: false,
transformations: {
crop: true,
circle: false,
rotate: true
},
storeTo: {
location: "s3"
},
maxFiles: 1,
uploadInBackground: false,
onClose: function(file) {
if (self.receivedFile != null) {
self.processEdit(root, id, photoNumber);
}
},
onCancel: function() {
self.receivedFile = null;
},
onFileUploadFinished: function(file) {
self.receivedFile = file;
},
}).crop([url]);The url value is a URL on our CDN (backed by Cloudflare).
The error we're now experiencing is an "Image cannot be edited" problem in the Filestack UI when crop() is called:
The JS console in the browser reports an error in the Filestack JS SDK, specifically that JSON.stringify cannot serialize cyclic structures.
I can also reproduce the issue with a simple crop() call in JS Fiddle using the examples linked to on the Filestack SDK development documentation.
Manually walking back to JS SDK 3.40.10 resolves the issue, so this problem was introduced as of SDK 3.40.11.