plnkr / feedback

Feedback on Plunker
19 stars 11 forks source link

How to disable console? #524

Open guest271314 opened 4 years ago

guest271314 commented 4 years ago

Describe the bug console frame can affect output of page.

To Reproduce Steps to reproduce the behavior:

Run https://plnkr.co/edit/NVTsnAjSTf0h1qYy?preview

See https://bugs.chromium.org/p/chromium/issues/detail?id=1063681#c9

I don't think plnkr is able to handle the "console.log(result)" line. The native console works just fine with it, but my tab gets unresponsive when plnkr tries to display the hundreds of arrays of bytes in its console, even for 12 seconds of 240p video. If I comment out that line, or if I run the HTML directly in its own tab, the page stays responsive.

Errors / logs in developer tools

Expected behavior A means to fully disable console.

Screenshots

Desktop (please complete the following information): *nix, Chromium 82

Additional context Here, use DevTools. Have no need for built-in console, particularly if that feature can affect output of the code running at plnkr.

ggoodman commented 4 years ago

@guest271314 thanks. Let me take a look at that.

ggoodman commented 4 years ago

Hi @guest271314 I'm not able to run Chromium on my mac and was unable to reproduce with Chrome Canary (release as of today).

Copying the sample plunk gives me an error:

Uncaught TypeError: video.requestAnimationFrame is not a function
    at HTMLVideoElement.video.onplay

I'm guessing that this is some bleeding edge API to which I don't yet have access. Perhaps avoiding serializing anything that is an ArrayBuffer would do the trick?

guest271314 commented 4 years ago

Try launching Chromium with --enable-experimental-web-platform-features flag at command line, or navigate to chrome://flags, search for and enable the flag, relaunch.

An referring to Screenshot_2020-03-27_01-43-42

ggoodman commented 4 years ago

@guest271314 I've temporarily disabled the console. Can you verify that this has fixed the issues you're seeing?

guest271314 commented 4 years ago

@ggoodman Yes.

MediaStream {id: "9a330453-055f-4118-a8ee-431d22e001d5", active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
(index):43 BlobEvent {isTrusted: true, data: Blob, timecode: 1585749744741.855, type: "dataavailable", target: MediaRecorder, …}
(index):47 Blob {size: 13801, type: "video/webm;codecs=vp8"}
(index):51 blob:https://run.plnkr.co/28b57b1d-d6d0-4ce4-9e39-0760575c02d0
(index):37 Event {isTrusted: true, type: "stop", target: MediaRecorder, currentTarget: MediaRecorder, eventPhase: 2, …}
johnaweiss commented 4 years ago

hi, is the console still disabled? i can't find a console. I'm new to plunker. Is there a trick to open it? thx

ggoodman commented 4 years ago

@johnaweiss yes, the console remains disabled until I can deploy it in a way that has no risk of breaking user code.

johnaweiss commented 4 years ago

Ok, thx. 

I'd like to suggest that, if you can implement code-stepthrough, you'll be the one of, if not the only, web-based IDE to achieve that. 

Thx! On 4/28/2020 8:05:11 AM, Geoff Goodman notifications@github.com wrote: @johnaweiss [https://github.com/johnaweiss] yes, the console remains disabled until I can deploy it in a way that has no risk of breaking user code. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/plnkr/feedback/issues/524#issuecomment-620664326], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AMV6UUMK532AT243WWAUJIDRO3WCPANCNFSM4LT7PF5Q].

ggoodman commented 4 years ago

Hi @johnaweiss, I suspect the reason that no other browser-based IDEs have implemented this is due to the browser security model. I don't believe that access to the debug protocol is available via web APIs.

johnaweiss commented 4 years ago

i bet you can figure out a way, even if it's an emulation.  maybe, execute the code on your server, and then send the results back to the browser? just a thought.

On 4/28/2020 2:16:03 PM, Geoff Goodman notifications@github.com wrote: Hi @johnaweiss [https://github.com/johnaweiss], I suspect the reason that no other browser-based IDEs have implemented this is due to the browser security model. I don't believe that access to the debug protocol is available via web APIs. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/plnkr/feedback/issues/524#issuecomment-620859266], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AMV6UUMFWXDECSOASD57RKDRO5BRHANCNFSM4LT7PF5Q].