Repository navigation
Commit b75d04d
authored
fix(macos): finish ChatGPT login after Gateway reconnect
Closes #134182
## What Problem This Solves
Fixes an issue where users who started ChatGPT Login during macOS onboarding could receive a generic Gateway transport error after the socket reconnected. The callback was rejected before dispatch, but the app cancelled the live wizard session and left the visible Submit control unable to send another request.
## Why This Change Was Made
The native onboarding owner now retries only the typed `notDispatched` failure, which proves the callback did not reach the Gateway. It reacquires the same route, preserves the existing wizard session and answer, and sends one replacement request.
Post-dispatch failures, provider errors, cancellation, route changes, and a failed replacement request keep their existing cancellation and reconciliation behavior. The retry never starts a second provider login.
## User Impact
ChatGPT Login can finish after a same-route Gateway socket reconnect during the browser flow. Users still see the provider's real error when the provider rejects the callback.
## Evidence
| Proof | Result |
| --- | --- |
| [Exact-main macOS run](https://github.com/openclaw/openclaw/actions/runs/33404854399) at `2278fbc9df879d52efbb6a0b81f7798a9f7c16c1` plus the regression test | The replacement socket received no `wizard.next`; onboarding sent `wizard.cancel`, showed `OpenClawChatTransportSendError error 0`, and stayed disconnected. |
| [Exact-head pull request CI](https://github.com/openclaw/openclaw/actions/runs/33414196718) at `a603799a69a9d230d34de146769174ffe3e169b5` | Swift lint, native release build, existing onboarding tests, and the focused stale-lease regression passed. All required checks are green. |
The regression rotates the physical socket after provider auth starts. It verifies that one replacement `wizard.next` carries the same session ID, step ID, and callback value, and that no wizard cancellation occurs.
Production LOC: +52/-33, net +19. Of these additions, 25 are a pure move of existing non-localized helpers into the existing support file so the owner stays under its enforced file-length limit without changing the string inventory. The remaining growth implements the typed, same-route, exactly-once recovery boundary.
Co-authored-by: Ayaan Zaidi <[email protected]>1 parent 3c150ea commit b75d04d
3 files changed
Lines changed: 129 additions & 33 deletions
File tree
- apps/macos
- Sources/OpenClaw
- Tests/OpenClawIPCTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | 756 | | |
771 | 757 | | |
772 | 758 | | |
| |||
1241 | 1227 | | |
1242 | 1228 | | |
1243 | 1229 | | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | 1230 | | |
1256 | 1231 | | |
1257 | 1232 | | |
| |||
1291 | 1266 | | |
1292 | 1267 | | |
1293 | 1268 | | |
1294 | | - | |
| 1269 | + | |
1295 | 1270 | | |
1296 | 1271 | | |
1297 | 1272 | | |
| |||
1306 | 1281 | | |
1307 | 1282 | | |
1308 | 1283 | | |
| 1284 | + | |
1309 | 1285 | | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1315 | 1309 | | |
1316 | 1310 | | |
1317 | 1311 | | |
| |||
1321 | 1315 | | |
1322 | 1316 | | |
1323 | 1317 | | |
1324 | | - | |
| 1318 | + | |
1325 | 1319 | | |
1326 | 1320 | | |
1327 | 1321 | | |
1328 | 1322 | | |
1329 | 1323 | | |
1330 | | - | |
| 1324 | + | |
1331 | 1325 | | |
1332 | 1326 | | |
1333 | 1327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
239 | 264 | | |
240 | 265 | | |
241 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1140 | 1217 | | |
1141 | 1218 | | |
1142 | 1219 | | |
| |||
0 commit comments