Skip to content
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

Tech – Active le mode strict pour React et corrige les side-effects révélés en dev #3584

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ivangabriele
Copy link
Member

@ivangabriele ivangabriele commented Aug 29, 2024

Linked issues

Premier essai

Cette erreur sur la main window en dev (mais pas sur /side_window) après avoir activé le mode strict :

image

Erreurs révélées au premier chargement :

chunk-ULTVJSSH.js?v=271cac69:16691 Uncaught Error: Duplicate item added to a unique collection
    at Collection.assertUnique_ (chunk-CCZS3NYL.js?v=271cac69:244:15)
    at Collection.push (chunk-CCZS3NYL.js?v=271cac69:160:12)
    at addLayerToMap (MeasurementLayer.jsx:86:36)
    at MeasurementLayer.jsx:94:5
    at commitHookEffectListMount (chunk-ULTVJSSH.js?v=271cac69:16936:34)
    at invokePassiveEffectMountInDEV (chunk-ULTVJSSH.js?v=271cac69:18352:19)
    at invokeEffectsInDev (chunk-ULTVJSSH.js?v=271cac69:19729:19)
    at commitDoubleInvokeEffectsInDEV (chunk-ULTVJSSH.js?v=271cac69:19714:15)
    at flushPassiveEffectsImpl (chunk-ULTVJSSH.js?v=271cac69:19531:13)
    at flushPassiveEffects (chunk-ULTVJSSH.js?v=271cac69:19475:22)
assertUnique_ @ chunk-CCZS3NYL.js?v=271cac69:244
push @ chunk-CCZS3NYL.js?v=271cac69:160
addLayerToMap @ MeasurementLayer.jsx:86
(anonymous) @ MeasurementLayer.jsx:94
commitHookEffectListMount @ chunk-ULTVJSSH.js?v=271cac69:16936
invokePassiveEffectMountInDEV @ chunk-ULTVJSSH.js?v=271cac69:18352
invokeEffectsInDev @ chunk-ULTVJSSH.js?v=271cac69:19729
commitDoubleInvokeEffectsInDEV @ chunk-ULTVJSSH.js?v=271cac69:19714
flushPassiveEffectsImpl @ chunk-ULTVJSSH.js?v=271cac69:19531
flushPassiveEffects @ chunk-ULTVJSSH.js?v=271cac69:19475
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19444
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18923
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 19 more frames
Show less
chunk-ULTVJSSH.js?v=271cac69:16691 Uncaught Error: Duplicate item added to a unique collection
    at Collection.assertUnique_ (chunk-CCZS3NYL.js?v=271cac69:244:15)
    at Collection.push (chunk-CCZS3NYL.js?v=271cac69:160:12)
    at addLayerToMap (InterestPointLayer.tsx:127:34)
    at InterestPointLayer.tsx:134:5
    at commitHookEffectListMount (chunk-ULTVJSSH.js?v=271cac69:16936:34)
    at invokePassiveEffectMountInDEV (chunk-ULTVJSSH.js?v=271cac69:18352:19)
    at invokeEffectsInDev (chunk-ULTVJSSH.js?v=271cac69:19729:19)
    at commitDoubleInvokeEffectsInDEV (chunk-ULTVJSSH.js?v=271cac69:19714:15)
    at flushPassiveEffectsImpl (chunk-ULTVJSSH.js?v=271cac69:19531:13)
    at flushPassiveEffects (chunk-ULTVJSSH.js?v=271cac69:19475:22)
assertUnique_ @ chunk-CCZS3NYL.js?v=271cac69:244
push @ chunk-CCZS3NYL.js?v=271cac69:160
addLayerToMap @ InterestPointLayer.tsx:127
(anonymous) @ InterestPointLayer.tsx:134
commitHookEffectListMount @ chunk-ULTVJSSH.js?v=271cac69:16936
invokePassiveEffectMountInDEV @ chunk-ULTVJSSH.js?v=271cac69:18352
invokeEffectsInDev @ chunk-ULTVJSSH.js?v=271cac69:19729
commitDoubleInvokeEffectsInDEV @ chunk-ULTVJSSH.js?v=271cac69:19714
flushPassiveEffectsImpl @ chunk-ULTVJSSH.js?v=271cac69:19531
flushPassiveEffects @ chunk-ULTVJSSH.js?v=271cac69:19475
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19444
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18923
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 19 more frames
Show less
console.js:288 Error handled by React Router default ErrorBoundary: Error: Duplicate item added to a unique collection
    at Collection.assertUnique_ (chunk-CCZS3NYL.js?v=271cac69:244:15)
    at Collection.push (chunk-CCZS3NYL.js?v=271cac69:160:12)
    at addLayerToMap (InterestPointLayer.tsx:127:34)
    at InterestPointLayer.tsx:134:5
    at commitHookEffectListMount (chunk-ULTVJSSH.js?v=271cac69:16936:34)
    at invokePassiveEffectMountInDEV (chunk-ULTVJSSH.js?v=271cac69:18352:19)
    at invokeEffectsInDev (chunk-ULTVJSSH.js?v=271cac69:19729:19)
    at commitDoubleInvokeEffectsInDEV (chunk-ULTVJSSH.js?v=271cac69:19714:15)
    at flushPassiveEffectsImpl (chunk-ULTVJSSH.js?v=271cac69:19531:13)
    at flushPassiveEffects (chunk-ULTVJSSH.js?v=271cac69:19475:22) 
    at DefaultErrorComponent (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:3977:15)
    at RenderErrorBoundary (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4009:5)
    at DataRoutes (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:5172:5)
    at Router (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4432:15)
    at RouterProvider (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4987:5)
    at FrontendErrorBoundary (http://localhost:3000/src/components/FrontendErrorBoundary.tsx:9:5)
    at CustomProvider2 (http://localhost:3000/node_modules/.vite/deps/chunk-UUSQ7J63.js?v=271cac69:11362:24)
    at Le (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1122:40)
    at ThemeProvider (http://localhost:3000/node_modules/.vite/deps/@mtes-mct_monitor-ui.js?v=ee9ed265:8871:26)
    at App (http://localhost:3000/src/App.tsx?t=1724929773023:36:52)
    at AuthProvider (http://localhost:3000/node_modules/.vite/deps/react-oidc-context.js?v=a0f883c9:107:5)
overrideMethod @ console.js:288
DefaultErrorComponent @ react-router-dom.js?v=f88c4066:3991
renderWithHooks @ chunk-ULTVJSSH.js?v=271cac69:11568
mountIndeterminateComponent @ chunk-ULTVJSSH.js?v=271cac69:14946
beginWork @ chunk-ULTVJSSH.js?v=271cac69:15934
beginWork$1 @ chunk-ULTVJSSH.js?v=271cac69:19781
performUnitOfWork @ chunk-ULTVJSSH.js?v=271cac69:19226
workLoopSync @ chunk-ULTVJSSH.js?v=271cac69:19165
renderRootSync @ chunk-ULTVJSSH.js?v=271cac69:19144
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18902
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 18 more frames
Show less
console.js:288 Error handled by React Router default ErrorBoundary: Error: Duplicate item added to a unique collection 
    at DefaultErrorComponent (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:3977:15)
    at RenderErrorBoundary (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4009:5)
    at DataRoutes (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:5172:5)
    at Router (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4432:15)
    at RouterProvider (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4987:5)
    at FrontendErrorBoundary (http://localhost:3000/src/components/FrontendErrorBoundary.tsx:9:5)
    at CustomProvider2 (http://localhost:3000/node_modules/.vite/deps/chunk-UUSQ7J63.js?v=271cac69:11362:24)
    at Le (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1122:40)
    at ThemeProvider (http://localhost:3000/node_modules/.vite/deps/@mtes-mct_monitor-ui.js?v=ee9ed265:8871:26)
    at App (http://localhost:3000/src/App.tsx?t=1724929773023:36:52)
    at AuthProvider (http://localhost:3000/node_modules/.vite/deps/react-oidc-context.js?v=a0f883c9:107:5)
overrideMethod @ console.js:288
overrideMethod @ console.js:356
DefaultErrorComponent @ react-router-dom.js?v=f88c4066:3991
renderWithHooks @ chunk-ULTVJSSH.js?v=271cac69:11568
mountIndeterminateComponent @ chunk-ULTVJSSH.js?v=271cac69:14996
beginWork @ chunk-ULTVJSSH.js?v=271cac69:15934
beginWork$1 @ chunk-ULTVJSSH.js?v=271cac69:19781
performUnitOfWork @ chunk-ULTVJSSH.js?v=271cac69:19226
workLoopSync @ chunk-ULTVJSSH.js?v=271cac69:19165
renderRootSync @ chunk-ULTVJSSH.js?v=271cac69:19144
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18902
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 19 more frames
Show less
console.js:288 The above error occurred in the <MeasurementLayer> component:
    at MeasurementLayer (http://localhost:3000/src/features/Measurement/layers/MeasurementLayer.jsx:63:20)
    at div
    at P2 (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1165:6)
    at BaseMap (http://localhost:3000/src/features/map/BaseMap.tsx:36:3)
    at Map (http://localhost:3000/src/features/map/Map.tsx?t=1724929773023:66:23)
    at div
    at P2 (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1165:6)
    at MainWindow (http://localhost:3000/src/features/MainWindow/index.tsx?t=1724929773023:44:40)
    at RenderedRoute (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4049:5)
    at Outlet (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4425:26)
    at PersistGate2 (http://localhost:3000/node_modules/.vite/deps/chunk-HEOZ47FT.js?v=271cac69:90:5)
    at Provider (http://localhost:3000/node_modules/.vite/deps/chunk-RZN5ZYFY.js?v=271cac69:1097:3)
    at HomePage
    at RenderedRoute (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4049:5)
    at RenderErrorBoundary (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4009:5)
    at DataRoutes (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:5172:5)
    at Router (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4432:15)
    at RouterProvider (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4987:5)
    at FrontendErrorBoundary (http://localhost:3000/src/components/FrontendErrorBoundary.tsx:9:5)
    at CustomProvider2 (http://localhost:3000/node_modules/.vite/deps/chunk-UUSQ7J63.js?v=271cac69:11362:24)
    at Le (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1122:40)
    at ThemeProvider (http://localhost:3000/node_modules/.vite/deps/@mtes-mct_monitor-ui.js?v=ee9ed265:8871:26)
    at App (http://localhost:3000/src/App.tsx?t=1724929773023:36:52)
    at AuthProvider (http://localhost:3000/node_modules/.vite/deps/react-oidc-context.js?v=a0f883c9:107:5)

React will try to recreate this component tree from scratch using the error boundary you provided, RenderErrorBoundary.
overrideMethod @ console.js:288
logCapturedError @ chunk-ULTVJSSH.js?v=271cac69:14052
callback @ chunk-ULTVJSSH.js?v=271cac69:14098
callCallback @ chunk-ULTVJSSH.js?v=271cac69:11268
commitUpdateQueue @ chunk-ULTVJSSH.js?v=271cac69:11285
commitLayoutEffectOnFiber @ chunk-ULTVJSSH.js?v=271cac69:17097
commitLayoutMountEffects_complete @ chunk-ULTVJSSH.js?v=271cac69:18008
commitLayoutEffects_begin @ chunk-ULTVJSSH.js?v=271cac69:17997
commitLayoutEffects @ chunk-ULTVJSSH.js?v=271cac69:17948
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19381
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18923
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 20 more frames
Show less
console.js:288 React Router caught the following error during render Error: Duplicate item added to a unique collection
    at Collection.assertUnique_ (chunk-CCZS3NYL.js?v=271cac69:244:15)
    at Collection.push (chunk-CCZS3NYL.js?v=271cac69:160:12)
    at addLayerToMap (MeasurementLayer.jsx:86:36)
    at MeasurementLayer.jsx:94:5
    at commitHookEffectListMount (chunk-ULTVJSSH.js?v=271cac69:16936:34)
    at invokePassiveEffectMountInDEV (chunk-ULTVJSSH.js?v=271cac69:18352:19)
    at invokeEffectsInDev (chunk-ULTVJSSH.js?v=271cac69:19729:19)
    at commitDoubleInvokeEffectsInDEV (chunk-ULTVJSSH.js?v=271cac69:19714:15)
    at flushPassiveEffectsImpl (chunk-ULTVJSSH.js?v=271cac69:19531:13)
    at flushPassiveEffects (chunk-ULTVJSSH.js?v=271cac69:19475:22) {componentStack: '\n    at MeasurementLayer (http://localhost:3000/sr…vite/deps/react-oidc-context.js?v=a0f883c9:107:5)'} 
    at RenderErrorBoundary (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4009:5)
    at DataRoutes (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:5172:5)
    at Router (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4432:15)
    at RouterProvider (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4987:5)
    at FrontendErrorBoundary (http://localhost:3000/src/components/FrontendErrorBoundary.tsx:9:5)
    at CustomProvider2 (http://localhost:3000/node_modules/.vite/deps/chunk-UUSQ7J63.js?v=271cac69:11362:24)
    at Le (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1122:40)
    at ThemeProvider (http://localhost:3000/node_modules/.vite/deps/@mtes-mct_monitor-ui.js?v=ee9ed265:8871:26)
    at App (http://localhost:3000/src/App.tsx?t=1724929773023:36:52)
    at AuthProvider (http://localhost:3000/node_modules/.vite/deps/react-oidc-context.js?v=a0f883c9:107:5)
overrideMethod @ console.js:288
componentDidCatch @ react-router-dom.js?v=f88c4066:4036
callback @ chunk-ULTVJSSH.js?v=271cac69:14104
callCallback @ chunk-ULTVJSSH.js?v=271cac69:11268
commitUpdateQueue @ chunk-ULTVJSSH.js?v=271cac69:11285
commitLayoutEffectOnFiber @ chunk-ULTVJSSH.js?v=271cac69:17097
commitLayoutMountEffects_complete @ chunk-ULTVJSSH.js?v=271cac69:18008
commitLayoutEffects_begin @ chunk-ULTVJSSH.js?v=271cac69:17997
commitLayoutEffects @ chunk-ULTVJSSH.js?v=271cac69:17948
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19381
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18923
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 20 more frames
Show less
console.js:288 The above error occurred in the <InterestPointLayer> component:
    at InterestPointLayer (http://localhost:3000/src/features/InterestPoint/layers/InterestPointLayer.tsx?t=1724929773023:53:38)
    at div
    at P2 (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1165:6)
    at BaseMap (http://localhost:3000/src/features/map/BaseMap.tsx:36:3)
    at Map (http://localhost:3000/src/features/map/Map.tsx?t=1724929773023:66:23)
    at div
    at P2 (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1165:6)
    at MainWindow (http://localhost:3000/src/features/MainWindow/index.tsx?t=1724929773023:44:40)
    at RenderedRoute (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4049:5)
    at Outlet (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4425:26)
    at PersistGate2 (http://localhost:3000/node_modules/.vite/deps/chunk-HEOZ47FT.js?v=271cac69:90:5)
    at Provider (http://localhost:3000/node_modules/.vite/deps/chunk-RZN5ZYFY.js?v=271cac69:1097:3)
    at HomePage
    at RenderedRoute (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4049:5)
    at RenderErrorBoundary (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4009:5)
    at DataRoutes (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:5172:5)
    at Router (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4432:15)
    at RouterProvider (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4987:5)
    at FrontendErrorBoundary (http://localhost:3000/src/components/FrontendErrorBoundary.tsx:9:5)
    at CustomProvider2 (http://localhost:3000/node_modules/.vite/deps/chunk-UUSQ7J63.js?v=271cac69:11362:24)
    at Le (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1122:40)
    at ThemeProvider (http://localhost:3000/node_modules/.vite/deps/@mtes-mct_monitor-ui.js?v=ee9ed265:8871:26)
    at App (http://localhost:3000/src/App.tsx?t=1724929773023:36:52)
    at AuthProvider (http://localhost:3000/node_modules/.vite/deps/react-oidc-context.js?v=a0f883c9:107:5)

React will try to recreate this component tree from scratch using the error boundary you provided, RenderErrorBoundary.
overrideMethod @ console.js:288
logCapturedError @ chunk-ULTVJSSH.js?v=271cac69:14052
callback @ chunk-ULTVJSSH.js?v=271cac69:14098
callCallback @ chunk-ULTVJSSH.js?v=271cac69:11268
commitUpdateQueue @ chunk-ULTVJSSH.js?v=271cac69:11285
commitLayoutEffectOnFiber @ chunk-ULTVJSSH.js?v=271cac69:17097
commitLayoutMountEffects_complete @ chunk-ULTVJSSH.js?v=271cac69:18008
commitLayoutEffects_begin @ chunk-ULTVJSSH.js?v=271cac69:17997
commitLayoutEffects @ chunk-ULTVJSSH.js?v=271cac69:17948
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19381
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
performSyncWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18923
flushSyncCallbacks @ chunk-ULTVJSSH.js?v=271cac69:9135
commitRootImpl @ chunk-ULTVJSSH.js?v=271cac69:19460
commitRoot @ chunk-ULTVJSSH.js?v=271cac69:19305
finishConcurrentRender @ chunk-ULTVJSSH.js?v=271cac69:18833
performConcurrentWorkOnRoot @ chunk-ULTVJSSH.js?v=271cac69:18746
workLoop @ chunk-ULTVJSSH.js?v=271cac69:197
flushWork @ chunk-ULTVJSSH.js?v=271cac69:176
performWorkUntilDeadline @ chunk-ULTVJSSH.js?v=271cac69:384
Show 20 more frames
Show less
console.js:288 React Router caught the following error during render Error: Duplicate item added to a unique collection
    at Collection.assertUnique_ (chunk-CCZS3NYL.js?v=271cac69:244:15)
    at Collection.push (chunk-CCZS3NYL.js?v=271cac69:160:12)
    at addLayerToMap (InterestPointLayer.tsx:127:34)
    at InterestPointLayer.tsx:134:5
    at commitHookEffectListMount (chunk-ULTVJSSH.js?v=271cac69:16936:34)
    at invokePassiveEffectMountInDEV (chunk-ULTVJSSH.js?v=271cac69:18352:19)
    at invokeEffectsInDev (chunk-ULTVJSSH.js?v=271cac69:19729:19)
    at commitDoubleInvokeEffectsInDEV (chunk-ULTVJSSH.js?v=271cac69:19714:15)
    at flushPassiveEffectsImpl (chunk-ULTVJSSH.js?v=271cac69:19531:13)
    at flushPassiveEffects (chunk-ULTVJSSH.js?v=271cac69:19475:22) {componentStack: '\n    at InterestPointLayer (http://localhost:3000/…vite/deps/react-oidc-context.js?v=a0f883c9:107:5)'} 
    at RenderErrorBoundary (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4009:5)
    at DataRoutes (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:5172:5)
    at Router (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4432:15)
    at RouterProvider (http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=f88c4066:4987:5)
    at FrontendErrorBoundary (http://localhost:3000/src/components/FrontendErrorBoundary.tsx:9:5)
    at CustomProvider2 (http://localhost:3000/node_modules/.vite/deps/chunk-UUSQ7J63.js?v=271cac69:11362:24)
    at Le (http://localhost:3000/node_modules/.vite/deps/chunk-NFIYKE3F.js?v=271cac69:1122:40)
    at ThemeProvider (http://localhost:3000/node_modules/.vite/deps/@mtes-mct_monitor-ui.js?v=ee9ed265:8871:26)
    at App (http://localhost:3000/src/App.tsx?t=1724929773023:36:52)
    at AuthProvider (http://localhost:3000/node_modules/.vite/deps/react-oidc-context.js?v=a0f883c9:107:5)

  • Tests E2E (Cypress)

@ivangabriele ivangabriele added the tech. enhancement technical ehancement label Aug 29, 2024
@ivangabriele ivangabriele marked this pull request as draft August 29, 2024 10:15
@ivangabriele ivangabriele changed the title Tech – Active le mode strict pour React Tech – Active le mode strict pour React et corrige les side-effects révélés en dev Aug 29, 2024
@ivangabriele ivangabriele added the bug Something isn't working label Aug 29, 2024
Copy link

sonarcloud bot commented Sep 11, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tech. enhancement technical ehancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tech – Activer React strict mode et corriger les side-effects révélés en dev
1 participant