Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented Sep 3, 2025

Fixes WinHTTP error 12007 on Xbox platforms by adding network initialization check before HTTP requests.

Xbox platforms require XNetworking API initialization before WinHTTP can connect. This change adds a minimal ifdef to call Xbox-specific network initialization (implemented in downstream sentry-xbox repo) with graceful failure when network isn't ready.

  • Uses existing SENTRY_PLATFORM_XBOX pattern
  • No new sentry-native dependencies
  • Xbox implementation stays in sentry-xbox repo

Note: there's an unrelated CI failure, see #1360

vaind and others added 4 commits September 3, 2025 20:24
- Add Xbox-specific network initialization before WinHTTP operations
- Ensures Xbox XNetworking APIs are ready before HTTP requests
- Fixes WinHTTP error 12007 (ERROR_WINHTTP_CANNOT_CONNECT) on Xbox platforms
- Uses 60-second timeout to prevent indefinite blocking
- Graceful failure with warning when network not ready
- Minimal changes using existing SENTRY_PLATFORM_XBOX ifdef pattern

Addresses Xbox networking requirements where WinHTTP needs network
connectivity to be established through Xbox-specific APIs before
HTTP operations can succeed.
@vaind vaind requested a review from supervacuus September 4, 2025 10:48
@vaind vaind marked this pull request as ready for review September 4, 2025 10:48
Comment on lines +13 to +14
# include "sentry_transport_xbox.h"
#endif
Copy link

Choose a reason for hiding this comment

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

Potential bug: The code includes a non-existent header sentry_transport_xbox.h and calls an undefined function, causing fatal compilation errors when building for the Xbox platform.
  • Description: The change introduces an #include "sentry_transport_xbox.h" directive and a call to sentry__xbox_ensure_network_initialized() within an #ifdef SENTRY_PLATFORM_XBOX block. Neither the header file nor the function definition exists within the repository. Consequently, any attempt to compile the code with the SENTRY_PLATFORM_XBOX macro defined will result in a fatal compilation error, such as fatal error: sentry_transport_xbox.h: No such file or directory. This breaks the build for the Xbox platform, which is a major functional regression. This approach is also inconsistent with existing patterns for Xbox-specific code, which typically use no-op implementations rather than relying on missing external dependencies.

  • Suggested fix: The missing sentry_transport_xbox.h header and the implementation for sentry__xbox_ensure_network_initialized() should be added. Alternatively, if these are provided by a separate repository, the build should handle their absence gracefully, for example by using weak symbols or providing a no-op fallback implementation to ensure the main repository remains buildable on its own.
    severity: 0.85, confidence: 1.0

Did we get this right? 👍 / 👎 to inform future reviews.

@vaind vaind merged commit 9a5c14f into master Sep 4, 2025
40 of 41 checks passed
@vaind vaind deleted the fix/xbox-networking branch September 4, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants