-
Notifications
You must be signed in to change notification settings - Fork 15
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
studio-extensions.client.js served with incorrect mime type #44
Comments
I'm seeing the same issue. Will try to downgrade to 2.4.0. |
My apologies. This problem was introduced in the 2.5.0. |
OK. Thanks for the effort. I updated to latest jsreport (npm install --save jsreport@latest), and although the 2.5.1 version (of jsreport-studio) did come down with it, it's still throwing the same error. I realize I didn't mention before that the stand-alone server was working fine and this error only showed up when I attempted to integrate into an existing Express app. Then again, I see you commented on my forum thread, so you probably already know that. I think I'll pull down 2.4 and run a compare. |
Hmm. I see the line you added. Seems like it should work, but for some reason, when I inspect the file's header using the Network tab of the developer tools in chrome, it's still coming across as text/html. I have performed a hard refresh, so it shouldn't be using cached files. I'll look to see if I can tell why. |
How about instead of res.send, you use res.jsonp? I think you're sending jsonp, aren't you? http://expressjs.com/en/api.html#res.jsonp |
My bad. I'm a moron. jsreport@latest doesn't include the latest jsreport-studio. Updating separately (jsreport-studio@latest) doesn't seem to pull that change either, which is why nothing is different. How do I pull master of jsreport-studio instead of 2.5.1? I'll go google that. |
Install as github depencency
|
Crud. That worked in terms of getting the file updated in my project's node_modules folder, and when I open the studio.js file I see the change, but running the app I still get the same error. I manually changed the send to res.jsonp(clientStudioExtensionsJsContent) and now that error goes away! So success there! However, the other two errors remain (which weren't mentioned above). They say: "Error: Loading chunk 1 failed" and "Uncaught (in promise) Error: Loading chunk 1 failed" |
Here's the first one: Error: Loading chunk 1 failed. |
I can't tell why it says that file is missing. It shows as loaded now, on the Network tab of dev tools. And clicking on the link for it shows its contents! Perhaps there is an order of operations issue where the chunks are trying to be loaded before the file has been downloaded? I compared 2.4.0 to the latest and I'm unfamiliar with what you're trying to do with webpack, so I'm not much help. |
Should I open a new issue for the above error instead of continuing this one? |
Hmm. Not sure if this pertains: webpack/webpack#7502 |
I rolled back to jsreport 2.4.0 and all is well. I'll wait for a fix before trying to upgrade. Thanks for looking into this. It's appreciated. |
related to https://forum.jsreport.net/topic/1090/integration-into-existing-express-application-error/3 i will try to find the time to check the express integration in your case. thanks |
still having this problem on 3.1, can someone enlight-me? |
hi @c-andrey, it is likely an issue with the way you have integrated jsreport with your express app, there is no way we can know what can be wrong if you don't share how your app is setup. i suggest you create a new issue, and provide more details, example code, or even a small repository that show how the integration is not working. try to follow the basic integration here, and from there start to add things until you can reproduce your problem. |
actually, its exactly what you said, the app integrated that was causing the conflict in the routes for the express |
Just updated to the latest docker images. Can no longer load the studio.
The error is:
Refused to execute script from '/studio/assets/studio-extensions.client.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
The request comes back with key response headers of:
We've removed the
x-content-type-options: nosniff
header from our reverse proxy and this fixes the issue for now but express should really be serving the file with the correct mime type. Jsreport 2.4.0 did not seem to have this issue.The text was updated successfully, but these errors were encountered: