Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[bug]: TypeError: a.map is not a function #6828

Closed
1 task done
Crowswave opened this issue Sep 9, 2024 · 2 comments · Fixed by #6985
Closed
1 task done

[bug]: TypeError: a.map is not a function #6828

Crowswave opened this issue Sep 9, 2024 · 2 comments · Fixed by #6985
Labels
bug Something isn't working

Comments

@Crowswave
Copy link

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

RTX 3070 (laptop)

GPU VRAM

8 GB GDDR6

Version number

v4.2.9

Browser

Opera GX

Python dependencies

No response

What happened

Program won't start, it says: "TypeError: a.map is not a function"

What you expected to happen

I expected the program to start after reinstalling

How to reproduce the problem

no idea

Additional context

No response

Discord username

No response

@Crowswave Crowswave added the bug Something isn't working label Sep 9, 2024
@psychedelicious
Copy link
Collaborator

  • Did clicking the reset button fix?
  • Can you reproduce the issue? If so, how?

@Crowswave
Copy link
Author

Crowswave commented Sep 14, 2024 via email

psychedelicious added a commit that referenced this issue Sep 30, 2024
This pops up every now and then and I could never figure it out. A user figured it out in #6936. The cause is appending a query string to the app URL.

For example:
```sh
http://127.0.0.1:9090/?__theme=dark
```

The query string breaking the static file serving, which prevents our translations from loading correctly. Instead of the JSON translations, FastAPI sends the index HTML page. The UI then errors when attempting to parse the translation JSON.

The query string `?__theme=dark` is used by Gradio to force dark mode. I believe the users with this issue are doing the same thing you did (just change the port number) or their browser history/bookmark includes the query string.

Though this is technically a user-caused problem (we cannot prevent the user from using a malformed URL), we can work around it. When query string is used on the root path, we can redirect the browser to the root path without the query string.

This is done via very simple middleware.

Closes #6696
Closes #6817
Closes #6828
Closes #6936
Closes #6983
psychedelicious added a commit that referenced this issue Sep 30, 2024
This pops up every now and then and I could never figure it out. A user figured it out in #6936. The cause is appending a query string to the app URL.

For example:
```sh
http://127.0.0.1:9090/?__theme=dark
```

The query string breaking the static file serving, which prevents our translations from loading correctly. Instead of the JSON translations, FastAPI sends the index HTML page. The UI then errors when attempting to parse the translation JSON.

The query string ?__theme=dark is used by Gradio to force dark mode. I believe the users with this issue are doing the same thing the user in #6936 did (just change the port number on an existing bookmark) or their browser history/bookmark includes the query string.

Though this is technically a user-caused problem (we cannot prevent the user from using a malformed URL), we can work around it. When query string is used on the root path, we can redirect the browser to the root path without the query string.

This is done via very simple middleware.

Closes #6696
Closes #6817
Closes #6828
Closes #6936
Closes #6983
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants