Intermittent many test failures, e.g. java.lang.NoClassDefFoundError: org.mozilla.appservices.places.GleanMetrics.PlacesManager

Open
#2,155 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
kotlin
Domain
mobile, testing-qa

Research direction

Start with the linked Firebase Test Run and the stack trace, then inspect PlacesConnection.kt, PlacesHistoryStorage.kt, and PlacesManager.kt at the referenced call sites. Compare the failing build commit c3c90c3030868e3bc6f335f63d1050d522d7484c with a reproducible test run; done means the intermittent failures and the reported NoClassDefFoundError no longer occur.

Written by the indexing model from the issue text.

Description

eng:ui-test
Firebase Test Run:

https://treeherder.mozilla.org/logviewer?job_id=400024802&repo=reference-browser

Stacktrace:
java.lang.NoClassDefFoundError: org.mozilla.appservices.places.GleanMetrics.PlacesManager

     FATAL EXCEPTION: DefaultDispatcher-worker-8
Process: org.mozilla.reference.browser.debug, PID: 7742
java.lang.NoClassDefFoundError: org.mozilla.appservices.places.GleanMetrics.PlacesManager
	at mozilla.appservices.places.PlacesWriterConnection$writeQueryCounters$2.invoke(PlacesConnection.kt:482)
	at mozilla.appservices.places.PlacesWriterConnection$writeQueryCounters$2.invoke(PlacesConnection.kt:480)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at mozilla.appservices.places.PlacesWriterConnection.getWriteQueryCounters(PlacesConnection.kt:480)
	at mozilla.appservices.places.PlacesWriterConnection.noteObservation(PlacesConnection.kt:295)
	at mozilla.components.browser.storage.sync.PlacesHistoryStorage$recordObservation$2.invokeSuspend(PlacesHistoryStorage.kt:88)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:923)
	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@b80a2d1, Dispatchers.IO]
Caused by: java.lang.UnsatisfiedLinkError: Error looking up function 'ffi_glean_b955_OnGleanEvents_init_callback': undefined symbol: ffi_glean_b955_OnGleanEvents_init_callback
	at com.sun.jna.Function.<init>(Function.java:252)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:604)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:580)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
	at com.sun.jna.Library$Handler.invoke(Library.java:243)
	at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
	at $Proxy16.ffi_glean_b955_OnGleanEvents_init_callback(Unknown Source)
	at mozilla.telemetry.glean.internal.FfiConverterTypeOnGleanEvents.register$glean_release(glean.kt:4043)
	at mozilla.telemetry.glean.internal._UniFFILib$Companion$INSTANCE$2.invoke(glean.kt:261)
	at mozilla.telemetry.glean.internal._UniFFILib$Companion$INSTANCE$2.invoke(glean.kt:258)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at mozilla.telemetry.glean.internal._UniFFILib$Companion.getINSTANCE$glean_release(glean.kt:258)
	at mozilla.telemetry.glean.internal.CounterMetric.<init>(glean.kt:1268)
	at org.mozilla.appservices.places.GleanMetrics.PlacesManager.<clinit>(PlacesManager.kt:48)
	at mozilla.appservices.places.PlacesWriterConnection$writeQueryCounters$2.invoke(PlacesConnection.kt:482)
	at mozilla.appservices.places.PlacesWriterConnection$writeQueryCounters$2.invoke(PlacesConnection.kt:480)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at mozilla.appservices.places.PlacesWriterConnection.getWriteQueryCounters(PlacesConnection.kt:480)
	at mozilla.appservices.places.PlacesWriterConnection.noteObservation(PlacesConnection.kt:295)
	at mozilla.components.browser.storage.sync.PlacesHistoryStorage$recordVisit$2.invokeSuspend(PlacesHistoryStorage.kt:66)
	... 5 more
Build:

https://github.com/mozilla-mobile/reference-browser/commit/c3c90c3030868e3bc6f335f63d1050d522d7484c

Dominant language
Kotlin
Stars
668
Forks
198
Avg merge
8h 47m
Merged PRs (30d)
53

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla-mobile/reference-browser

All issues in mozilla-mobile/reference-browser

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.