[GH-ISSUE #1136] [BUG]: Copy and copy code buttons don't work when locally deployed via docker #702

Closed
opened 2026-02-22 18:20:54 -05:00 by yindo · 7 comments
Owner

Originally created by @ovizii on GitHub (Apr 19, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1136

How are you running AnythingLLM?

Docker (local)

What happened?

I asked a question which involved code (I was just testing if the code formatting works hence the simple question) and noticed that neither the copy button nor the copy code button work.

I checked that it's not a browser problem by testing different browsers.

None of these two buttons work:

image

The one on the left actually changes and says copy when pressed but still does not actually copy anything:

image

Are there known steps to reproduce?

Right now, I used this image in my compose file:
image: mintplexlabs/anythingllm:latest

This is my compose file:

services:

# https://github.com/Mintplex-Labs/anything-llm/tree/master
# https://docs.useanything.com/

  anything-llm:
    image: mintplexlabs/anythingllm:latest
    container_name: anything-llm
    hostname: anything-llm
    cap_add:
      - SYS_ADMIN
    environment:
      - STORAGE_DIR=$STORAGE_DIR
    volumes:
      - "./.env:/app/server/.env"
      - "./storage:/app/server/storage"
    user: "1000:1000"
    ports:
      - "3101:3001"
    env_file:
      - .env
    cpus: 2
    mem_limit: 4G
Originally created by @ovizii on GitHub (Apr 19, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1136 ### How are you running AnythingLLM? Docker (local) ### What happened? I asked a question which involved code (I was just testing if the code formatting works hence the simple question) and noticed that neither the copy button nor the copy code button work. I checked that it's not a browser problem by testing different browsers. None of these two buttons work: ![image](https://github.com/Mintplex-Labs/anything-llm/assets/837902/6e2f9a23-310a-474e-903b-de3b39b4f57c) The one on the left actually changes and says copy when pressed but still does not actually copy anything: ![image](https://github.com/Mintplex-Labs/anything-llm/assets/837902/3e4b7a22-e625-4c38-8602-9c16dedc631d) ### Are there known steps to reproduce? Right now, I used this image in my compose file: `image: mintplexlabs/anythingllm:latest` This is my compose file: ``` services: # https://github.com/Mintplex-Labs/anything-llm/tree/master # https://docs.useanything.com/ anything-llm: image: mintplexlabs/anythingllm:latest container_name: anything-llm hostname: anything-llm cap_add: - SYS_ADMIN environment: - STORAGE_DIR=$STORAGE_DIR volumes: - "./.env:/app/server/.env" - "./storage:/app/server/storage" user: "1000:1000" ports: - "3101:3001" env_file: - .env cpus: 2 mem_limit: 4G ```
yindo added the needs info / can't replicate label 2026-02-22 18:20:54 -05:00
yindo closed this issue 2026-02-22 18:20:54 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 19, 2024):

Just test and cannot replicate. Both options copy to clipboard with their appropriate content. While this may not seem like a browser issue, it seems to be - likely writing to clipboard permissions.

Can you view the browsers settings and see if the permission for the URL you are on is allowed?
Screenshot 2024-04-19 at 10 02 23 AM

@timothycarambat commented on GitHub (Apr 19, 2024): Just test and cannot replicate. Both options copy to clipboard with their appropriate content. While this may not seem like a browser issue, it seems to be - likely writing to clipboard permissions. Can you view the browsers settings and see if the permission for the URL you are on is allowed? <img width="703" alt="Screenshot 2024-04-19 at 10 02 23 AM" src="https://github.com/Mintplex-Labs/anything-llm/assets/16845892/3ab95cce-77fd-4e9d-97df-52eb880cd892">
Author
Owner

@ovizii commented on GitHub (Apr 19, 2024):

Thanks for testing and for the hint. Strangely enough, in Chrome which is my default browser I seem to not be able to “unblock” the clipboard. I also did not get the usual pop-up asking me to allow or block this.

image

The second (virgin) browser I tested in was Firefox and in the permissions there isn't even an option for allowing access to the clipboard.

image

I'll leave this issue open if you'd like to add anything otherwise feel free to close it.

@ovizii commented on GitHub (Apr 19, 2024): Thanks for testing and for the hint. Strangely enough, in Chrome which is my default browser I seem to not be able to “unblock” the clipboard. I also did not get the usual pop-up asking me to allow or block this. ![image](https://github.com/Mintplex-Labs/anything-llm/assets/837902/a2d40d7c-7299-4403-b4bb-5608d7ba742a) The second (virgin) browser I tested in was Firefox and in the permissions there isn't even an option for allowing access to the clipboard. ![image](https://github.com/Mintplex-Labs/anything-llm/assets/837902/bfdee474-9af2-4fd7-abf5-785449c70f96) I'll leave this issue open if you'd like to add anything otherwise feel free to close it.
Author
Owner

@timothycarambat commented on GitHub (Apr 19, 2024):

For chrome, youll get that permission blocked if you are on an http: site that isn't http://localhost (or local IPs i think) so something like http://some.public.ip/ would block that permission. It needs to be https:. Im sure you can disabled it in chrome feature flags but I'm not sure how.

@timothycarambat commented on GitHub (Apr 19, 2024): For chrome, youll get that permission blocked if you are on an `http:` site that isn't `http://localhost` (or local IPs _i think_) so something like `http://some.public.ip/` would block that permission. It needs to be `https:`. Im sure you can disabled it in chrome feature flags but I'm not sure how.
Author
Owner

@timothycarambat commented on GitHub (Apr 19, 2024):

For Firefox: https://support.mozilla.org/bm/questions/1068472

@timothycarambat commented on GitHub (Apr 19, 2024): For Firefox: https://support.mozilla.org/bm/questions/1068472
Author
Owner

@ovizii commented on GitHub (Apr 19, 2024):

For Firefox: https://support.mozilla.org/bm/questions/1068472

I also googled that but that issue is 8 years old, I certainly hope FF has improved since ;-)

@ovizii commented on GitHub (Apr 19, 2024): > For Firefox: https://support.mozilla.org/bm/questions/1068472 I also googled that but that issue is 8 years old, I certainly hope FF has improved since ;-)
Author
Owner

@ovizii commented on GitHub (Apr 19, 2024):

For chrome, youll get that permission blocked if you are on an http: site that isn't http://localhost (or local IPs i think) so something like http://some.public.ip/ would block that permission. It needs to be https:. Im sure you can disabled it in chrome feature flags but I'm not sure how.

No problem, now that I know it's a “me” problem I can surely fix it. It is a local IP, but I forgot I was accessing it through a tailscale subnet router so the issue you described might really be the problem.

@ovizii commented on GitHub (Apr 19, 2024): > For chrome, youll get that permission blocked if you are on an `http:` site that isn't `http://localhost` (or local IPs _i think_) so something like `http://some.public.ip/` would block that permission. It needs to be `https:`. Im sure you can disabled it in chrome feature flags but I'm not sure how. No problem, now that I know it's a “me” problem I can surely fix it. It is a local IP, but I forgot I was accessing it through a tailscale subnet router so the issue you described might really be the problem.
Author
Owner

@atljoseph commented on GitHub (May 17, 2024):

The result of this should be in the docs. I opened an issue with same bug, and tried enabling on chrome. It was already enabled. Whitelisted the up for insecure content and that still didn’t do the trick. The code is ok since it can just be highlighted and copied, but it’s impossible to highlight the embedding code (copy broke there too). :/

Seeing some files added recently for sql agents. Nice.

@atljoseph commented on GitHub (May 17, 2024): The result of this should be in the docs. I opened an issue with same bug, and tried enabling on chrome. It was already enabled. Whitelisted the up for insecure content and that still didn’t do the trick. The code is ok since it can just be highlighted and copied, but it’s impossible to highlight the embedding code (copy broke there too). :/ Seeing some files added recently for sql agents. Nice.
yindo changed title from [BUG]: Copy and copy code buttons don't work when locally deployed via docker to [GH-ISSUE #1136] [BUG]: Copy and copy code buttons don't work when locally deployed via docker 2026-06-05 14:36:44 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#702