Reported on headless-dev@:
"Target.createTarget works on the browser endpoint.
However, when I use the returned targetId to connect to the page (i.e. /devtools/page/$targetId)."
"I have encountered same issue, workarounded by calling target list before opening socket to newly created target."
Target.getTargets does not work for headless. I have to http get /json/list before connect to the page.
This might help: in DevToolsHttpHandler::OnWebSocketRequest, it tries to find the target id in agent_host_map_, which is only updated in handling /json/list or /json/new.
#3: That's probably more of a question to the original reporter. Maybe we should update our instructions around this? Also, our C++ bindings currently don't work very nicely with this kind of forwarding.
Comment 1 by yijin...@gmail.com
, Mar 24 2017