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

Loading module from “http://localhost/src/index.jsx” was blocked because of a disallowed MIME type (“”). #519

Open
TigerP opened this issue Apr 27, 2024 · 7 comments

Comments

@TigerP
Copy link

TigerP commented Apr 27, 2024

I tried to use synapse-admin 0.10.1, but it just displays a loading circle. sysapse-admin 0.9.1 did work in the same setup.
My firefox console mentions:
Loading module from “http://localhost/src/index.jsx” was blocked because of a disallowed MIME type (“”).

Am I doing something wrong or is this a (firefox specific) bug?

@awesome-manuel
Copy link
Member

Not sure what you mean by "use". How did you start/deploy synapse-admin?

@TigerP
Copy link
Author

TigerP commented May 8, 2024

I have created a apache vhost:

<VirtualHost 127.0.0.1:80>
        ServerName localhost
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/synapse-admin-test

        Options Indexes
        <Directory /var/www/html/synapse-admin-test>
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/localhost-error.log
        CustomLog ${APACHE_LOG_DIR}/localhost-access.log combined
</VirtualHost>

This is the only active vhost on the system at the moment.
Then I reloaded the apache config to get it active.

I created the /var/www/html/synapse-admin-test and extracted the following releases there.

  • synapse-admin-0.10.1
  • synapse-admin-0.9.1
  • synapse-admin-0.9.2
  • synapse-admin-0.9.4

Then I go to http://localhost and choose one of the directories which will load synapse-admin if it is a 0.9.x release, but only shows the loading circle when I choose the 0.10.1 release, see also the firefox console message in the first comment.

Does this help or do you need more information?

@Echse27
Copy link

Echse27 commented May 17, 2024

@TigerP
index.html means:
<script type="module" crossorigin src="/assets/index-DV4PIamU.js"></script>

in my case it was the wrong path cause i have the synapse-admin inside a folder called admin inside my root directory....

so i changed the path to:
<script type="module" crossorigin src="/admin/assets/index-DV4PIamU.js"></script>

@TigerP
Copy link
Author

TigerP commented May 17, 2024

@Echse27
Which version do you see that line? Because I don't see that line in any of the 0.9.x or the 0.10.1 releases.
And I think that just removing the / instead of adding /admin might be a better solution.

@Echse27
Copy link

Echse27 commented May 17, 2024

I see that line since version 0.10.0
full path only in my case: /var/www/html/admin/index.html

And yes, removing the / only also working in my case.

@TigerP
Copy link
Author

TigerP commented May 18, 2024

@Echse27
The only "script type" text I see in the index.html is Line 122 in release 0.10.0. Which does not contain the src="/assets/index-DV4PIamU.js" code you mentioned.

And changing the

<script type="module" src="/src/index.jsx"></script>

to

<script type="module" src="./src/index.jsx"></script>

Does not fix the issue I mentioned in this first post.

@Echse27
Copy link

Echse27 commented May 21, 2024

@TigerP
I'm using the latest release 0.10.1 an i have used Method 1 as "installation" Method.
In my case it's under /var/www/html/admin/index.html... following rows 115 & 116 of this file:

</style>
<script type="module" crossorigin src="assets/index-DV4PIamU.js"></script>

Hope it helps.

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

3 participants