Skip to content

Conversation

@dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Dec 2, 2025

What?

Mitigate a race condition unexpectedly disabling network logging.

Why?

Without awaiting the GBKit configuration global, a race condition often led to disabled fetch interception, even though the enableNetworkLogging configuration was enabled.

How?

Await the GBKit configuration global before initializing the fetch interceptor.

Testing Instructions

Important

I was only ever to reproduce the race condition while using the WordPress-Android app while using a local production build (make build). It was not reproducible in the GutenbergKit Demo app or while using a local development server (make dev-server).

This requires:

  1. Pointing the WordPress-Android branch's gradle/libs.versions.toml to this GutenbergKit branch's most recent commit.
  2. Running WordPress-Android in Android Studio.
  1. Enable WordPress-Android's experimental networking logging feature.
  2. Enable Track Network Requests.
  3. Launch the experimental editor.
  4. Insert an Image block and upload an image.
  5. Verify the network request is logged as expected.

Accessibility Testing Instructions

N/A, no user-facing changes.

Screenshots or screencast

gbk-network-logging.mov

Without awaiting the GBKit configuration global, a race condition often
led to disabled fetch interception, even though the
`enableNetworkLogging` configuration was enabled.
@dcalhoun dcalhoun added the [Type] Bug An existing feature does not function as intended label Dec 2, 2025
@dcalhoun dcalhoun requested a review from oguzkocer December 2, 2025 16:54
Copy link
Contributor

@oguzkocer oguzkocer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described :shipit:

@dcalhoun dcalhoun merged commit 060122d into trunk Dec 2, 2025
11 checks passed
@dcalhoun dcalhoun deleted the fix/await-configuration-before-initializing-network-logging branch December 2, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants