thunderbird / thunderbird/thunderbird-android

WebView process is never unloaded while push service is running

Open
#6,460 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Checklist
  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.
App version

6.202

Where did you get the app from?

Google Play

Android version

Android 12 / LineageOS 19.1

Device model

No response

Steps to reproduce
  1. Observe the push service is running after boot or whatever.
  2. Open the app, read some mail and close the app (swipe it out of tasks to be sure).
  3. Observe that extra WebView process keep running forever along with the service.
Expected behavior

WebView process should exit when the app is closed.

Actual behavior

Starting as usual the service is fine.

When I open the app and view some mail, WebView process is started. But it never unloads after the app was closed, just keeps hanging along with the push service and wasting memory no matter what. Also there is no dedicated exit button in the app to properly close it.


I found two ways to kill it without stopping the service:

Force stop WebView app from its info page.

Or kill the process using some process viewer (requires root).

Only after that we return back to expected state.


My thoughts: Android obviously treats WebView process as part of the service and never kills it. Foreground services have high priority and never being unloaded even under low memory conditions. There should be some way to avoid such behavior or at least make an "exit" button in the app, which properly shuts down all its processes, but keeps the push service running.

Logs

No response

Contributor guide

Open the 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.

Research direction

Reproduce on Android 12/LineageOS 19.1 with app version 6.202 by opening mail, closing the app, and checking whether the WebView process remains alongside the push service. Trace the app and push-service lifecycle around WebView use; done means the WebView process exits after the app closes while push notifications continue working.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.