Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not compute box model. #94

Closed
suntong opened this issue Jul 23, 2017 · 4 comments
Closed

Error: Could not compute box model. #94

suntong opened this issue Jul 23, 2017 · 4 comments

Comments

@suntong
Copy link

suntong commented Jul 23, 2017

What is causing the Could not compute box model error?

I'm trying out a very simple noip.go, and it always ends up with a endless loop of the Could not compute box model error:

...,attributes":["class","login-link","href","https://www.noip.com/sign-up","onclick","ga('send', 'event', 'sign-in-modal', 'click', 'create-account');"]}]}}
2017/07/23 15:12:19 -> {"id":17,"result":{"nodeIds":[104,118]}}
2017/07/23 15:12:19 <- {"id":18,"method":"DOM.getBoxModel","params":{"nodeId":118}}
2017/07/23 15:12:19 <- {"id":19,"method":"DOM.getBoxModel","params":{"nodeId":104}}
2017/07/23 15:12:19 -> {"error":{"code":-32000,"message":"Could not compute box model."},"id":18}
2017/07/23 15:12:19 -> {"id":19,"result":{"model":{"content":[517,233,638,233,638,251,517,251],"padding":[507,223,648,223,648,262,507,262],"border":[506,222,649,222,649,263,506,263],"margin":[506,222,649,222,649,278,506,278],"width":143,"height":41}}}
2017/07/23 15:12:19 <- {"id":20,"method":"Runtime.evaluate","params":{"expression":"(function(a) {\n\t\treturn a[0].offsetParent !== null;\n\t})($x('/html[1]/body[1]/section[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/form[1]/input[2]'))","objectGroup":"console","includeCommandLineAPI":true,"returnByValue":true}}
2017/07/23 15:12:19 -> {"id":20,"result":{"result":{"type":"boolean","value":true}}}
2017/07/23 15:12:19 <- {"id":21,"method":"DOM.performSearch","params":{"query":"input[name=\"password\"]"}}
2017/07/23 15:12:19 -> {"id":21,"result":{"searchId":"24802.18","resultCount":2}}
2017/07/23 15:12:19 <- {"id":22,"method":"DOM.getSearchResults","params":{"searchId":"24802.18","fromIndex":0,"toIndex":2}}
2017/07/23 15:12:19 -> {"id":22,"result":{"nodeIds":[104,118]}}
2017/07/23 15:12:19 <- {"id":23,"method":"DOM.getBoxModel","params":{"nodeId":118}}
2017/07/23 15:12:19 <- {"id":24,"method":"DOM.getBoxModel","params":{"nodeId":104}}
2017/07/23 15:12:19 -> {"error":{"code":-32000,"message":"Could not compute box model."},"id":23}
2017/07/23 15:12:19 -> {"id":24,"result":{"model":{"content":[517,233,638,233,638,251,517,251],"padding":[507,223,648,223,648,262,507,262],"border":[506,222,649,222,649,263,506,263],"margin":[506,222,649,222,649,278,506,278],"width":143,"height":41}}}
2017/07/23 15:12:19 <- {"id":25,"method":"Runtime.evaluate","params":{"expression":"(function(a) {\n\t\treturn a[0].offsetParent !== null;\n\t})($x('/html[1]/body[1]/section[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/form[1]/input[2]'))","objectGroup":"console","includeCommandLineAPI":true,"returnByValue":true}}
2017/07/23 15:12:19 -> {"id":25,"result":{"result":{"type":"boolean","value":true}}}
2017/07/23 15:12:19 <- {"id":26,"method":"DOM.performSearch","params":{"query":"input[name=\"password\"]"}}
2017/07/23 15:12:19 -> {"id":26,"result":{"searchId":"24802.19","resultCount":2}}
2017/07/23 15:12:19 <- {"id":27,"method":"DOM.getSearchResults","params":{"searchId":"24802.19","fromIndex":0,"toIndex":2}}
2017/07/23 15:12:19 -> {"id":27,"result":{"nodeIds":[104,118]}}
2017/07/23 15:12:19 <- {"id":28,"method":"DOM.getBoxModel","params":{"nodeId":118}}
2017/07/23 15:12:19 <- {"id":29,"method":"DOM.getBoxModel","params":{"nodeId":104}}
2017/07/23 15:12:19 -> {"error":{"code":-32000,"message":"Could not compute box model."},"id":28}
2017/07/23 15:12:19 -> {"id":29,"result":{"model":{"content":[517,233,638,233,638,251,517,251],"padding":[507,223,648,223,648,262,507,262],"border":[506,222,649,222,649,263,506,263],"margin":[506,222,649,222,649,278,506,278],"width":143,"height":41}}}
2017/07/23 15:12:19 <- {"id":30,"method":"Runtime.evaluate","params":{"expression":"(function(a) {\n\t\treturn a[0].offsetParent !== null;\n\t})($x('/html[1]/body[1]/section[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/form[1]/input[2]'))","objectGroup":"console","includeCommandLineAPI":true,"returnByValue":true}}
2017/07/23 15:12:19 -> {"id":30,"result":{"result":{"type":"boolean","value":true}}}
^Csignal: interrupt

How to fix it and get my code working? Thx.

@kenshaw kenshaw closed this as completed Dec 18, 2017
@aalexand
Copy link

I am seeing the same issue and wondering what may be causing it.

@vani-or
Copy link

vani-or commented May 3, 2018

Maybe you're using nodeId of another element which is hidden but which enters into the same selector search... It happened to me

@leafney
Copy link

leafney commented Apr 1, 2021

I am a chromedp beginner and encountered the same problem. When I used:

chromedp.WaitVisible(`div#shareMask`),

Until I found out that this html element is hidden:

<div class="mask fixed" id="shareMask"></div>


.mask {
    display: none;
    ...
}

So, just change to a visible element.

@suntong
Copy link
Author

suntong commented Apr 2, 2021

@leafney, @Innuendo1975 👍 Thanks for the input 👍

But honestly speaking, I don't care any more because I've lost faith of this package the instance my simple question from a simple program was closed without a single explanation. How would I possibly build my empire based on a tool whose author has such an I-don't-give-a-damn attitude.

Just FTA, I'm looking at https://github.com/mxschmitt/playwright-go right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants