补齐移动外链打开失败日志
移动 HostBridge 外链打开原生异常记录稳定日志 配置门禁反查外链异常不可静默 同步原生壳方案文档和共享决策记录
This commit is contained in:
@@ -2382,7 +2382,8 @@ if (
|
||||
'const externalUrlPayload = normalizeHostBridgeExternalUrlPayload(',
|
||||
) ||
|
||||
!hostBridgeNavigationSource.includes('openMobileShellExternalNavigation(') ||
|
||||
!hostBridgeNavigationSource.includes('externalUrlPayload.url')
|
||||
!hostBridgeNavigationSource.includes('externalUrlPayload.url') ||
|
||||
!hostBridgeNavigationSource.includes('logMobileHostBridgeNavigationFailure')
|
||||
) {
|
||||
throw new Error(
|
||||
'mobile shell app.openExternalUrl must normalize payloads and use the shared external navigation helper',
|
||||
@@ -2396,6 +2397,8 @@ for (const snippet of [
|
||||
'Linking.openURL',
|
||||
'javascript:alert(1)',
|
||||
'external URL cannot be opened',
|
||||
'mobile HostBridge navigation failed for external.open',
|
||||
'expect(warnSpy).toHaveBeenCalledTimes(2)',
|
||||
'converts native external open exceptions to stable host_error',
|
||||
'navigation.openNativePage unsupported in mobile shell',
|
||||
'app.reloadWebView unsupported in mobile shell',
|
||||
@@ -2965,7 +2968,8 @@ for (const snippet of [
|
||||
"import * as Linking from 'expo-linking'",
|
||||
'openMobileShellExternalNavigation(',
|
||||
'externalUrlPayload.url',
|
||||
'} catch {',
|
||||
"} catch (error) {",
|
||||
"logMobileHostBridgeNavigationFailure('external.open', error)",
|
||||
'opened = false;',
|
||||
'(request.payload as OpenExternalUrlPayload | undefined)?.url',
|
||||
'normalizeHostBridgeExternalUrlPayload',
|
||||
|
||||
Reference in New Issue
Block a user