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

aggrid example from the documentation does not work #1510

Closed
jsmaupin opened this issue Aug 29, 2023 · 8 comments · Fixed by #1594
Closed

aggrid example from the documentation does not work #1510

jsmaupin opened this issue Aug 29, 2023 · 8 comments · Fixed by #1594
Labels
bug Something isn't working
Milestone

Comments

@jsmaupin
Copy link

jsmaupin commented Aug 29, 2023

Description

I have copied and pasted the example for aggrid element into a new project. When I run the project, I only see a blank page. Commenting out the ui.aggrid(...) call causes the buttons from the example to show after a refresh.

I do not see any log messages on the server side, even when I set the logging level to DEBUG. However, in the browser, I do see this message

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec. :8080/_nicegui/1.3.12/static/utils/dynamic_properties.js:1

The issue only exists in version 1.3.12 and does not happen in 1.3.11

@rodja
Copy link
Member

rodja commented Aug 29, 2023

That's very odd. The example is running fine on my Mac M1. Are you running windows and have tested with different browsers?

@falkoschindler
Copy link
Contributor

@aersam Can you, please, have a look into this issue? It seems to be caused by the change in PR #1470 where we introduced dynamic_properties.js. Somehow the file isn't served correctly. Do you have an idea what is going on?

@falkoschindler falkoschindler added the bug Something isn't working label Aug 29, 2023
@aersam
Copy link
Contributor

aersam commented Aug 29, 2023

I cannot repo it with Windows and Firefox nor with Windows and Edge
repo.zip

Do you have some more FastAPI Config? Do you use the existing FastAPI version?

@jsmaupin
Copy link
Author

I am running this on Windows using Chrome.

@jsmaupin
Copy link
Author

Do you have some more FastAPI Config? Do you use the existing FastAPI version?

Does this help?

>pip freeze
aiofiles==23.2.1
aiohttp==3.8.5
aiosignal==1.3.1
annotated-types==0.5.0
anyio==3.7.1
async-timeout==4.0.3
attrs==23.1.0
bidict==0.22.1
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.7
colorama==0.4.6
cryptography==41.0.3
fastapi==0.103.0
fastapi-socketio==0.0.10
frozenlist==1.4.0
h11==0.14.0
httpcore==0.17.3
httptools==0.6.0
httpx==0.24.1
idna==3.4
itsdangerous==2.1.2
Jinja2==3.1.2
markdown2==2.4.10
MarkupSafe==2.1.3
multidict==6.0.4
nicegui==1.3.11
orjson==3.9.5
pscript==0.7.7
pycparser==2.21
pydantic==2.3.0
pydantic_core==2.6.3
Pygments==2.16.1
PyJWT==2.8.0
python-dotenv==1.0.0
python-engineio==4.6.1
python-multipart==0.0.6
python-socketio==5.8.0
PyYAML==6.0.1
requests==2.31.0
sniffio==1.3.0
starlette==0.27.0
typing_extensions==4.7.1
urllib3==2.0.4
uvicorn==0.22.0
vbuild==0.8.2
watchfiles==0.20.0
websockets==11.0.3
yarl==1.9.2

@aersam
Copy link
Contributor

aersam commented Aug 29, 2023

That's pretty much what I have. Do you have any python code other than the sample code?

@aersam
Copy link
Contributor

aersam commented Aug 29, 2023

Or a screenshot of the failing network requests in the dev tools?

@jsmaupin
Copy link
Author

There is no other code. Here is a screenshot.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants