DOCX file cannot be opened after edited and saved. CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I am using the document editor and I am able to open, edit, and save doc files. I am also able to open, edit, save, and reopen most docx files but I am running into the issue described above with certain docx files. The problem is I can open the docx file and then save, but when I try to reopen the docx file, I will run into the follow error:


Screen Shot 2021-12-28 at 3.52.26 PM.png

For testing purposes, we are using some docx files from this website:
https://file-examples.com/index.php/sample-documents-download/sample-doc-download/#google_vignette

The problem will occur whenever I edit and save one of these example docx files and then try to reopen it. I have been able to open these files with Microsoft office after editing for what that is worth. We will be having many users in the future uploading docx files so I am concerned that this might be a problem with other uploads. 

I am using TypeScript and Angular and currently running everything locally. 


12 Replies

SM Suriya Murugan Syncfusion Team December 30, 2021 03:43 AM UTC

Hi Jordan,


Currently, we are checking your query. We will update further details by December 30,2021.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team December 31, 2021 03:46 AM UTC

Hi Jordan, 

Apologies for the delay! 

Can you please share some details about the reported issue” I am running into the issue described above with certain docx files”? Please share the input document and also saved document which you tried to reopen at your end. That will be helpful for us to proceed further and provide you solution at earliest. 

Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face. 

Please confirm back end platform details also. 

Regards, 
Suriya M. 



JC Jordan Conrad January 3, 2022 09:08 PM UTC

Well it wouldn't accept the file type so its hard for me to share. I have compressed them into this zip file. The one that has been edited contains "after-edit" in the name.

This is the frontend code for opening


public loadFile(file): void {
console.log(`DocEditor 1 this is the file: `, (file));
this.fileName = file.name;
let ajax: XMLHttpRequest = new XMLHttpRequest();
ajax.open('POST', 'http://localhost:6002/api/documenteditor/Import', true);
ajax.onreadystatechange = () => {
if (ajax.readyState === 4) {
if (ajax.status === 200 || ajax.status === 304) {
// open SFDT text in document editor
if(this.container.documentEditor !== undefined){
this.container.documentEditor.open(ajax.responseText);
}
}
}
}
let formData: FormData = new FormData();
formData.append('files', file);
ajax.send(formData);
}


Our backend platform is using Typescript and node. We are storing the files in an S3 bucket and retrieving it like so

fileRouter.get('/retrieve', async (request, response, next) => {
try {
const fileKey: any = request.query.fileKey;
/** Set bucket name and file key in parameters */
const params = {
Bucket: bucketName,
Key: fileKey
};
/** Retrieve file object from S3 bucket */
bucket.getObject(params, (error, data) => {
if (error) {
logger.error('Error returned from S3 getObject function', error)
response.status(400).json({
error: 'Error returned from S3 bucket'
});
} else {
/** Return file object */
response.status(200).json(data);
}
})
} catch (error) {
logger.error(`Error on /file/retrieve`, error);
next(error);
}
})


Attachment: Archive_73c92050.zip


SM Suriya Murugan Syncfusion Team January 5, 2022 03:38 AM UTC

Hi Jordan,


Thanks for sharing details. We will check and share further details by January 5,2022.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team January 6, 2022 03:48 AM UTC

Hi Jordan, 

On further checking, we are facing below issue on loading edit made docx file. 
 

Currently, we are validating and get back to you by January 7,2022. 

Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team January 7, 2022 01:12 PM UTC

Hi Jordan, 


We need additional timeline to validate this issue and we will update further details by January 11,2022.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team January 12, 2022 03:46 AM UTC

Hi Jordan,


We are facing issue with the chart parsing and forwarded the query to concern team. We will update the validation details by January 13, 2022.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team January 17, 2022 03:55 AM UTC

Hi Jordan,


Currently, we are working on it and will update the validation details by January 17, 2022.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team January 17, 2022 08:22 AM UTC

Hi Jordan,


We have confirmed the reported issue as a defect. We have logged a defect report for this issue. We will fix this issue and include it in our Nuget release which is scheduled for January 25,2022.


You can track the status of the bug through the below feedback link:

https://www.syncfusion.com/feedback/31903/exception-is-thrown-when-parsing-chart-series-fill-color-with-empty-value


Regards.

Suriya M.



JC Jordan Conrad January 18, 2022 08:52 PM UTC

I look forward to it and will let you know.



SM Suriya Murugan Syncfusion Team January 19, 2022 07:03 AM UTC

Hi Jordan, 
Thank you. 

  
As we mentioned earlier,  We will fix this issue and include it in our Nuget release which is scheduled for January 25,2022. 

 
You can track the status of the bug through the below feedback link: 

 
Regards. 
Suriya M. 



SR Stephen Raj Chandra Sekar Syncfusion Team January 25, 2022 11:50 AM UTC

Hi Jordan,


We are glad to announce that our weekly NuGet release (v19.4.0.47) is rolled out. Included fix for the reported scenario in this release.


Kindly upgrade below NuGet to latest version to resolve the reported issue.


https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/19.4.0.47


Feedback: https://www.syncfusion.com/feedback/31903/exception-is-thrown-when-parsing-chart-series-fill-color-with-empty-value


Regards,
Stephen Raj


Loader.
Up arrow icon