pawelmalak / snippet-box

Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages.
MIT License
977 stars 80 forks source link

Unable to copy code-snippet on Raspberry Pi #6

Closed Akashic101 closed 3 years ago

Akashic101 commented 3 years ago

When trying to copy a snippet using the copy code-button I recieve an error in the console:

react-dom.production.min.js:101 Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
    at handler (SnippetDetails.tsx:33)
    at Object.He (react-dom.production.min.js:52)
    at Ke (react-dom.production.min.js:52)
    at react-dom.production.min.js:53
    at _r (react-dom.production.min.js:100)
    at Tr (react-dom.production.min.js:101)
    at react-dom.production.min.js:113
    at De (react-dom.production.min.js:292)
    at react-dom.production.min.js:50
    at zr (react-dom.production.min.js:105)

I'm using the Docker-image running on a Pi 4b with Rasbian Buster

pawelmalak commented 3 years ago

It's not the problem with the platform but with browser security. It works in the development environment and when you put it behind reverse proxy and access it with https. It's not working however when it's deployed and accessed with http.

I will take a closer look on how to implement universal solution.