After time out i am not able to close the browser ,No matter what i do even if call browser.Quit().The browser just hangs around forever .I am working with IE browser 9 and the latest web driver 2.37.0
This happens when we have time out , an example error as follows
OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:58542/session/0f8faf36-f84f-4035-9cc0-169656bc00c6/element/c841d512-c9ff-4d2a-9a45-87f52359d986/click timed out after 60 seconds.
----> System.Net.WebException : The operation has timed out
I would like to know if any work around for this issue is available ,closing the browser manually is not optimal option like what i am doing now .Thank you in advance and if you need any more info please let me know
Related
I'm using selenium on node js and my program builds a selenium driver that connects to an existing chrome window using debugger address. my problem is that when it detects no open chrome window, it doesn't throw an exception or anything and infinitely waits until it detects something. I want it to return after 5 seconds if nothing is detected.
here's the function:
let driver = await new Builder().forBrowser("chrome").setChromeOptions(options).build();
can i wrap a timeout function around it? does selenium provide a wait function for the driver itself? any ideas would be appreciated
I wrote an azure function with python that do some data processing, when I test on large dataset (150 lines), chrome raise a 502 http error : (tested the azure function on 10 lines and everything was ok)
I think the problem is that chrome browser wait for so long and when no response coming from azure function it automatically raises 502 error. I checked that the logic function is executed till the end but I don't get my json response when code is completed. Here is my http response I should get
return func.HttpResponse(json.dumps({"file" : file.name.split('/')[2]}),
mimetype="application/json",)
expected output :
{"file": "filename.json"}
In production I have to process more then 1500 lines, and within 150 lines the azure function take about 2 minutes to complete.
How to force chrome client or any client who hit the url of my azure function to wait to complete? is there any workaround pls?
For this problem, we are not client so we can't determine timeout value of client.
For your problem of force chrome client to wait the function complete, I'm afraid we can't do this setting. You can refer to this post (also shown as below screenshot).
According to the screenshot above, we can see chrome can't change the timeout setting and we can change it in other browsers.
If the client do not use browser but use code(such as .net) to request the function, the code should be like:
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromMinutes(10);
I have written a client which tries to connect to Azure service bus. As soon as the server starts up i get the below errors and i receive no messages present at the queue. I tried replacing the sb protocol with amqpwss, but it dint help.
2020-05-25 21:23:11 [ReactorThreadeebf108d-444b-4acd-935f-c2c2c135451d] INFO c.m.a.s.p.RequestResponseLink - Internal send link 'RequestResponseLink-Sender_0480eb_c31e1cc239bf471e811e53a30adc6488_G51' of requestresponselink to '$cbs' encountered error.
com.microsoft.azure.servicebus.primitives.ServiceBusException: com.microsoft.azure.servicebus.amqp.AmqpException: The connection was inactive for more than the allowed 60000 milliseconds and is closed by container 'LinkTracker'. TrackingId:c31e1cc239bf471e811e53a30adc6488_G51, SystemTracker:gateway7, Timestamp:2020-05-25T21:23:10
at com.microsoft.azure.servicebus.primitives.ExceptionUtil.toException(ExceptionUtil.java:55)
at com.microsoft.azure.servicebus.primitives.RequestResponseLink$InternalSender.onClose(RequestResponseLink.java:759)
at com.microsoft.azure.servicebus.amqp.BaseLinkHandler.processOnClose(BaseLinkHandler.java:66)
at com.microsoft.azure.servicebus.amqp.BaseLinkHandler.onLinkRemoteClose(BaseLinkHandler.java:42)
at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:176)
at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291)
at com.microsoft.azure.servicebus.primitives.MessagingFactory$RunReactor.run(MessagingFactory.java:491)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.microsoft.azure.servicebus.amqp.AmqpException: The connection was inactive for more than the allowed 60000 milliseconds and is closed by container 'LinkTracker'. TrackingId:c31e1cc239bf471e811e53a30adc6488_G51, SystemTracker:gateway7, Timestamp:2020-05-25T21:23:10
... 10 common frames omitted
There is a similar issue opened in GitHub
what you posted here is the trace, not the error. Yes, the service
closes idle connections are 10 minutes. The client traces it and
reopens the connection. It is seamless, doesn't throw any exceptions
to the application. That can't be your problem. If your sends are
failing means there may be another problem, but not this one.
As i see the second line it is about the timeout of 6 secs, can you check the troubleshoot page if it helps. Also this.
we recommend adding "sync-publish=true" to the connection url
I'm using selenium chromedriver in nodejs to write some end-to-end tests.
When loading "myurl", the command await driver.get("myurl") always timeouts.
In network I see that there is a websocket (appcues) which continues (status "pending").
I assume that selenium thinks there is still things to load, but the page is already loaded, it takes 2 seconds to load the whole page, except that the websocket is still running.
Is there a way to use driver.get() and specify to ignore explicit requests to be finished ? (since the websocket will never stop).
You can use the pageLoadStrategy capability Documentation WeDriver-W3C
"none" - none causes command to return immediately
"eager" - eager causes command to return after the DOMContentLoaded event fires.
"normal" - The normal state causes command to return after the load event fires on the new page
let driver = await new webdriver.Builder()
.withCapabilities({ 'pageLoadStrategy': 'none' })
.forBrowser('chrome')
.build()
Note : eager is supported in Chromedriver 77
I am getting this error in background page when responding to request
from content script.
Does anyone know what can be causing this error?
Full stack trace:
Uncaught Error: Attempting to use a disconnected port object chrome/RendererExtensionBindings:147
chrome.Port.postMessage chrome/RendererExtensionBindings:147
chromeHidden.Port.dispatchOnConnect.connectEvent chrome/RendererExtensionBindings:89
myExtension.foo.sendResponse.state background.js:1573
db.readTransaction.tx.executeSql.paramStr background.js:1038
This only happens after a couple of hours of browsing reloading extension is not helping - not that it would be a solution after restarting chrome browser all gets back to normal for couple of hours content script can keep sending request to background but NO response
from background can be sent back Is there any way I could catch this Uncaught error and reset the listener?
I am using chrome.extension.onRequest.addListener for my communication. Before I respond I query DB and I do not send any other response before query is finished.
Thanks,
Marek
This is caused when a connection get closed. For example if you open a tab that has the content_script injected, it opens a connection, the tab is closed, and then the background_page tries to pass a message. It will fail because the tab is no longer active to receive the message.
In your case I would guess that as tabs close and new tabs open you are attempting to post messages with the old tabId instead of creating a new connection to the new tab. I would recommend reading through the long-lived connections section again.
In my case, however, I needed to provide the sendResponse function to the chrome.runtime.sendMessage(msg, responseCallbackMissingHere), which will give you the "Attempting to use a disconnected port object" error.