Adobe-CEP / Samples

Code samples for CEP extensions
MIT License
973 stars 551 forks source link

Enabling Node.js in PProPanel sample crashes the debugger #74

Closed fcarrilLB closed 5 years ago

fcarrilLB commented 6 years ago

Problem: The extension refreshes by itself after resume the script execution

To reproduce the bug, first you need to enable Node.js in PProPanel:

manifest.xml

<?xml version="1.0" encoding="UTF-8"?>
<ExtensionManifest Version="6.0" ExtensionBundleId="com.adobe.PProPanel" ExtensionBundleVersion="11.1"
ExtensionBundleName="Premiere Pro sample panel"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ExtensionList>
        <Extension Id="com.adobe.PProPanel" Version="10.3.0" />
    </ExtensionList>
    <ExecutionEnvironment>
        <HostList>
            <Host Name="PPRO" Version="9.0" />
        </HostList>
        <LocaleList>
            <Locale Code="All" />
        </LocaleList>
        <RequiredRuntimeList>
            <RequiredRuntime Name="CSXS" Version="6.0" />
        </RequiredRuntimeList>
    </ExecutionEnvironment>

    <DispatchInfoList>
        <Extension Id="com.adobe.PProPanel">
            <DispatchInfo >
                <Resources>
                    <MainPath>./index.html</MainPath>
                    <ScriptPath>./PProPanel.jsx</ScriptPath>
                    <CEFCommandLine>
                        <Parameter>--allow-file-access</Parameter>
                        <Parameter>--allow-file-access-from-files</Parameter>
                        <Parameter>--enable-nodejs</Parameter>
                    </CEFCommandLine>
                </Resources>
                <Lifecycle>
                    <AutoVisible>true</AutoVisible>
                </Lifecycle>
                <UI>
                    <Type>Panel</Type>
                    <Menu>PProPanel (SDK sample panel)</Menu>
                    <Geometry>
                        <Size>
                            <Height>300</Height>
                            <Width>180</Width>
                        </Size>
                    </Geometry>
                </UI>
            </DispatchInfo>
        </Extension>
    </DispatchInfoList>
</ExtensionManifest>

Steps to reproduce the bug:

Enviroment to reproduce the bug:

Notes:

Breakpoint ppropanel-debugger-windows

After resume the execution, the extension reloads automatically ppropanel-debugger-windows-2

bbb999 commented 6 years ago

Just turning on Node.js is unlikely to succeed; your result is, unfortunately, unsurprising.

Can you get CEP HTML Test Panel 1 to successfully detect whether Node.js is enabled?

fcarrilLB commented 6 years ago

@bbb999 with the current manifest.xml Node.js is not enabled, if in the console I try to get any Node.js module, window.require and window.cep_node are undefined (in http://localhost:7777)

In the other hand if I change the manifest.xml as I described in my previous comment, I can get any Node.js module without problem because window.require and window.cep_node exist but, enabling this produces the described bug

venetak commented 6 years ago

Hello, I have the same issue, can you please share if you've managed to fix it?

fcarrilLB commented 6 years ago

@venetak I haven't found a solution for Windows yet, if you have a Mac, use it for the debugging.

venetak commented 6 years ago

@fcarrilLB Thank you.

nbabanov commented 6 years ago

@bbb999 Do we have any progress on this? Where is the best place to raise the issue, so that Adobe considers it?

bbb999 commented 6 years ago

There has been no progress on adding Node.js usage to PProPanel. Demonstrating Node.js isn't PProPanel's mission, so that's unlikely to change.

I'm told Node.js works, within CEP HTML Test Panel. Has anyone tried that?

nbabanov commented 6 years ago

@bbb999 NodeJS works on any project. The problem with it is, that it breaks the CEP Chrome remote debugging. It is not related exclusively to any sample. The problem is in CEP.

bbb999 commented 6 years ago

The problem is in CEP.

You may be right. This problem report is specific to PProPanel.

No PPro panel developer has reported problems debugging Node.js.

If the problem is reproducible in CEP HTML Test Panel, we can have the CEP team investigate further.