Skip to main content
mellis-merlinone
Known Participant
January 5, 2022

P: CEP regressions in Photoshop 2022 (v23.x) - Windows

  • January 5, 2022
  • 6 replies
  • 953 views
Hello.
 
I have been testing my CEP extension with the latest version of Photoshop (and other CC apps), and I am encountering regressions in the CEP system.  For clarity, I am reporting only one issue per post.
 
ISSUE:
XMLHTTPRequest fails with CEP console reporting: "DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://[server].com/mx/versioning/rcsinfo': Document is already detached."
 
Platform: WINDOWS 
 
Severity: As you would expect, this is a critical issue.  It renders my CEP extension completely unable to perform its duties, as it is not able to communicate with our server.
 
This issue is present in Photoshop v23.1 (Windows only - the macOS version works), but it is not a problem in Photoshop v22.5.4.
 
Illustrator v25.4.1 (Windows) also presents this issue.
 
 
 
This topic has been closed for replies.

6 replies

mellis-merlinone
Known Participant
January 9, 2023

Great find - I will give that a try!

Participating Frequently
January 5, 2023

Hi 

I have encoutered this issue too, and after some digging I found a solution to it. 

The problem shows when you have an iframe in your panel, and send a xhr request after removing the iframe, the error shows up "Document is already detached." 

the key is adding  --mixed-context parameter to your manifest, as below

     <Resources>
                    <MainPath>./index.html</MainPath>
                    <ScriptPath>./jsx/init.jsx</ScriptPath>
                    <CEFCommandLine>
                        <Parameter>--enable-nodejs</Parameter>
                        <Parameter>--mixed-context</Parameter>
                    </CEFCommandLine>
                </Resources>

 

then you will find everything goes well.

 

mellis-merlinone
Known Participant
January 12, 2022

Hello, Sujai.

I have sent a DM with a hyperlink to our code and instructions for reproducing the issue.  Thanks for having a look!

Adobe Employee
January 12, 2022

@mellis-merlinone Do you have a sample? can you DM me the sample code if available?

mellis-merlinone
Known Participant
January 10, 2022

Thanks, Jeffery.

 

I've been studying the failure some more, and I believe it might be tied to the way <iframe> elements are handled in the newest CEP implementations.  We use an <iframe> to present our UI, and it communicates the user's intended action to our extension's bundled code via browser messages.  When that happens, the bundled code will often rely on XMLHTTPRequest to acquire data from the server, and that's when the "Document is already detached" error rears its head.

Legend
January 10, 2022

Thanks. I've asked engineering to take a look.