Commit b94ee79
committed
fix(macOS): add JavaScript error capture (window.onerror + unhandledrejection)
CRITICAL DISCOVERY:
- index.html already has JSBI polyfills correctly applied (488 JSBI.BigInt calls) ✅
- JavaScript basic execution works (console.log confirmed in Player.log) ✅
- BUT game-bridge never initializes ('index.ts loaded' never appears) ❌
HYPOTHESIS:
game-bridge code fails silently during execution. No errors visible because:
1. Errors aren't being logged to Unity console
2. Promise rejections may be swallowed
FIX:
Add comprehensive error handlers in ImmutableWebView.mm:
1. window.onerror - catches synchronous JavaScript errors
2. unhandledrejection event - catches unhandled promise rejections
3. Both forward errors to Unity console via messageHandlers.logHandler
NEXT STEP:
With error capture, we'll see EXACTLY where game-bridge fails in next test run.1 parent 24878c1 commit b94ee79
2 files changed
Lines changed: 12 additions & 0 deletions
File tree
- Plugins/Mac/Sources
- src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/ImmutableWebView.bundle/Contents/MacOS
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
129 | 141 | | |
130 | 142 | | |
131 | 143 | | |
| |||
0 commit comments