-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Seeing %MatchError{term: {:error, :obscured}} when calling execute_script with certain kinds of JavaScript #383
Comments
I think the issue is here: https://github.com/keathley/wallaby/blob/master/lib/wallaby/httpclient.ex#L70. This was called out in an earlier issue but now I'm not sure what that issue was or why this wasn't fixed before. We should remove that status check and find a better way to surface errors. Returning the actual error text from the http response would be a good start and help illuminate whats really going on. |
@mhanberg Do you have a minimal test case we can use to re-produce this locally? |
@keathley The test case can be found here: https://github.com/mhanberg/wallaby_bug_demo. |
@mhanberg Does this fail pretty reliably for you? I'm not seeing any errors. I just checked and it seems I'm running chromedriver 2.4 (same chrome version as you). Can you confirm that this error is present after updating to the latest chromedriver? |
@keathley I upgraded to chromedriver 2.41 and the error persists. Also, to clarify, the test case I provided may have been misleading, as it asserted that the MatchError would be raised, so a passing test indicates the problem is there. Sorry about that. I have updated the test to fail when a MatchError is thrown. |
Oh! Thats my fault. Should have looked closer at the test itself. Thats what I get for trying to rush around. Thanks for the clarity 👍. |
This will still throw, but will present the actual error message related to the exception.
It looks like the message that comes with this error is Interactive Elixir (1.6.4) - press Ctrl+C to exit (type h() ENTER for help)
pry(1)> response
%{
"sessionId" => "d701c566b82095684715f9eddc8adcbb",
"status" => 13,
"value" => %{
"message" => "unknown error: Runtime.evaluate threw exception: SyntaxError: await is only valid in async function\n (Session info: headless chrome=69.0.3497.100)\n (Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.14.0 x86_64)"
}
} Which makes sense to me after reading PR #374 @keathley I have gone ahead and made a PR #389 to keep the error message instead of |
Thanks @mhanberg I'll take a look 👍 |
Fixed in #389 |
Issue
When attempting to use
await
with theexecute_script
function, I have experienced a%MatchError{term: {:error, :obscured}}
.This line of code works in the dev console on Chrome.
I have been told that
%MatchError
but might the incorrect error for this case.I was able to work my way around this without needing to use
await
.The text was updated successfully, but these errors were encountered: