Translations is not working on Lenovo tablet TB X606X (Android 10)
Categories
(GeckoView :: Translations, defect, P2)
Tracking
(firefox128 affected, firefox129 affected)
People
(Reporter: mlobontiuroman, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][foundation][translations:128][translations:129][avocado sprint][group3][s2-2025])
Attachments
(5 files)
Steps to reproduce
- Make sure to enable the Translations feature via nimbus-cli.
- Open a translatable page, and when the translations bottom sheet is displayed, tap on "Translate" button.
- Observe.
Expected behavior
The page is translated in the desired language.
Actual behavior
The page is not translated. Waited more than 10 minutes, and the "Translate" button still displays the spinner icon, and the page is still displayed in its original language.
Device information
- Firefox version: Nightly 128.0a1
- Android device: Lenovo TB X606X (Android 10)
- NOT reproducible on Google Pixel 6 (Android 14), Lenovo Yoga Tab 11 (Android 12)
- reproducibla also with a clean profile.
| Reporter | ||
Comment 1•1 year ago
|
||
I'll attach a logcat, maybe it helps.
Comment 2•1 year ago
|
||
I wonder if the translation's engine architecture supports the Lenovo tablet and we are incorrectly enabling the feature. One thing that is concerning in the logcat is we should have a log of either Success requesting engine support. isEngineSupported: $isEngineSupported or "Error requesting engine support: ", error and we have neither. TranslationsMiddleware logs are showing up, so logging is enabled. That's a bit strange, I'll try to compare with a working device to ensure the logging is working as expected.
We should investigate if the Lenovo tablet has an issue around isEngineSupported for a first look at this bug.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Linking to bug 1885137, since there is additional debug information there as well to help unravel this mystery. The device seems supported on the test in bug 1885137 comment 10. Very odd that it is behaving this way, bug 1885137 comment 12, might be the best next investigation step.
| Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Just a quick update on this bug, I have a Lenovo tablet arriving and hope to reproduce and find more details this week.
Comment 5•1 year ago
|
||
That's a bit strange, I'll try to compare with a working device to ensure the logging is working as expected.
Confirmed logging is working as expected on working device and saw 07-01 10:37:02.857 5244 5244 I TranslationsMiddleware: Success requesting engine support. isEngineSupported: true, so that lends itself to the theory that this call is somehow getting stuck.
Just a quick update on this bug, I have a Lenovo tablet arriving and hope to reproduce and find more details this week.
Unfortunately, not reproducing on a Lenovo Tab M11.
I'll make a build with more logs enabled to see if we can get find more info.
Comment 6•1 year ago
|
||
Hi, could you test this special debug APK on the device and post the logcat here? I added log statements to hopefully narrow things down some more. Could you use the APK and attempt to perform a translation?
| Reporter | ||
Comment 7•1 year ago
|
||
Hi, Olivia
I've tested with the debug build provided by you, and the translation still doesn't work. The "Translate" button is constantly displayed with the "loading" icon. I've attached a logcat, maybe it helps.
Tested with the Lenovo TB-X606X (Android 10).
| Reporter | ||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Thanks, Mira! The logs were very helpful!
Logs deviate at this point (not-working run):
07-02 10:36:40.986 17441 17502 I Gecko : 1901236 - bergamot-translations - about to do a WebAssembly check
07-02 10:36:41.006 17441 17502 I Gecko : 1901236 - bergamot-translations - Using optimized gemm (mozIntGemm) implementation
07-02 10:36:41.007 17441 17502 I Gecko : 1901236 - bergamot-translations - instantiateArrayBuffer
...
07-02 10:36:55.962 17104 17234 I Gecko : 1901236 - TranslationsDocument - TranslationsPort:EngineTerminated
07-02 10:36:55.962 17104 17234 I Gecko : 1901236 - TranslationsDocument - discardPort
07-02 10:36:55.970 17104 17234 I Gecko : 1901236 - TranslationsDocument - this.#queue.size && this.#isPageShown
07-02 10:36:55.970 17104 17234 I Gecko : 1901236 - TranslationsDocument - requestNewPort
07-02 10:36:55.992 17054 17084 I Gecko : 1901236 - TranslationsParent - Translations:RequestPort
Working run:
07-02 14:16:50.122 6109 6163 I Gecko : 1901236 - bergamot-translations - about to do a WebAssembly check
07-02 14:16:50.124 6109 6163 I Gecko : 1901236 - bergamot-translations - Using optimized gemm (mozIntGemm) implementation
07-02 14:16:50.124 6109 6163 I Gecko : 1901236 - bergamot-translations - instantiateArrayBuffer
07-02 14:16:50.255 5827 5966 I Gecko : 1901236 - TranslationsDocument -TranslationsPort:GetEngineStatusResponse
07-02 14:16:50.256 5775 5853 I 1901236 : 1901236 TranslationsStateReducer - TranslateStateChangeAction TranslationEngineState(detectedLanguages=DetectedLanguages(documentLangTag=en, supportedDocumentLang=true, userPreferredLangTag=null), error=null, isEngineReady=true, hasVisibleChange=false, requestedTranslationPair=TranslationPair(fromLanguage=en, toLanguage=cs))
07-02 14:16:50.258 5775 5775 I Addon : 1901236 - DefaultToolbarMenu shouldShowTranslations
07-02 14:16:50.258 5775 5775 I Addon : 1901236 - DefaultToolbarMenu isEngineSupported == true
07-02 14:16:50.259 5775 5775 I Addon : 1901236 - DefaultToolbarMenu shouldShowTranslations
07-02 14:16:50.259 5775 5775 I Addon : 1901236 - DefaultToolbarMenu isEngineSupported == true
07-02 14:16:50.350 5827 5966 I Gecko : 1901236 - TranslationsDocument - TranslationsPort:TranslationResponse
07-02 14:16:50.350 5827 5966 I Gecko : 1901236 - TranslationsDocument - hasFirstVisibleChange = true
07-02 14:16:50.350 5775 5806 I Gecko : 1901236 - TranslationsParent - Translations:ReportFirstVisibleChange
(It appears some of the Android logs didn't log on the other device for some reason, as well.)
I'll try to narrow it down further, it appears something is causing an error when setting up the engine.
Comment 9•1 year ago
|
||
Hi Mira,
Thanks for helping solve this bug! Could you test this APK and attach the logs, please?
The new APK won't fix the problem, but hopefully it will give us more logs to figure out what is going on.
| Reporter | ||
Comment 10•1 year ago
•
|
||
Hello, Olivia,
Here is the requested logcat.
Tested on the build provided by you, with the Lenovo tablet.
Comment 11•1 year ago
•
|
||
Thanks again!
Logs deviate at this point (not-working run):
Logs indicate a supported engine.
07-10 09:01:25.000 3085 3199 I Gecko : 1901236 - bergamot-translations - createWasm"
07-10 09:01:25.010 3085 3199 I Gecko : 1901236 - bergamot-translations - Using optimized gemm (mozIntGemm) implementation
07-10 09:01:25.011 3085 3199 I Gecko : 1901236 - bergamot-translations - addRunDependency
07-10 09:01:25.012 3085 3199 I Gecko : 1901236 - bergamot-translations - instantiateAsync
07-10 09:01:25.012 3085 3199 I Gecko : 1901236 - bergamot-translations - instantiateArrayBuffer
07-10 09:01:25.013 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinaryPromise
07-10 09:01:25.013 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinaryPromise ENVIRONMENT_IS_WEB false
07-10 09:01:25.013 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinaryPromise ENVIRONMENT_IS_WORKER true
07-10 09:01:25.015 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinaryPromise - Promise.resolve()"
07-10 09:01:25.016 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinary
07-10 09:01:25.016 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinary file == wasmBinaryFile && wasmBinary"
07-10 09:01:25.016 3085 3199 I Gecko : 1901236 - bergamot-translations - getBinaryPromise WebAssembly.instantiate(binary, info)
... Nothing translation related
07-10 09:01:27.705 469 544 I hwcomposer: [HWCDisplay] [Display_0 (type:1)] fps:60.503105,dur:1008.21,max:21.57,min:11.27
Logs cut off here, time indicates it was logging for several seconds afterwards. There is a chance the logs got cut-off early, but on the working run, the next calls are miliseconds afterwards, so might not be cut-off early.
Working run:
07-10 10:46:39.902 3399 3456 I Gecko : 1901236 - bergamot-translations - createWasm"
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - Using optimized gemm (mozIntGemm) implementation
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - addRunDependency
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - instantiateAsync
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - instantiateArrayBuffer
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinaryPromise
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinaryPromise ENVIRONMENT_IS_WEB false
07-10 10:46:39.904 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinaryPromise ENVIRONMENT_IS_WORKER true
07-10 10:46:39.905 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinaryPromise - Promise.resolve()"
07-10 10:46:39.905 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinary
07-10 10:46:39.905 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinary file == wasmBinaryFile && wasmBinary"
07-10 10:46:39.905 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinaryPromise WebAssembly.instantiate(binary, info)
07-10 10:46:39.956 3399 3456 I Gecko : 1901236 - bergamot-translations - getBinaryPromise instance
07-10 10:46:39.956 3399 3456 I Gecko : 1901236 - bergamot-translator receiveInstantiationResult
07-10 10:46:39.956 3399 3456 I Gecko : 1901236 - bergamot-translator receiveInstance
07-10 10:46:39.956 3399 3456 I Gecko : 1901236 - bergamot-translator exportAsmFunctions
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translations - removeRunDependency
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translations - preRun
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translator callRuntimeCallbacks
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translations - initRuntime
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translator callRuntimeCallbacks
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translator getEnvStrings
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translator getEnvStrings
07-10 10:46:39.957 3399 3456 I Gecko : 1901236 - bergamot-translations - writeAsciiToMemory
Comment 12•1 year ago
|
||
Hi Mira,
Thanks again for all the testing, really appreciate it!
I added more logs trying to capture the error. Could you run this APK V3 on the Lenovo tablet TB X606X and upload the logs?
| Reporter | ||
Comment 13•1 year ago
|
||
Tested with the provided build. Still no success.
Comment 14•1 year ago
•
|
||
Thanks, Mira!
In the latest log, I saw 07-11 15:43:33.849 11344 11366 I lla.fenix.debu: Explicit concurrent copying GC freed 123457(4672KB) AllocSpace objects, 3(60KB) LOS objects, 33% free, 12MB/18MB, paused 186us total 193.649ms.
I think I've finally been able to reproduce locally. Using an Android Studio Android 10 Medium Tablet Emulator, with all the default settings, I'm able to get it to stall in the same place at WebAssembly.instantiate(binary, info); here when translating larger pages, such as this e-book. With more debugging turned on, I see various longs that seem to indicate memory issues.
Also, was able to reproduce on an Android 5.1 emulator. It notably had more logs about lowmemorykiller occuring.
Saw something intresting about the Android docs about Android 10 specifically too that might be relevant why we have two reports about Android 10. A change in this area did occur, starting at Android 10.
Comment 15•1 year ago
•
|
||
Best idea at this time is to:
- Figure out what the minimum amount of memory is required to run a translation
- It seems additionally page dependent, because I can reproduce on big website pages easier than smaller pages
- Add a check before starting a translation, to stop the translation
A good goal for this bug would be to just report some error. Right now, the translation just spins and gets stuck attempting to translate indefinitely.
Updated•1 year ago
|
Comment 16•1 year ago
•
|
||
Test Device I can reporudce on:
Emulated:
- RAM: 1907 MB
- VM heap: 192 MB
- Internal Storage: 6144 MB
- SD Storage: 512 MB
This is probably a good device right on the boundry of this bug. The bug does not reproduce while translating small pages, but reproduces when translating large pages, such as e-books.
Updated•1 year ago
|
Updated•10 months ago
|
Updated•9 months ago
|
Comment 17•2 months ago
|
||
Hi Mira, Can you please confirm if this is still reproducible? Thanks
| Reporter | ||
Comment 18•2 months ago
|
||
Hi, Roger!
I've verified on the Firefox for Android 142.0.1, and on Nightly 144.0a1 from 9/8 with the Lenovo TB X606X (Andorid 10), and translation works.
I'll close this as WORKSFORME.
Description
•