Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import if Jsreport Studio is running in Internet Explorer 11 #36

Closed
fmmich opened this issue Jun 29, 2017 · 7 comments
Closed

Comments

@fmmich
Copy link

fmmich commented Jun 29, 2017

If Jsreport Studio (v1.7) with the jsreport-import-export module installed is running in IE 11, an "Object doesn't support this action" exception occurs when clicking the Validate button from the Import dialog. As a result, IE users are unable to import entities.

This should be very easy to replicate. Unfortunately, it appears the error occurs deep within the ES6-compiled React code within Jsreport Studio. Maybe updating Jsreport Studio to use the latest version of React (0.15.6 as of this writing) will resolve the problem?

Our workaround is to either use Google Chrome (I have not tried Edge or other browsers) or to replace the "data" directory within Jsreport manually from another install of Jsreport that has the identical entities.

@pofider
Copy link
Contributor

pofider commented Jun 29, 2017

Thank you for submitting issue. I can confirm this feature doesn't work with IE. We may later try to fix it. However it doesn't have high priority for us because jsreport studio is a tool for developers and developers normally don't use IE because there are much better options.

@fmmich
Copy link
Author

fmmich commented Jun 29, 2017

As a developer, I concur. At some of our customers where we deploy Jsreport (thru our royalty-free license), their IT departments prohibit browsers other than IE. For those sites, we will replace the "data" directory manually as described above.

@pofider
Copy link
Contributor

pofider commented Jun 29, 2017

ah I see..... and you otherwise do it manually through studio anyway? customer by customer? Maybe you could use an API rather for it?

We will try to at least estimate what it would take it to have it working in IE for the start. I see we use there FileReader.readAsArrayBuffer which likely doesn't work there, maybe there will be a polyfill.
https://github.com/jsreport/jsreport-import-export/blob/master/studio/ImportModal.js#L33

@fmmich
Copy link
Author

fmmich commented Jun 29, 2017

Some background: Our customers are hospitals. Data security is a huge concern. Therefore, we design their reports internally using make-believe data. When their reports are ready for deployment, we securely VPN into a server on-premise at the hospital, import their reports with Jsreport Studio, and test the reports on-premise using their real patient data. If there is a problem with the report using their real data, we have Jsreport Studio already right in front of us, so we'll make the corrections there, validate they work, and export the entity changes back here. We import the changes into our internal Jsreport Studio and commit the entire data folder to our source control. That is why I bug you and your staff about how valuable jsreport-import-export is for our company. :)

In IE, the exception occurs after clicking Validate but prior to selecting the zip file to import. It is possible a polyfill may be required for readAsArrayBuffer, but the exception is much prior to that. The exception is occurring in the compiled code of React's ReactErrorUtils.js. Jsreport Studio is using React 0.14.8, but the next version after that release is 0.15.0, which doesn't have that class anymore. Hope this helps.

@pofider
Copy link
Contributor

pofider commented Jun 29, 2017

Thank you for explanation. I now see that if you anyway need to open their studio that it makes sense to import it manually right away.

I run it in debug mode now and see the real error is in

this.refs.file.dispatchEvent(new MouseEvent('click', {
        'view': window,
        'bubbles': false,
        'cancelable': true
      }));

Object doesn't support this action
Some solution like this could work... just checking it and let you know
https://stackoverflow.com/a/32889608/1660996

@fmmich
Copy link
Author

fmmich commented Jun 29, 2017

Ah, IE11 doesn't like "new MouseEvent"... there's a polyfill for MouseEvent if you use it in multiple places: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent#Polyfill

@pofider
Copy link
Contributor

pofider commented Jun 29, 2017

Thanks for that.

The importing is now fixed in jsreport-import-export@0.4.2 which will be part of the upcoming jsreport@1.8.0.

There are still plenty of issues with IE, but I hope this helps you to overcome the biggest problem you had.

@pofider pofider closed this as completed Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants