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

Source maps not found #753

Closed
aaad opened this issue Apr 13, 2023 · 2 comments
Closed

Source maps not found #753

aaad opened this issue Apr 13, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@aaad
Copy link

aaad commented Apr 13, 2023

Description

Hi!

I get the following error when only importing ui and calling run():

FileNotFoundError: [Errno 2] No such file or directory: '/home/aaad/server/.env/lib/python3.9/site-packages/nicegui/static/socket.io.min.js.map'
http://localhost/_nicegui/1.2.6/dependencies/74/mermaid.min.js.map not found

The file /home/aaad/server/.env/lib/python3.9/site-packages/nicegui/static/socket.io.min.js.map does not exist.

My version is 1.2.6 (python3 -c 'import nicegui; print(nicegui.__version__)').
My python version is 3.9.2.

import os.path
import platform
from pathlib import Path
from nicegui import ui

print(platform.system())
directory = Path(ui.__file__).parent / 'static'
print(f'{directory = }')
print(f'{os.path.abspath(directory)  = }')
print(f'{os.path.realpath(directory) = }')

returns

Linux
directory = PosixPath('/home/aaad/server/.env/lib/python3.9/site-packages/nicegui/static')
os.path.abspath(directory)  = '/home/aaad/server/.env/lib/python3.9/site-packages/nicegui/static'
os.path.realpath(directory) = '/home/aaad/server/.env/lib/python3.9/site-packages/nicegui/static'

The frozen requirements of my venv:

anyio==3.6.2
Authlib==1.2.0
bidict==0.22.1
black==23.3.0
bottle==0.12.25
cachetools==4.2.4
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
contourpy==1.0.7
cryptography==40.0.1
cycler==0.11.0
fastapi==0.92.0
fastapi-socketio==0.0.10
fonttools==4.39.3
google-api-core==1.34.0
google-auth==1.30.2
google-auth-httplib2==0.1.0
google-cloud==0.34.0
google-cloud-core==1.7.3
google-cloud-dataproc==0.6.1
google-cloud-firestore==2.1.1
google-cloud-storage==1.38.0
google-crc32c==1.5.0
google-resumable-media==1.3.3
googleapis-common-protos==1.59.0
grpcio==1.43.0
grpcio-reflection==1.43.0
grpcio-status==1.43.0
grpcio-tools==1.43.0
h11==0.14.0
httpcore==0.17.0
httplib2==0.22.0
httptools==0.5.0
httpx==0.24.0
idna==3.4
importlib-metadata==6.3.0
importlib-resources==5.12.0
itsdangerous==2.1.2
Jinja2==3.1.2
kiwisolver==1.4.4
markdown2==2.4.8
MarkupSafe==2.1.2
matplotlib==3.7.1
mypy-extensions==1.0.0
nicegui==1.2.6
numpy==1.24.2
orjson==3.8.10
packaging==23.1
pathspec==0.11.1
Pillow==9.5.0
platformdirs==3.2.0
plotly==5.14.1
proto-plus==1.22.2
protobuf==3.20.3
proxy-tools==0.1.0
pscript==0.7.7
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pydantic==1.10.7
Pygments==2.15.0
pyparsing==3.0.9
python-dateutil==2.8.2
python-dotenv==1.0.0
python-engineio==4.4.0
python-multipart==0.0.6
python-socketio==5.8.0
pytz==2023.3
pywebview==4.0.2
PyYAML==6.0
requests==2.28.2
rsa==4.9
six==1.16.0
sniffio==1.3.0
starlette==0.25.0
starlette-authlib==0.1.23
tenacity==8.2.2
tomli==2.0.1
typing-extensions==4.5.0
urllib3==1.26.15
uvicorn==0.20.0
uvloop==0.17.0
vbuild==0.8.1
watchfiles==0.18.1
websockets==11.0.1
zipp==3.15.0

Best,
aaad

@falkoschindler
Copy link
Contributor

Thanks, @aaad, for this thorough report!
This is known, non-critical behavior. The .js.map files are used for debugging and only requested when the JavaScript console is opened. See #716 for a similar issue.
Although we're currently waiting for #658 to improve the overall dependency management, I'll leave this issue open for later.

@falkoschindler falkoschindler added the waiting Can not be fixed right now label Apr 14, 2023
@falkoschindler falkoschindler added this to the Later milestone Apr 14, 2023
@falkoschindler falkoschindler linked a pull request Apr 14, 2023 that will close this issue
@falkoschindler falkoschindler changed the title Static files missing on linux with version 1.2.6 Source maps not found Apr 14, 2023
@falkoschindler falkoschindler removed the waiting Can not be fixed right now label Jun 26, 2023
@falkoschindler falkoschindler modified the milestones: Later, 1.3.0 Jul 12, 2023
@falkoschindler falkoschindler self-assigned this Jul 12, 2023
@falkoschindler falkoschindler added the enhancement New feature or request label Jul 12, 2023
@falkoschindler
Copy link
Contributor

With #658 and #1134 now being implemented, it was pretty easy to add source maps for socket.io and highcharts. I'll close this issue as completed. It will be released with version 1.3.0. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants