Closed mvdan closed 5 years ago
Sorry; missed this a week ago. Writing a fix now.
Fixed.
@kenshaw
got rid of Page.frameRequestedNavigation and all of its types. In UnmarshalMessage, that event method now doesn't fall under any of the cases, Page. FrameRequestedNavigation also need for processing,Like this:
switch msg.Method { case "Page.frameClearedScheduledNavigation", "Page.frameRequestedNavigation", "Page.frameScheduledNavigation": // These events are now deprecated, and UnmarshalMessage panics // when they are received from Chrome. For now, to avoid panics // and compile errors, and to fix chromedp v0 when installed via // 'go get -u', skip the events here. return nil }
@haohanger please file a new issue, following the issue template.
For example, 8d5e1d04ce19b7b3e61493418de25a281de3709d got rid of
Page.frameScheduledNavigation
and all of its types. InUnmarshalMessage
, that event method now doesn't fall under any of the cases, and ends up callingjson.Unmarshal(buf, v)
wherev == nil
.The fix here is probably to modify
cdproto-gen
so thatUnmarshalMessage
handles this case gracefully:I've worked around this in chromedp v0 by capturing these events before the function is called, which is not ideal: https://github.com/chromedp/chromedp/commit/e9aa66f87e8cea7c220822b62e1ca3b90356b9cc
/cc @kenshaw