Arithmetic result exceeded 32 bits

Issue #13192656 • Assigned to Steven K.

Details

Author
Bommasani G.
Created
Aug 11, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

We are trying to upload 5GB file on microsoft edge version Microsoft Edge 38.14393.1066.0 using java script fromdata.

const formData = new FormData();
formData.append("file", file, file.name);

Please note that we are not using chunk file reading . Directly giving file to browser. Is this issue with javascript or windows operating system?

Same file size is working in Chrome and FireFox browser

Attachments

Comments and activity

  • Hi Bommasani,

    Is your installation of Windows 10 32 bit?  This is a client side issue, however, I am curious what backend server you will use to receive this large file?

    Steve

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • windows installation is 64 bit. Attached OS details to this thread. We are using TOMEE server and rest service is built with Apache CXF multipart. We didn’t set any file size limit on backend server. Client side issue means bug in my javascript code or edge WEB api issue?

    http://cxf.apache.org/docs/jax-rs-multiparts.html

  • It is hard to tell for sure because of the extra layers involved using a web framework such as Apache CXF.  A clue is that you mentioned that same servlet and code is working in chrome.

    Can you send a larger screenshot and more information on where in that angular.js file the error is thrown?  I.e. make the console window larger and perhaps send a couple screenshots.

    It would be nice to have a simplified repro.  If you have something send it, otherwise, I will create something.  I am guessing the web server doesn’t even need to be prepared to receive the file, just serve the form is all that appears to be needed.  As soon as the file is loaded on the client side it crashes right?

  • Attached console error on edge browser issue. As soon as file handover to browser, crashing with error, So back end not able to receive the file.

    We are using angular 4 version. The high level javascript that we are using as follows.

    actionDocumentUpload(meta) {
    const inputElement = document.createElement(“input”);
    inputElement.type = "file";
    inputElement.multiple = true;
    inputElement.onchange = () => {
    for (let i = 0; i < inputElement.files.length; i++) { // Edge has issue with for…of loop onchange event
    this.uploadDocumentNew(inputElement.files[i], meta, meta.params.id);
    }
    };
    inputElement.click();
    }

    uploadDocumentNew(file, meta, sourceEntityId) {
        const queryParameters = {
            lcc: meta.objectMap['lcc'],
            fmd: file.lastModifiedDate.toISOString()
        };
        
        const formData = new FormData();
        formData.append("file", file, file.name);
    
        const headers = new Headers();
        headers.set('Content-Type', 'multipart/form-data');
    
        this.http.post(restServiceURl, formData, {headers}).toPromise().then(response => {
            return response.data;
        });
    }
  • actionDocumentUpload(meta) {
    const inputElement = document.createElement(“input”);
    inputElement.type = "file";
    inputElement.multiple = true;
    inputElement.onchange = () => {
    for (let i = 0; i < inputElement.files.length; i++) { // Edge has issue with for…of loop onchange event
    this.uploadDocumentNew(inputElement.files[i], meta, meta.params.id);
    }
    };
    inputElement.click();
    }

    uploadDocumentNew(file, meta, sourceEntityId) {
        const url = .....
        const formData = new FormData();
        formData.append("file", file, file.name);
    
        const headers = new Headers();
        headers.set('Content-Type', 'multipart/form-data');
    
        this.http.post(url, formData, {headers}).toPromise().then(response => {
            return response.data;
        });
    }
  • unable to past javascript code correctly.

    const inputElement = document.createElement(“input”);
    inputElement.type = "file";
    inputElement.multiple = true;
    inputElement.onchange = () => {
    for (let i = 0; i < inputElement.files.length; i++) { // Edge has issue with for…of loop onchange event
    const formData = new FormData();
    formData.append("file", inputElement.files[0], inputElement.files[0].name);

        const headers = new Headers();
        headers.set('Content-Type', 'multipart/form-data');
    
        this.http.post(url, formData, {headers}).toPromise().then(response => {
            return response.data;
        });
            }
        };
        inputElement.click();
  • inputElement.onchange = () => {
    for (let i = 0; i < inputElement.files.length; i++) { // Edge has issue with for…of loop onchange event
    const formData = new FormData();
    formData.append("file", inputElement.files[i], inputElement.files[i].name);
    const headers = new Headers();
    headers.set('Content-Type’, ‘multipart/form-data’);
    this.http.post(url, formData, {headers}).toPromise().then(response => {
    return response.data;
    });
    }
    };

  • actionDocumentUpload(meta) {
            const inputElement = document.createElement("input");
            inputElement.type = "file";
            inputElement.multiple = true;
            inputElement.onchange = () => {
                for (let i = 0; i < inputElement.files.length; i++) { // Edge has issue with for..of loop onchange event
                    this.uploadDocumentNew(inputElement.files[i], meta, meta.params.id);
                }
            };
            inputElement.click();
        }
    
        uploadDocumentNew(file, meta, sourceEntityId) {
            const queryParameters = {
                lcc: meta.objectMap['lcc'],
                fmd: file.lastModifiedDate.toISOString()
            };
            const url = this.urlService.writeParametersToUrl(this.urlService.getDocumentUploadUrl() + sourceEntityId, queryParameters);
            const formData = new FormData();
            formData.append("file", file, file.name);
    
            const headers = new Headers();
            headers.set('Content-Type', 'multipart/form-data');
    
            this.http.post(url, formData, {headers}).toPromise().then(response => {
                return response.data;
            });
        }
  • actionDocumentUpload(meta) {
            const inputElement = document.createElement("input");
            inputElement.type = "file";
            inputElement.multiple = true;
            inputElement.onchange = () => {
                for (let i = 0; i < inputElement.files.length; i++) { 
                    this.uploadDocumentNew(inputElement.files[i], meta, meta.params.id);
                }
            };
            inputElement.click();
        }
    
        uploadDocumentNew(file, meta, sourceEntityId) {
            const queryParameters = {
                lcc: meta.objectMap['lcc'],
                fmd: file.lastModifiedDate.toISOString()
            };
            const url = this.urlService.writeParametersToUrl(this.urlService.getDocumentUploadUrl() + sourceEntityId, queryParameters);
            const formData = new FormData();
            formData.append("file", file, file.name);
    
            const headers = new Headers();
            headers.set('Content-Type', 'multipart/form-data');
    
            this.http.post(url, formData, {headers}).toPromise().then(response => {
                return response.data;
            });
        }
  • I am unable to send main javascript code. using inputElement creating and uploading document on onchange event.

    const formData = new FormData();
    formData.append("file", file, file.name);
    const headers = new Headers();
    headers.set('Content-Type', 'multipart/form-data');
    this.http.post(url, formData, {headers}).toPromise().then(response => {
                return response.data;
    });
  • Any update on this? Please let me know

  • No update on this.  Is there a reason you do not want to chunk the data?  This is somewhat of an anti-pattern, which lowers the priority for me a bit.

    Can you code a simplified repro and test it?  I wasn’t sure if the copy and pasted code above was tested yet?  If you can repro it, please zip the repro and attach it.  If you do that, I will look at it immediately.  :)

    Steve

  • We need to change back end(server) code to support chunk file reading. However, our concern is why it is failing edge when it is working on other browsers?

  • Makes sense.  I was curious and checking that you were aware of the standard method for large file transfers.

    Appreciate you submitting this.  I will create a repo and see what the issue could be.

You need to sign in to your Microsoft account to add a comment.

Sign in