-
Notifications
You must be signed in to change notification settings - Fork 37
feat(game-bridge): enhance error diagnostics and consolidate build output #2785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tput - Add extensive debug logging with [GAME-BRIDGE] prefix for easier troubleshooting - Enrich USER_REGISTRATION_ERROR messages with HTTP status, URL, trace IDs, request IDs, cf-ray, and response snippets - Create fixUnityBuild.js script to consolidate all parcel-generated JS files into a single inline index.html - Update build scripts to call fixUnityBuild.js after parcel build - Ensure enriched error messages (with httpStatus/url/trace/reqId/resp) are returned to Unity for CI visibility - Add browser feature detection logging (BigInt, fetch, ErrorCause, etc.) - Log detailed HTTP error context when network failures occur (especially for IMX offchain registration) - Update target browser to Chrome 137 for Unity and Unreal builds
|
View your CI Pipeline Execution ↗ for commit b062f89
☁️ Nx Cloud last updated this comment at |
nattb8
reviewed
Feb 3, 2026
nattb8
reviewed
Feb 3, 2026
nattb8
reviewed
Feb 3, 2026
Addressing PR review comments: 1. Remove debug logging added for E2E troubleshooting: - Removed verbose import/feature detection logs - Removed HTTP error detail console logs - Removed callbackToGame debug logs - Removed init flow logging - Keep only critical error logs visible to customers 2. Use real SDK version instead of hardcoded value: - Changed imxSdkVersionHeader from '0.42' to sdkVersionTag - Ensures backend receives actual SDK version via x-sdk-version header - Version is replaced by CI during build via updateSdkVersion script 3. Standardize error logging: - All remaining console.error calls use [GAME-BRIDGE] prefix consistently 4. Clean up unused code: - Removed logHttpErrorDetails function (no longer needed) - Error enrichment still works via getHttpErrorSummary
Remove potentially sensitive information from error diagnostics: 1. Remove responseSnippet from error messages: - Response body may contain tokens, API keys, or personal data - Security risk to expose this to game developers/users 2. Sanitize URLs to remove query parameters: - Query params may contain tokens, API keys, session IDs - Strip everything after '?' to protect sensitive data 3. Keep safe diagnostic information: - HTTP status codes - Sanitized URLs (path only) - Trace IDs (x-amzn-trace-id, x-trace-id) - Request IDs - CloudFlare Ray IDs This ensures error messages are helpful for debugging without exposing sensitive data to end users.
nattb8
approved these changes
Feb 4, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances error diagnostics in the Game Bridge for Unity and Unreal, and consolidates the parcel build output into a single inline HTML file.
Changes
Error Diagnostics Enhancement
USER_REGISTRATION_ERRORwith:x-amzn-trace-id,x-trace-id)x-amzn-requestid,x-request-id)cf-ray)[GAME-BRIDGE]prefix for easier troubleshooting in CI logsBuild Consolidation
fixUnityBuild.jsscript to consolidate all parcel-generated JavaScript files into a single inlineindex.htmlbuildandbuild:local) to callfixUnityBuild.jsafter parcel build.jsand.mapfiles after consolidation for cleaner Unity integrationOther
pnpm-lock.yamlto resolve conflicts with latest main branchpackages/game-bridge/scripts/**/*.jsto.eslintignoreTesting
Impact