Skip to content

[pull] dev from tauri-apps:dev - #420

Merged
pull[bot] merged 3 commits into
code:devfrom
tauri-apps:dev
Aug 31, 2026
Merged

[pull] dev from tauri-apps:dev#420
pull[bot] merged 3 commits into
code:devfrom
tauri-apps:dev

Conversation

@pull

@pull pull Bot commented Aug 31, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

javascript-unsafe and others added 3 commits August 31, 2026 15:21
* fix(path): return "." from normalize("")

Match Node.js and the existing join("") contract already documented
in the normalize comment.

* test(path): simplify normalize empty-string assertions

---------

Co-authored-by: Xia Chao <236466140+bun-unsafe@users.noreply.github.com>
* fix(windows): use cached focus states for `is_focused`

* fmt

* Add change file
Destroying an activity while another one was alive crashed the app:

    java.lang.RuntimeException: Unable to destroy activity {MainActivity}
    Caused by: java.lang.IllegalStateException: LifecycleOwner MainActivity is
    attempting to register while current state is RESUMED. LifecycleOwners must
    call register before they are STARTED.
      at app.tauri.plugin.PluginManager.onDestroy

`onDestroy` handed the manager's launchers to whichever activity was left
by calling `registerResultLaunchers` on it, but that activity was already
running, and `registerForActivityResult` may only be called before its
owner reaches STARTED. There is no moment during another activity's
teardown at which the call is legal.

So the launchers are no longer a property of the manager that migrates.
Each activity registers its own set while it is being created, which is
the one point where registering is allowed, and `onDestroy` only has to
drop the entry and point at whatever remains — which already has
launchers of its own. `LinkedHashMap` rather than a set, so the activity
taken over is the oldest survivor and not an arbitrary one.

Reproduced on Android 15 by reinstalling an APK over the running app,
which momentarily leaves the new activity resumed while the old one is
being destroyed; fixed with this change.
@pull pull Bot locked and limited conversation to collaborators Aug 31, 2026
@pull pull Bot added the ⤵️ pull label Aug 31, 2026
@pull
pull Bot merged commit cb2ecac into code:dev Aug 31, 2026
24 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants