ep_comments_page icon indicating copy to clipboard operation
ep_comments_page copied to clipboard

Error: io is not defined

Open vladimirdulov opened this issue 1 year ago • 5 comments

Hello,

I'm experiencing some issues with etherpad-lite when ep_comments_page plugin installed. This error popup appears on every page reload.

Screenshot 2024-09-06 at 17 53 59

Browser console: Screenshot 2024-09-06 at 17 54 14

The log contains the following errors:

Sep 06 17:53:20 [2024-09-06T13:53:20.488] [WARN] client - ReferenceError: Can't find variable: io -- { <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - errorId: 'VV7ZoeBKYbvqpPIGY8pR', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - type: 'Unhandled Promise rejection', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - msg: "ReferenceError: Can't find variable: io", <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - url: 'https://etherpad-lite.my-domain.net/p/ma0Pulbn9cytNXd-nUSQ', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - source: 'unknown', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - linenumber: -1, <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - stack: 'EpComments@https://etherpad-lite.my-domain.net/watch/pad:66685:25\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:67529:42\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - 'postAceInit@https://etherpad-lite.my-domain.net/watch/pad:67527:37\n' +
Sep 06 17:53:20 [2024-09-06T13:53:20.488] [WARN] client - ReferenceError: Can't find variable: io -- { <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - errorId: 'VV7ZoeBKYbvqpPIGY8pR', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - type: 'Unhandled Promise rejection', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - msg: "ReferenceError: Can't find variable: io", <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - url: 'https://etherpad-lite.my-domain.net/p/ma0Pulbn9cytNXd-nUSQ', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - source: 'unknown', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - linenumber: -1, <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15', <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - stack: 'EpComments@https://etherpad-lite.my-domain.net/watch/pad:66685:25\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:67529:42\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - 'postAceInit@https://etherpad-lite.my-domain.net/watch/pad:67527:37\n' +
Sep 06 17:53:20 '@https://etherpad-lite.my-domain.net/watch/pad:9080:31\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - 'Promise@[native code]\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:9052:33\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - 'callHookFnAsync@https://etherpad-lite.my-domain.net/watch/pad:9050:42\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:9108:73\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:9108:89\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - 'map@[native code]\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:9108:20\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - '@https://etherpad-lite.my-domain.net/watch/pad:9103:39\n' + <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - 'postAceInit@https://etherpad-lite.my-domain.net/watch/pad:26047:27' <30>1 2024-09-06T13:53:20Z localhost 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 1380065 84b5bd4a-1ff2-4bd7-aa17-a15a7ee01207 - }

etherpad-lite v2.2.3

Installed plugins:

                wrappy 
                hexoid 
                once 
                underscore 
                lodash 
                asap 
                wrappy 
                dezalgo 
                fast-deep-equal 
                require-from-string 
                punycode 
                uri-js 
                lru-cache 
                ep_align 
                ep_embedded_hyperlinks2 
                ep_font_color 
                ep_headings2 
                ep_markdown 
                ep_openid_connect 
                ep_user_displayname 
                ep_stable_authorid 
                ep_guest 
                ep_comments_page 
                ep_webrtc

vladimirdulov avatar Sep 06 '24 14:09 vladimirdulov

I'm experiencing the same problem with etherpad-lite version 2.2.4.

brknkfr avatar Sep 07 '24 16:09 brknkfr

I'm experiencing the same problem with etherpad-lite version 2.2.4.

I released a new version of ep_comments_page. Could you please try again?

SamTV12345 avatar Sep 09 '24 12:09 SamTV12345

ep_comments_page version 1.0.37 seems to work now.

brknkfr avatar Sep 09 '24 20:09 brknkfr

@SamTV12345 I can also confirm this fixed the issue. Just for reference as other plugins might need the same fix, the commit was https://github.com/ether/ep_comments_page/commit/a8b5a779c3b822af83972a65437730abf3ce5279 ?

nebulade avatar Sep 10 '24 06:09 nebulade

@SamTV12345 I can also confirm this fixed the issue. Just for reference as other plugins might need the same fix, the commit was https://github.com/ether/ep_comments_page/commit/a8b5a779c3b822af83972a65437730abf3ce5279 ?

Yes. The io variable was globally scoped but caused issues when I combined everything into a JavaScript file. So if you find another plugin that needs this patch please open up a pr and @ me

SamTV12345 avatar Sep 10 '24 07:09 SamTV12345