Java util concurrent timeoutexception как исправить
Перейти к содержимому

Java util concurrent timeoutexception как исправить

  • автор:

Русские Блоги

Как бороться с: Java. Util. Одновременно. TimeoutException: android.os.BinderProxy.finalize () истекло время ожидания после ошибки 10 секунд?

We’re seeing a number of TimeoutExceptions in GcWatcher.finalize, BinderProxy.finalize , and PlainSocketImpl.finalize . 90+% of them happen on Android 4.3. We’re getting reports of this from Crittercism from users out in the field.

Мы видели некоторые исключения тайм-аута в GcWatcher. Наконец, BinderProxy. Закончено, PlainSocketImpl.finalize. Более 90% произошло на Android 4.3. Мы получили сообщения о критике от пользователей в этой области.

enter image description here

The error is a variation of: " com.android.internal.BinderInternal$GcWatcher.finalize() timed out after 10 seconds "

Ошибка: com. Android.intern. Binderinternal. Binderinternal $ GcWatcher.finalize () истекает через 10 секунд.

So far we haven’t had any luck reproducing the problem in house or figuring out what might have caused it.

До сих пор мы не воспроизвели проблему в домашних условиях и не выяснили, что вызвало проблему.

Any ideas what can cause this? Any idea how to debug this and find out which part of the app causes this? Anything that sheds light on the issue helps.

Любые идеи? Знаете ли вы, как отладить и выяснить, какая часть приложения вызвала проблему? Все, что может прояснить проблему, полезно.

9 решений

Full disclosure — I’m the author of the previously mentioned talk in TLV DroidCon.

Я являюсь автором разговора, упомянутого ранее в TLV DroidCon.

I had a chance to examine this issue across many Android applications, and discuss it with other developers who encountered it — and we all got to the same point: this issue cannot be avoided, only minimized.

У меня была возможность проверить эту проблему во многих приложениях для Android и обсудить ее с другими разработчиками, которые сталкивались с этой проблемой — мы все пришли к одному и тому же выводу: этой проблемы нельзя избежать, ее можно только минимизировать.

I took a closer look at the default implementation of the Android Garbage collector code, to understand better why this exception is Thrown and on what could be the possible causes. I even found a possible root cause during experimentation.

Я более внимательно посмотрел на стандартную реализацию кода сборщика мусора для Android, чтобы лучше понять, почему возникло это исключение, и возможные причины. Я даже нашел возможную основную причину в эксперименте.

The root of the problem is at the point a device "Goes to Sleep" for a while — this means that the OS has decided to lower the battery consumption by stopping most User Land processes for a while, and turning Screen off, reducing CPU cycles, etc. The way this is done — is on a Linux system level where the processes are Paused mid run. This can happen at any time during normal Application execution, but it will stop at at a Native system call, as the context switching is done on the kernel level. So — this is where the Dalvik GC joins the story. The Dalvik GC code (as implemented in the Dalvik project in the AOSP site) is not a complicated piece of code. The basic way it work is covered in my DroidCon slides. what I did not cover is the basic GC loop — at the point where the collector has a list of Objects to finalize (and destroy). the loop logic at the base can be simplified like this:

Корень проблемы заключается в том, что устройство «спит» в течение определенного периода времени — это означает, что операционная система решает снизить потребление батареи, предотвращая большинство пользователей от процессов посадки, выключения экрана, сокращения циклов ЦП и т. Д. Способ сделать это — приостановить работу в середине процесса системного уровня Linux. Это может произойти в любое время во время нормального выполнения приложения, но оно останавливается при вызове локальной системы, поскольку переключение контекста выполняется на уровне ядра. Здесь Dalvik GC присоединяется к истории. Код Dalvik GC (реализованный в проекте Dalvik на сайте AOSP) не является сложным фрагментом кода. Мой слайд DroidCon показывает, как это работает. То, что я не представил, это основной цикл GC — на этот раз у сборщика есть список объектов, которые нужно завершить (и уничтожить). Логика цикла внизу может быть упрощена следующим образом:

  1. take starting_timestamp,
  2. starting_timestamp,
  3. remove object for list of objects to release,
  4. Удалить объекты в списке объектов, которые будут освобождены,
  5. release object — finalize() and call native destroy() if required,
  6. Опубликуйте объект-finalize () и при необходимости вызовите native destroy (),
  7. take end_timestamp ,
  8. end_timestamp,
  9. calculate ( end_timestamp — starting_timestamp ) and compare against a hard coded timeout value of 10 seconds,
  10. Рассчитать (end_timestamp-начальная_временная отметка) и сравнить с жестко заданным значением 10-секундного тайм-аута,
  11. if timeout has reached — throw the concurrent.TimeoutException and kill the process.
  12. Если время ожидания истекло, выведите параллелизм. TimeoutException исключение и прекращение процесса.

Now consider the following scenario:

Application runs along doing its thing. this is not a User facing application, it runs in the background. During this background operation, Objects are created, used and need to be collected to release memory. Application does not bother with a Wakelock — as this will affect the battery adversely, and seems unnecessary. this means the Application will invoke the GC from time to time. Normally the GC runs is completed without a hitch. Sometimes (very rarely) the System will decide to Sleep in the middle of the GC run. This will happen if you run your application long enough, and monitor the Dalvik memory logs closely. Now — consider the timestamp logic of the basic GC loop — it is possible for the device to start the run, take a start_stamp, and go to sleep at the destroy() native call on a system object. when it wakes up and resumes the run, the destroy() will finish, and the next end_stamp will be the time it took the destroy() call+the sleep time. If the sleep time was long — over 10 seconds, the concurrent.timeout exception will be thrown.

Приложение выполняет свои операции. Это не пользовательское приложение, оно работает в фоновом режиме. Во время этой фоновой операции объекты будут созданы, использованы и должны быть собраны для освобождения памяти. Приложению не нужно использовать пробуждение от блокировки, потому что это отрицательно скажется на аккумуляторе и кажется ненужным. Это означает, что приложение будет время от времени вызывать GC. В обычных условиях операция ГХ успешно завершена. Иногда (редко) система решает спать в середине операции GC. Это может произойти, если вы запустили приложение достаточно долго и внимательно следите за журналом памяти Dalvik. Теперь, учитывая логику меток времени основного цикла GC, устройство может начать работать, получить start_stamp и перейти в спящий режим при вызове destroy () системного объекта. Когда он проснется и продолжит работу, destroy () завершится, и следующая end_stamp будет временем, когда он вызывает destroy () + время сна. Если время сна очень велико — больше 10 секунд, то одновременно. Исключение тайм-аута будет сгенерировано.

I have seen this in the graphs generated from the analysis python script — for Android System Applications, not just my own monitored apps. collect enough logs, you will eventually see it.

Я увидел это на графике, сгенерированном при анализе скрипта python для системных приложений Android, а не только в моем собственном приложении для мониторинга. Соберите достаточно логов, и вы в конечном итоге увидите это.

Bottom line:

The issue cannot be avoided — you will encounter it if your app runs in the background. You can mitigate by taking a wakelock, and prevent the device from sleeping, but that is a different story altogether, and a new headache, and maybe another talk in another con.

Эту проблему нельзя избежать — если ваше приложение работает в фоновом режиме, вы столкнетесь с ним. Вы можете уменьшить боль, позвонив в звонок и не допуская сна устройства, но это совсем другое дело, новая головная боль и, возможно, еще одно мошенничество.

You can minimize the problem by reducing GC calls — making the scenario less likely. tips are in the slides.

Вы можете минимизировать проблемы, уменьшая количество вызовов GC, тем самым уменьшая вероятность сцен. Подсказка на слайде.

I have not yet had the chance to go over the Dalvik 2 (a.k.a ART) GC code — which boasts a new Generational Compacting feature, or performed any experiments on an Android Lollipop.

У меня не было возможности увидеть Dalvik 2 (например, код GC — в нем есть функция сжатия нового поколения или какой-либо эксперимент на Android Lollipop.

Added 7/5/2015:

After reviewing the Crash reports aggregation for this crash type, it looks like these crashes from version 5.0+ of Android OS (Lollipop with ART) only account for .5% of this crash type. This means that the ART GC changes has reduced the frequency of these crashes.

После рассмотрения агрегации отчетов о сбоях для этого типа сбоя выясняется, что эти вылеты из ОС Android (Lollipop с ART) версии 5.0+ составляют только 0,5% от этого типа сбоя. Это означает, что изменения ART GC уменьшают частоту этих сбоев.

Added 6/1/2016:

Looks like the Android project has added a lot of info on how the GC works in Dalvik 2.0 (a.k.a ART). You can read about it here — Debugging ART Garbage Collection . It also discusses some tools to get information on the GC behavior for your app. Sending a SIGQUIT to your app process will essentially cause an ANR, and dump the application state to a log file for analysis.

Похоже, что в проект Android было добавлено много информации о работе Dalvik 2.0 в GC (арт.). Вы можете прочитать здесь — Debug Art Garbage Collection. Также обсуждаются некоторые инструменты для получения информации о поведении GC приложения. Отправка SIGQUIT процессу приложения приведет к ANR и выдаст состояние приложения в файл журнала для анализа.

We see this constantly, all over our app, using Crashlytics. The crash usually happens way down in platform code. A small sampling:

В нашем приложении мы часто видим эту ситуацию, используя экстренный тормоз. Сбой обычно происходит в коде платформы. Небольшой образец:

android.database.CursorWindow.finalize() timed out after 10 seconds

finalize () истекает через 10 секунд

java.util.regex.Matcher.finalize() timed out after 10 seconds

matcher. finalize () истекает через 10 секунд.

android.graphics.Bitmap$BitmapFinalizer.finalize() timed out after 10 seconds

android.graphics.Bitmap $ BitmapFinalizer.finalize () истекает через 10 секунд.

org.apache.http.impl.conn.SingleClientConnManager.finalize() timed out after 10 seconds

org.apache.http. impl.int/singleclientconnmanager .finalize () истекло 10 секунд.

java.util.concurrent.ThreadPoolExecutor.finalize() timed out after 10 seconds

Время ожидания concurrent.threadpoolexecutor. finalize () составляет 10 секунд.

android.os.BinderProxy.finalize() timed out after 10 seconds

finalize () истекает через 10 секунд

android.graphics.Path.finalize() timed out after 10 seconds

finalize () истекает через 10 секунд

The devices on which this happens are overwhelmingly (but not exclusively) devices manufactured by Samsung. That could just mean that most of our users are using Samsung devices; alternately it could indicate a problem with Samsung devices. I’m not really sure.

Подавляющее большинство (но не все) устройств, где это происходит, — это устройства Samsung. Это может означать, что большинство наших пользователей используют устройства Samsung, кроме того, это также может указывать на проблемы с устройствами Samsung. Я не уверен

I suppose this doesn’t really answer your questions, but I just wanted to reinforce that this seems quite common, and is not specific to your application.

Я не думаю, что это действительно ответит на ваш вопрос, но я просто хочу подчеркнуть, что это кажется очень распространенным и не уникальным для вашего приложения.

I found some slides about this issue.

Я нашел несколько слайдов по этому вопросу.

In this slides the author tells that it seems to be a problem with GC, if there are a lot of objects or huge objects in heap. The slide also include a reference to a sample app and a python script to analyze this issue.

На этом слайде автор сообщает нам, что если в куче много объектов или больших объектов, то у GC будут проблемы. Этот слайд также включает в себя пример приложения и скрипт Python для анализа проблемы.

Кроме того, я обнаружил подсказку в примечании № 3: https://code.google.com/p/android/issues/detail?id=53418#c3

Broadcast Receivers timeout after 10 seconds. Possibly your doing an asynchronous call (wrong) from a broadcast receiver and 4.3 actually detects it.

Приемник вещания отключается на 10 секунд. Может быть, вы сделали асинхронный вызов (ошибка) от приемника вещания, и 4.3 фактически обнаружил его.

One thing which is invariably true is that at this time, the device would be suffocating for some memory (which is usually the reason for GC to most likely get triggered).

Одно всегда правильно, то есть в это время устройство задохнется из-за некоторой памяти (обычно это наиболее вероятная причина GC).

As mentioned by almost all authors earlier, this issue surfaces when Android tries to run GC while the app is in background. In most of the cases where we observed it, user paused the app by locking their screen. This might also indicate memory leak somewhere in the application, or the device being too loaded already. So the only legitimate way to minimize it is:

Как почти все авторы упоминали ранее, эта проблема возникает, когда Android пытается запустить GC в фоновом режиме. В большинстве случаев, которые мы наблюдали, пользователи приостанавливают приложение, блокируя экран. Это также может указывать на то, что где-то в приложении произошла утечка памяти или устройство было перегружено. Таким образом, единственный законный путь

  • to ensure there are no memory leaks, and
  • Убедитесь, что нет утечек памяти, и
  • to reduce the memory footprint of the app in general.
  • Уменьшите объем памяти приложения.

We solved the problem by stopping the FinalizerWatchdogDaemon .

Мы решили эту проблему, остановив демон finalizerwatchdog.

You can call the method in Application’s lifecycle, like attachBaseContext() . For the same reason, you also can specific the phone’s manufacture to fix the problem, it’s up to you.

Вы можете вызывать этот метод в течение жизненного цикла приложения, например attachBaseContext (). По этой же причине вы также можете указать изготовителя телефона для решения этой проблемы, в зависимости от вас.

The finalizeQueue may be too long

finalizeQueue может быть слишком длинным.

i think that java may require GC.SuppressFinalize() & GC.ReRegisterForFinalize() to let user reduce the finalizedQueue length explicitly

Я думаю, что java может понадобиться GC.SuppressFinalize () и GC.ReRegisterForFinalize (), чтобы позволить пользователю явно уменьшить длину finalizedQueue

if the JVM’ source code is available, may implement these method ourself, such as android ROM maker

Если исходный код JVM доступен, вы можете реализовать эти методы самостоятельно, например, Android ROM Maker.

It seems like a Android Runtime bug. There seems to be finalizer that runs in its separate thread and calls finalize() method on objects if they are not in the current frame of the stacktrace. For example following code(created to verify this issue) ended with the crash.

Это похоже на ошибку во время выполнения Android. Кажется, что финализатор работает в своем собственном потоке. Если объект не находится в текущей структуре stacktrace, то он вызовет метод finalize () для объекта. Например, следующий код (созданный для проверки этой проблемы) завершается сбоем.

Let’s have some cursor that do something in finalize method(e.g. SqlCipher ones, do close() which locks to the database that is currently in use)

Давайте используем некоторые курсоры для завершения метода finalize (например, SqlCipher, сделайте close (), чтобы заблокировать базу данных, используемую в настоящее время

And we do some long running stuff having opened cursor:

Мы давно что-то делали, открываем курсор:

This causes following error:

Это приведет к следующей ошибке:

The production variant with SqlCipher is very similiar:

Вариант продукта SqlCipher очень похож:

Resume: Close cursors ASAP. At least on Samsung S8 with Android 7 where the issue have been seen.

Возобновить: закройте курсор как можно скорее. По крайней мере, на Samsung S8 и Android 7 эта проблема уже появилась.

How to Avoid java.util.concurrent. TimeoutException

How to Avoid java.util.concurrent. TimeoutException

The java.util.concurrent.TimeoutException is a checked exception in Java that is thrown when a blocking operation times out.

Since java.util.concurrent.TimeoutException is a checked exception, it must be explicitly handled in methods which can throw this exception — either by using a try-catch block or by throwing it using the throws clause.

What Causes java.util.concurrent.TimeoutException

Blocking operations in Java that have a specified timeout require a way to indicate that the timeout has occurred. For many such operations, it is possible to return a value that indicates timeout. When this is not possible or desirable, TimeoutException should be thrown.

java.util.concurrent.TimeoutException Example

Here is an example of a TimeoutException thrown when a thread awaits at a barrier until the specified timeout elapses:

In the above example, the main thread invokes the await() method on an instance of CyclicBarrier with a specified timeout of 10 milliseconds. When the barrier is not reached by other threads within the specified timeout, a TimeoutException is thrown:

How to Avoid java.util.concurrent.TimeoutException

To avoid the TimeoutException , any blocking operations that have a specified timeout should not exceed the timeout. When this is not possible, returning a value such as boolean, which indicates that a timeout has occurred, should be considered rather than throwing a TimeoutException .

Track, Analyze and Manage Errors With Rollbar

Managing errors and exceptions in your code is challenging. It can make deploying production code an unnerving experience. Being able to track, analyze, and manage errors in real-time can help you to proceed with more confidence. Rollbar automates error monitoring and triaging, making fixing Java errors easier than ever. Try it today!

How to handle :java.util.concurrent.TimeoutException: android.os.BinderProxy.finalize() timed out after 10 seconds errors?

We’re seeing a number of TimeoutExceptions in GcWatcher.finalize, BinderProxy.finalize , and PlainSocketImpl.finalize . 90+% of them happen on Android 4.3. We’re getting reports of this from Crittercism from users out in the field.

enter image description here

The error is a variation of: » com.android.internal.BinderInternal$GcWatcher.finalize() timed out after 10 seconds «

So far we haven’t had any luck reproducing the problem in house or figuring out what might have caused it.

Any ideas what can cause this? Any idea how to debug this and find out which part of the app causes this? Anything that sheds light on the issue helps.

11 Answers 11

Full disclosure — I’m the author of the previously mentioned talk in TLV DroidCon.

I had a chance to examine this issue across many Android applications, and discuss it with other developers who encountered it — and we all got to the same point: this issue cannot be avoided, only minimized.

I took a closer look at the default implementation of the Android Garbage collector code, to understand better why this exception is thrown and on what could be the possible causes. I even found a possible root cause during experimentation.

The root of the problem is at the point a device «Goes to Sleep» for a while — this means that the OS has decided to lower the battery consumption by stopping most User Land processes for a while, and turning Screen off, reducing CPU cycles, etc. The way this is done — is on a Linux system level where the processes are Paused mid run. This can happen at any time during normal Application execution, but it will stop at a Native system call, as the context switching is done on the kernel level. So — this is where the Dalvik GC joins the story.

The Dalvik GC code (as implemented in the Dalvik project in the AOSP site) is not a complicated piece of code. The basic way it work is covered in my DroidCon slides. What I did not cover is the basic GC loop — at the point where the collector has a list of Objects to finalize (and destroy). The loop logic at the base can be simplified like this:

  1. take starting_timestamp ,
  2. remove object for list of objects to release,
  3. release object — finalize() and call native destroy() if required,
  4. take end_timestamp ,
  5. calculate ( end_timestamp — starting_timestamp ) and compare against a hard coded timeout value of 10 seconds,
  6. if timeout has reached — throw the java.util.concurrent.TimeoutException and kill the process.

Now consider the following scenario:

Application runs along doing its thing.

This is not a user facing application, it runs in the background.

During this background operation, objects are created, used and need to be collected to release memory.

Application does not bother with a WakeLock — as this will affect the battery adversely, and seems unnecessary.

This means the Application will invoke the GC from time to time.

Normally the GC runs is completed without a hitch.

Sometimes (very rarely) the system will decide to sleep in the middle of the GC run.

This will happen if you run your application long enough, and monitor the Dalvik memory logs closely.

Now — consider the timestamp logic of the basic GC loop — it is possible for the device to start the run, take a start_stamp , and go to sleep at the destroy() native call on a system object.

When it wakes up and resumes the run, the destroy() will finish, and the next end_stamp will be the time it took the destroy() call + the sleep time.

If the sleep time was long (more than 10 seconds), the java.util.concurrent.TimeoutException will be thrown.

I have seen this in the graphs generated from the analysis python script — for Android System Applications, not just my own monitored apps.

Collect enough logs and you will eventually see it.

Bottom line:

The issue cannot be avoided — you will encounter it if your app runs in the background.

You can mitigate by taking a WakeLock, and prevent the device from sleeping, but that is a different story altogether, and a new headache, and maybe another talk in another con.

You can minimize the problem by reducing GC calls — making the scenario less likely (tips are in the slides).

I have not yet had the chance to go over the Dalvik 2 (a.k.a ART) GC code — which boasts a new Generational Compacting feature, or performed any experiments on an Android Lollipop.

Added 7/5/2015:

After reviewing the Crash reports aggregation for this crash type, it looks like these crashes from version 5.0+ of Android OS (Lollipop with ART) only account for 0.5% of this crash type. This means that the ART GC changes has reduced the frequency of these crashes.

Added 6/1/2016:

Looks like the Android project has added a lot of info on how the GC works in Dalvik 2.0 (a.k.a ART).

It also discusses some tools to get information on the GC behavior for your app.

Sending a SIGQUIT to your app process will essentially cause an ANR, and dump the application state to a log file for analysis.

java.util.concurrent.TimeoutException thrown at random netty read timeouts with RemoteWebDriver #9528

Netty at random times gets a read timeout at. This happens at different selenium commands ( for example: WebDriver.switchTo().defaultContent, WebElement.click, WebDriver.switchTo().window, WebElement.sendKeys, WebDriver.get, Alert.accept ) and at random in a quite small percentage chance (<1% test cases).

To Reproduce

I don’t have specific steps to reproduce. When our CI runs our test suite of thousands of tests run, about 10 fails at random due to this timeout. I could not reproduce by doing a simple long loop with a few commands on my development workstation.

Timeout details

This timeout always occurs at:

I could confirm that it took 3 minutes there, confirming that it is due to the default 3 minutes read timeout the selenium configures the netty with. But the commands that are timing outs would normally run very fast, much less than one second.

Trying the code below in a method called probably thousands times by my test suite, it failed entering the catch. But after it called again driver.switchTo().defaultContent() at the end of the code below it worked. So it seems that although the read timeout happens in netty, it still works normally afterwards.

In this case, the stack trace got by the e.printStackTrace() above was:

Environment

OS: Docker containers inside a CentOS
Browser: RemoteWebDriver using Firefox in selenium/standalone-firefox:4.0.0-beta-3-20210426 docker image. Also tried the selenium/standalone-firefox:4.0.0-beta-4-prerelease-20210527 docker image, but the same thing happened.
Browser Driver version: RemoteWebDriver from selenium-java 4.0.0-beta-3
Language Bindings version: Java 4.0.0-beta-3
The RemoteWebDriver runs in a container that is running in the same docker host as the browser container. So all network between them is only logical in the same machine. Previously we were using Selenium 2.52, in the same docker host, and never happened anything similar to such timeout.

Do you have any tips about what I can try to fix it or investigate more about this?

The text was updated successfully, but these errors were encountered:

I don’t think it worked before because of old Selenium had a longer timeout. Because the timeout is happening in commands that executes in a fraction of second when it does not happen. And it happens for commands that have no justification to take long, it should just succeed or return an error immediately, as for example Alert.accept() or WebDriver.switchTo().defaultContent(). But if the old selenium had some type of auto-retry on timeout, than it could be, because as detailed in the description, when I retried a timed out command it executed fine. But if I don’t have any progress I will make a test increasing the timeout just to be sure.

In the old selenium the browser was of the docker image selenium/standalone-firefox-debug:2.52.0 , and in the new selenium I tried the docker images selenium/standalone-firefox:4.0.0-beta-3-20210426 and selenium/standalone-firefox:4.0.0-beta-4-prerelease-20210527 . So the browser versions and drivers are very different.

I will try to find any relevant log in the node logs and return with it if I find.

I found the following log in the browser container log that seems related to one of the java.util.concurrent.TimeoutException I get at the selenium RemoteWebDriver:

There is also a message [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt repeating constantly multiple times per second, but I suppose it may not be related, because it also is written when there is no problem happening.

I tried executing with trace log, but there were no other extra entries for the timed out request, only for the requests executed successfully before and after it.
I’m attaching in this comment a part of the log showing it. This part of log the corresponds to the code in the description, where it tried to switch to defaultContent, it threw TimeoutException after 3 minutes, the code waited 5 seconds and tried again to switch to defaultContent and it worked in less than 20 milliseconds.
selenium.log

I understand what you mean, it is not clear why the timeout happens, but what the Grid is doing is simply relaying the command to GeckoDriver.

The log shows that the /frame command is never logged by GeckoDriver and then the timeout is caused, you retry and it is seen in the log the /frame command. So I don’t have an explanation why this is happening with GeckoDriver.

I would try to run the same tests with Chrome or Edge and see what happens, to understand if the issue is GeckoDriver, something with the tests or something with the Grid.

Also, what type of load does the machine have when this happens? How many tests are executed in parallel? Does this stop happening when you run them sequentially? It is much likely that new versions of Firefox need more resources, plus there is a new process in the middle (GeckoDriver).

The tests that uses selenium are run sequential, but there were other tests in other containers running simultaneously. So I tried to run the selenium tests alone to make sure the others weren’t affecting the performance, but the result was the same.
I tried running the same tests using the image standalone-chrome instead of the standalone-firefox, but the same thing happened.

Ok, I understand. At this point I am out of ideas for things to suggest. I think we would need some sort of way to reproduce the issue, otherwise this will only turn into a conversation which we can have in the Slack channel.

I have an information that might be useful. Using the docker image selenium/standalone-firefox:3.141.59-20210422 the timeouts did not happen. I only changed the image being used for the browser container, the test code still used the RemoteWebDriver in the selenium-java:4.0.0-beta-3.

I see, we would appreciate a test that can be used to reproduce the issue, even if that means we need to run the test 100 times until we are able to reproduce it.
Maybe you can set up a GitHub repo that helps us to see all dependencies and commands for us to use that and work on it.

I was able to reproduce with the following code:

The test.html code can be found here: https://jsfiddle.net/vmtpf35o/

This causes the TimeoutException copied in the attached file stack1.txt.

If the 2 commented lines are uncommented, sometimes it fails with the TimeoutException of stack1.txt, sometimes it fails with a org.openqa.selenium.WebDriverException: null value in entry: message=null as copied in stack2.txt.

In my test suite I found these random stack2 alike errors, and they also stopped happening when I switched to the 3.141.59-20210422 container. I don’t know if it is somehow related to the TimeoutException.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *