Copy&paste asynchronous API error

I’m having CODE running with Nextcloud all in Docker with traefik as reverse proxy with valid letsencrypt TLS certificates (setup like this docker-compose-setup-with-notify-push-2024 - I’m the author of this guide).

I’m able to create and edit office documents. I see strange message when I try to copy data from an office document

image
sorry German - English translation would be like “your browser doesn’t support asynchronous clipboard API, switching to HTTPS should resolve this

It sounds related to

Simplifying Copy and Paste

Thanks to a new API, the copy and paste process has been much simplified. Permission may now be given for Collabora Online to directly access the clipboard in your browser, removing the previous requirement to download content. Click here for an up-to-date list of browsers with this API enabled (note some browsers may have API enabled, but not on by default).

from: Harder, Better, Faster, Stronger! Collabora Online 24.04 is here with enhanced performance, interoperability, and useability

but I don’t have any clue what is wrong. I use latest FF which should be compatible according to "navigator.clipboard" | Can I use... Support tables for HTML5, CSS3, etc all systems are using valid TLS certs… maybe CODE is not aware it it uses HTTPS as it runs behind reverse proxy with TLS offloading ( ssl.enable=false and ssl.termination=true) with plain http:// ?

  collabora:
    image: collabora/code:24.04.9.1.1
    container_name: collabora
    restart: unless-stopped
    expose:
      - "9980"
    environment:
      # https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html
      - aliasgroup1=${NEXTCLOUD1}
      - aliasgroup2=${NEXTCLOUD2}
      - aliasgroup3=${NEXTCLOUD3}
      - dictionaries=de_DE en_US es_ES ru
      - VIRTUAL_PROTO=http
      - VIRTUAL_PORT=9980
      - VIRTUAL_HOST=${COLLABORA_FQDN}
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:user_interface.mode=compact --o:remote_font_config.url=${NEXTCLOUD2}/apps/richdocuments/settings/fonts.json --o:logging.level=warning
    mem_limit: 8192mb
    cpus: 2.0
    cap_add:
      - MKNOD
    tty: true
    networks:
      - proxy
    labels:
      - traefik.enable=true
      - traefik.http.routers.collabora.rule=Host(`${COLLABORA_FQDN}`)
      - traefik.http.routers.collabora.tls=true
      - traefik.http.routers.collabora.tls.certresolver=letsencryptresolver
      - traefik.http.routers.collabora.middlewares=secHeaders5@file
      - traefik.http.services.collabora.loadbalancer.server.port=9980
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro

any help welcome!

Hello @wwe

We are working on this issue and will notify you as soon as it gets fixed—thanks for the report! If you have any specific points you’d like to add regarding this behavior, please feel free to add them to our GitHub ticket, where we have ongoing discussions on the topic:

GitHub Issue 9281

Thank you,
Darshan

1 Like

@darshan thank you for an update. In fact copy&paste works for plain text in general, it’s only the message…

but following the Github discussion I found another related topic: Copy&Paste issue with CODE (maybe related to http headers) - ℹ️ Support - Nextcloud community and the issue of copy&paste rich elements (I test with a picture) still exists - paste in Writer inserts one of the 2 text snippets below (first only once, most of the time the second):

application/x-openoffice-svxb;windows_formatname=“SVXB (StarView Bitmap/Animation)” c5e9 NAT5

Um außerhalb von Nextcloud Office einzufügen, klicken Sie bitte zunächst auf die Schaltfläche „Herunterladen“
(press the button download to paste outside of Nextcloud Office)

is this part of the “work in progress” on clipboard API or completely different issue? Interesting that copy&paste and image from Windows clipboard into CODE document works!