mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[GH-ISSUE #182] Failed to load module script #135
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @captainsikay on GitHub (Sep 26, 2019).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/182
While trying to start the UI with the serve command I get the following error in the files
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.The login works fine, after that I get a blank page with only the logout button.
I use Windows 10 with latest chrome (also tried latest firefox) and latest version (as of 26th September) of shiori-windows-amd64.exe from the releases page.
@RadhiFadlillah commented on GitHub (Oct 4, 2019):
@captainsikay sorry for late reply.
Unfortunately I can't seem to reproduce it. I've tested it in Firefox 69 in Manjaro and Windows, also in Chrome 77 and Firefox 69 in Windows.
One of possible reason for this issue is the browser did MIME sniffing on its own, which in some case will mark the JS file as plain text. To fix this, I've added
X-Content-Type-Options: nosniffheader which will prevent the browser setting content type on its own.If you don'y mind, could you check it out ? Thanks !
@cocoastorm commented on GitHub (Oct 10, 2019):
Hey, I'm getting hit by this too. I believe what's happening on Windows is that the mimeType being returned is
plain/text, which prevents scripts from being executed because of the wrong mimeType.A quick Google search shows another Github repo getting hit by this (back in 2018): https://github.com/labstack/echo/issues/1038#issuecomment-369946800
Especially in their comment it seems that Windows returns
plain/textin their testing.I believe this is where the mimeType is being set
Very odd lol. I'll try to test with a newer version of Golang.
@lalitkale commented on GitHub (Dec 23, 2019):
I am facing this issue again. I downloaded the binary "shiori-windows-amd64.exe" for v1.5.0 on Windows 10 and just fired "shiori serve" and getting blank page with
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML specerror in browser console for 'base.js', 'home.js', 'settings.js' and 'dialog.js'.go version go1.13.5 windows/amd64
@sjbr commented on GitHub (Aug 13, 2020):
I have this problem in chrome and firefox on windows
@phanirithvij commented on GitHub (Sep 26, 2021):
Still have this problem, when installed from master. Via
go getandgo install