[GH-ISSUE #1] Copy Not Working When Trying to Register New Server #2

Closed
opened 2026-03-03 19:10:46 +03:00 by kerem · 2 comments
Owner

Originally created by @dnburgess on GitHub (Dec 12, 2023).
Original GitHub issue: https://github.com/productiveops/dokemon/issues/1

Updated to the current version as of this morning.

Tried to register a new server for remote management.

When I click the "Copy" button to get the code to run on the new server, nothing happens.

I opened my browser console in Chrome Version 120.0.6099.71 to see what's going on in the background and am getting the following:

Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
    at a (index-FZazDRvX.js:142:24931)
    at onClick (index-FZazDRvX.js:148:894)
    at Object.x2 (index-FZazDRvX.js:37:9864)
    at E2 (index-FZazDRvX.js:37:10018)
    at k2 (index-FZazDRvX.js:37:10075)
    at rg (index-FZazDRvX.js:37:31462)
    at R1 (index-FZazDRvX.js:37:31879)
    at index-FZazDRvX.js:37:36792
    at mm (index-FZazDRvX.js:40:36957)
    at Y_ (index-FZazDRvX.js:37:8999)
a @ index-FZazDRvX.js:142
onClick @ index-FZazDRvX.js:148
x2 @ index-FZazDRvX.js:37
E2 @ index-FZazDRvX.js:37
k2 @ index-FZazDRvX.js:37
rg @ index-FZazDRvX.js:37
R1 @ index-FZazDRvX.js:37
(anonymous) @ index-FZazDRvX.js:37
mm @ index-FZazDRvX.js:40
Y_ @ index-FZazDRvX.js:37
Yd @ index-FZazDRvX.js:37
zp @ index-FZazDRvX.js:37
H2 @ index-FZazDRvX.js:37

Looking through the container logs, I just see this:

2023-12-12T18:00:07Z Setting log level 
2023-12-12T18:00:07Z INF Starting Dokemon 
⇨ http server started on [::]:9090

I also tried this in Firefox Version 119.0.1 and am getting the same result with this in the console:

Uncaught TypeError: navigator.clipboard is undefined
    a http://192.168.0.27:9090/assets/index-FZazDRvX.js:142
    onClick http://192.168.0.27:9090/assets/index-FZazDRvX.js:148
    x2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    E2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    k2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    rg http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    R1 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    Yd http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    mm http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    Y_ http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    Yd http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    zp http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    H2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    T1 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    Xd http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    Na http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    Na http://192.168.0.27:9090/assets/index-FZazDRvX.js:37
    GC http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    ky http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    Ey http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    rE http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    hu http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    Lg http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    Zs http://192.168.0.27:9090/assets/index-FZazDRvX.js:38
    sE http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    Js http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    by http://192.168.0.27:9090/assets/index-FZazDRvX.js:40
    x http://192.168.0.27:9090/assets/index-FZazDRvX.js:25
    $ http://192.168.0.27:9090/assets/index-FZazDRvX.js:25
    EventHandlerNonNull* http://192.168.0.27:9090/assets/index-FZazDRvX.js:25
    <anonymous> http://192.168.0.27:9090/assets/index-FZazDRvX.js:25
Originally created by @dnburgess on GitHub (Dec 12, 2023). Original GitHub issue: https://github.com/productiveops/dokemon/issues/1 Updated to the current version as of this morning. Tried to register a new server for remote management. When I click the "Copy" button to get the code to run on the new server, nothing happens. I opened my browser console in Chrome Version 120.0.6099.71 to see what's going on in the background and am getting the following: ``` Uncaught TypeError: Cannot read properties of undefined (reading 'writeText') at a (index-FZazDRvX.js:142:24931) at onClick (index-FZazDRvX.js:148:894) at Object.x2 (index-FZazDRvX.js:37:9864) at E2 (index-FZazDRvX.js:37:10018) at k2 (index-FZazDRvX.js:37:10075) at rg (index-FZazDRvX.js:37:31462) at R1 (index-FZazDRvX.js:37:31879) at index-FZazDRvX.js:37:36792 at mm (index-FZazDRvX.js:40:36957) at Y_ (index-FZazDRvX.js:37:8999) a @ index-FZazDRvX.js:142 onClick @ index-FZazDRvX.js:148 x2 @ index-FZazDRvX.js:37 E2 @ index-FZazDRvX.js:37 k2 @ index-FZazDRvX.js:37 rg @ index-FZazDRvX.js:37 R1 @ index-FZazDRvX.js:37 (anonymous) @ index-FZazDRvX.js:37 mm @ index-FZazDRvX.js:40 Y_ @ index-FZazDRvX.js:37 Yd @ index-FZazDRvX.js:37 zp @ index-FZazDRvX.js:37 H2 @ index-FZazDRvX.js:37 ``` Looking through the container logs, I just see this: ``` 2023-12-12T18:00:07Z Setting log level 2023-12-12T18:00:07Z INF Starting Dokemon ⇨ http server started on [::]:9090 ``` I also tried this in Firefox Version 119.0.1 and am getting the same result with this in the console: ``` Uncaught TypeError: navigator.clipboard is undefined a http://192.168.0.27:9090/assets/index-FZazDRvX.js:142 onClick http://192.168.0.27:9090/assets/index-FZazDRvX.js:148 x2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 E2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 k2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 rg http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 R1 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 Yd http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 mm http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 Y_ http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 Yd http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 zp http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 H2 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 T1 http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 Xd http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 Na http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 Na http://192.168.0.27:9090/assets/index-FZazDRvX.js:37 GC http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 ky http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 Ey http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 rE http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 hu http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 Lg http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 Zs http://192.168.0.27:9090/assets/index-FZazDRvX.js:38 sE http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 Js http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 by http://192.168.0.27:9090/assets/index-FZazDRvX.js:40 x http://192.168.0.27:9090/assets/index-FZazDRvX.js:25 $ http://192.168.0.27:9090/assets/index-FZazDRvX.js:25 EventHandlerNonNull* http://192.168.0.27:9090/assets/index-FZazDRvX.js:25 <anonymous> http://192.168.0.27:9090/assets/index-FZazDRvX.js:25 ```
kerem closed this issue 2026-03-03 19:10:46 +03:00
Author
Owner

@salilponde commented on GitHub (Dec 12, 2023):

Looks like its this: https://stackoverflow.com/a/51823007/22850013

I use localhost when testing locally and on my VMs I have DNS/https setup. So that might be the reason I did not encounter this issue while testing. Let me check with IP address and http and come up with a solution.

<!-- gh-comment-id:1852578801 --> @salilponde commented on GitHub (Dec 12, 2023): Looks like its this: https://stackoverflow.com/a/51823007/22850013 I use localhost when testing locally and on my VMs I have DNS/https setup. So that might be the reason I did not encounter this issue while testing. Let me check with IP address and http and come up with a solution.
Author
Owner

@salilponde commented on GitHub (Dec 12, 2023):

Fixed in 1.1.1

Fix:
I see the browsers do not allow copying when running over HTTP (navigation.clipboard object is not available)

So I have done the following fix:

  1. If navigation.clipboard object is not available, display the token value in the script. User has to select the script and copy it manually. There will be no Copy button.
  2. If the object is available, the token will show as HIDDEN in the script and the Copy button will be displayed to copy the script.

In future versions I will add a feature to run Dokemon with self-signed certificates for those who do not have an SSL enabled reverse proxy in front of it.

<!-- gh-comment-id:1852637202 --> @salilponde commented on GitHub (Dec 12, 2023): Fixed in 1.1.1 Fix: I see the browsers do not allow copying when running over HTTP (navigation.clipboard object is not available) So I have done the following fix: 1. If navigation.clipboard object is not available, display the token value in the script. User has to select the script and copy it manually. There will be no Copy button. 2. If the object is available, the token will show as HIDDEN in the script and the Copy button will be displayed to copy the script. In future versions I will add a feature to run Dokemon with self-signed certificates for those who do not have an SSL enabled reverse proxy in front of it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dokemon#2
No description provided.