26,794 matches across 25 files for error
snippet_mode: auto · sorted by relevance
33 completeWriting,
34 close,
35▶ closeWithError,
36} from './ReactServerStreamConfig';
37
· · ·
65 ReactCallSite,
66 ReactFunctionLocation,
67▶ ReactErrorInfo,
68 ReactErrorInfoDev,
69 ReactKey,
· · ·
68▶ ReactErrorInfoDev,
69 ReactKey,
70} from 'shared/ReactTypes';
· · ·
143
144import {
145▶ describeObjectForErrorMessage,
146 isGetter,
147 isSimpleObject,
· · ·
149 jsxChildrenParents,
150 objectName,
151▶} from 'shared/ReactSerializationErrors';
152
153import ReactSharedInternals from './ReactSharedInternalsServer';
+ 362 more matches in this file
81 TREE_OPERATION_REORDER_CHILDREN,
82 TREE_OPERATION_SET_SUBTREE_MODE,
83▶ TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS,
84 TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
85 TREE_OPERATION_APPLIED_ACTIVITY_SLICE_CHANGE,
· · ·
123} from 'react-devtools-shared/src/backend/DevToolsNativeHost';
124import {
125▶ isError,
126 rootSupportsProfiling,
127 isErrorBoundary,
· · ·
127▶ isErrorBoundary,
128 getSecondaryEnvironmentName,
129 areEqualRects,
· · ·
441 overridePropsRenamePath,
442 scheduleRefresh,
443▶ setErrorHandler,
444 setSuspenseHandler,
445 scheduleUpdate,
· · ·
447 getCurrentFiber,
448 } = renderer;
449▶ const supportsTogglingError =
450 typeof setErrorHandler === 'function' &&
451 typeof scheduleUpdate === 'function';
+ 205 more matches in this file
11import {
12 CompilerDiagnostic,
13▶ CompilerError,
14 CompilerErrorDetail,
15 CompilerSuggestionOperation,
· · ·
14▶ CompilerErrorDetail,
15 CompilerSuggestionOperation,
16 ErrorCategory,
· · ·
16▶ ErrorCategory,
17} from '../CompilerError';
18import {assertExhaustive, hasNode} from '../Utils/utils';
· · ·
17▶} from '../CompilerError';
18import {assertExhaustive, hasNode} from '../Utils/utils';
19import {Environment} from './Environment';
· · ·
107 const binding = builder.resolveIdentifier(param);
108 if (binding.kind !== 'Identifier') {
109▶ builder.recordError(
110 CompilerDiagnostic.create({
111 category: ErrorCategory.Invariant,
+ 241 more matches in this file
43import type {ThenableState} from './ReactFizzThenable';
44
45▶import {describeObjectForErrorMessage} from 'shared/ReactSerializationErrors';
46
47import {
· · ·
54 flushBuffered,
55 close,
56▶ closeWithError,
57 byteLengthOfChunk,
58} from './ReactServerStreamConfig';
· · ·
135 getActionStateCount,
136 getActionStateMatchingIndex,
137▶ createRecoverableError,
138 isRecoverableError,
139 cloneRecoverableErrorAsFatal,
· · ·
138▶ isRecoverableError,
139 cloneRecoverableErrorAsFatal,
140} from './ReactFizzHooks';
· · ·
139▶ cloneRecoverableErrorAsFatal,
140} from './ReactFizzHooks';
141import {DefaultAsyncDispatcher} from './ReactFizzAsyncDispatcher';
+ 374 more matches in this file
18 ReactStackTrace,
19 ReactFunctionLocation,
20▶ ReactErrorInfoDev,
21} from 'shared/ReactTypes';
22import type {LazyComponent} from 'react/src/ReactLazy';
· · ·
79 logDedupedComponentRender,
80 logComponentAborted,
81▶ logComponentErrored,
82 logIOInfo,
83 logIOInfoErrored,
· · ·
83▶ logIOInfoErrored,
84 logComponentAwait,
85 logComponentAwaitAborted,
· · ·
86▶ logComponentAwaitErrored,
87} from './ReactFlightPerformanceTrack';
88
· · ·
104import {injectInternals} from './ReactFlightClientDevToolsHook';
105
106▶import {OMITTED_PROP_ERROR} from 'shared/ReactFlightPropertyAccess';
107
108import ReactVersion from 'shared/ReactVersion';
+ 251 more matches in this file
66import is from 'shared/objectIs';
67
68▶import reportGlobalError from 'shared/reportGlobalError';
69
70import {
· · ·
85 logSuspendedRenderPhase,
86 logRecoveredRenderPhase,
87▶ logErroredRenderPhase,
88 logInconsistentRender,
89 logSuspendedWithDelayPhase,
· · ·
198 getNextLanes,
199 getEntangledLanes,
200▶ getLanesToRetrySynchronouslyOnError,
201 upgradePendingLanesToSync,
202 markRootSuspended as _markRootSuspended,
· · ·
238import {
239 throwException,
240▶ createRootErrorUpdate,
241 createClassErrorUpdate,
242 initializeClassErrorUpdate,
· · ·
241▶ createClassErrorUpdate,
242 initializeClassErrorUpdate,
243} from './ReactFiberThrow';
+ 225 more matches in this file
467 if (onHeaders && typeof maxHeadersLength === 'number') {
468 if (maxHeadersLength <= 0) {
469▶ console.error(
470 'React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.',
471 maxHeadersLength === 0 ? 'zero' : maxHeadersLength,
· · ·
1271): void {
1272 if (typeof style !== 'object') {
1273▶ throw new Error(
1274 'The `style` prop expects a mapping from style properties to values, ' +
1275 "not a string. For example, style={{marginRight: spacing + 'em'}} when " +
· · ·
1391 escapeTextForBrowser(
1392 // eslint-disable-next-line no-script-url
1393▶ "javascript:throw new Error('React form unexpectedly submitted.')",
1394 ),
1395);
· · ·
1422function validateAdditionalFormField(value: string | File, key: string): void {
1423 if (typeof value !== 'string') {
1424▶ throw new Error(
1425 'File/Blob fields are not yet supported in progressive forms. ' +
1426 'Will fallback to client hydration.',
· · ·
1459 // work there.
1460 if (__DEV__) {
1461▶ // TODO: Should this be some kind of recoverable error?
1462 console.error(
1463 'Failed to serialize an action for progressive enhancement:\n%s',
+ 144 more matches in this file
583 !isScriptDataBlock(props)
584 ) {
585▶ console.error(
586 'Encountered a script tag while rendering React component. ' +
587 'Scripts inside React components are never executed when rendering ' +
· · ·
633 // Even if you use `is`, these should be of known type and lower case.
634 if (type !== type.toLowerCase()) {
635▶ console.error(
636 '<%s /> is using incorrect casing. ' +
637 'Use PascalCase for React components, ' +
· · ·
647 ) {
648 warnedUnknownTags[type] = true;
649▶ console.error(
650 'The tag <%s> is unrecognized in this browser. ' +
651 'If you meant to render a React component, start its name with ' +
· · ·
874 : typeof localPromise !== 'undefined'
875 ? callback =>
876▶ localPromise.resolve(null).then(callback).catch(handleErrorInNextTick)
877 : scheduleTimeout; // TODO: Determine the best fallback here.
878
· · ·
879▶function handleErrorInNextTick(error: any) {
880 setTimeout(() => {
881 throw error;
+ 114 more matches in this file
8import {
9 CompilerDiagnostic,
10▶ CompilerError,
11 Effect,
12 SourceLocation,
· · ·
70 MutationReason,
71} from './AliasingEffects';
72▶import {ErrorCategory} from '../CompilerError';
73
74const DEBUG = false;
· · ·
93 * to the current abtract state, and effects may be dropped or rewritten accordingly.
94 * For example, a "MutateConditionally <x>" effect may be dropped if x is not a mutable
95▶ * value. A "Mutate <y>" effect may get converted into a "MutateFrozen <error>" effect
96 * if y is mutable, etc.
97 */
· · ·
132
133 if (fn.fnType === 'Component') {
134▶ CompilerError.invariant(fn.params.length <= 2, {
135 reason:
136 'Expected React component to have not more than two parameters: one for props and for ref',
· · ·
199 iterationCount++;
200 if (iterationCount > 100) {
201▶ CompilerError.invariant(false, {
202 reason: `[InferMutationAliasingEffects] Potential infinite loop`,
203 description: `A value, temporary place, or effect was not cached properly`,
+ 49 more matches in this file
9use react_compiler_diagnostics::CompilerDiagnostic;
10use react_compiler_diagnostics::CompilerDiagnosticDetail;
11▶use react_compiler_diagnostics::CompilerError;
12use react_compiler_diagnostics::CompilerErrorDetail;
13use react_compiler_diagnostics::ErrorCategory;
· · ·
12▶use react_compiler_diagnostics::CompilerErrorDetail;
13use react_compiler_diagnostics::ErrorCategory;
14use react_compiler_hir::environment::Environment;
· · ·
13▶use react_compiler_diagnostics::ErrorCategory;
14use react_compiler_hir::environment::Environment;
15use react_compiler_hir::*;
· · ·
52/// Serialize an expression to a serde_json::Value for UnsupportedNode's original_node.
53/// Returns None if serialization fails (should not happen for valid AST nodes).
54▶/// This should ONLY be called on error/bail paths — never eagerly before deciding
55/// to create an UnsupportedNode.
56fn serialize_expression(
· · ·
146 scope_info: &ScopeInfo,
147 function_scope: ScopeId,
148▶) -> Result<(), CompilerError> {
149 let Some(scope) = scope_info.scopes.get(function_scope.0 as usize) else {
150 return Ok(());
+ 177 more matches in this file
35use react_compiler_ast::visitor::Visitor;
36use react_compiler_ast::visitor::walk_program_mut;
37▶use react_compiler_diagnostics::CompilerError;
38use react_compiler_diagnostics::CompilerErrorDetail;
39use react_compiler_diagnostics::CompilerErrorOrDiagnostic;
· · ·
38▶use react_compiler_diagnostics::CompilerErrorDetail;
39use react_compiler_diagnostics::CompilerErrorOrDiagnostic;
40use react_compiler_diagnostics::ErrorCategory;
· · ·
39▶use react_compiler_diagnostics::CompilerErrorOrDiagnostic;
40use react_compiler_diagnostics::ErrorCategory;
41use react_compiler_diagnostics::SourceLocation;
· · ·
40▶use react_compiler_diagnostics::ErrorCategory;
41use react_compiler_diagnostics::SourceLocation;
42use react_compiler_hir::ReactFunctionType;
· · ·
47use super::compile_result::CodegenFunction;
48use super::compile_result::CompileResult;
49▶use super::compile_result::CompilerErrorDetailInfo;
50use super::compile_result::CompilerErrorInfo;
51use super::compile_result::CompilerErrorItemInfo;
+ 94 more matches in this file
129 pushComponentEffectDuration,
130 popComponentEffectDuration,
131▶ pushComponentEffectErrors,
132 popComponentEffectErrors,
133 pushComponentEffectDidSpawnUpdate,
· · ·
132▶ popComponentEffectErrors,
133 pushComponentEffectDidSpawnUpdate,
134 popComponentEffectDidSpawnUpdate,
· · ·
136 componentEffectEndTime,
137 componentEffectDuration,
138▶ componentEffectErrors,
139 componentEffectSpawnedUpdate,
140} from './ReactProfilerTimer';
· · ·
141import {
142 logComponentRender,
143▶ logComponentErrored,
144 logComponentEffect,
145 logComponentMount,
· · ·
186} from './ReactFiberConfig';
187import {
188▶ captureCommitPhaseError,
189 resolveRetryWakeable,
190 markCommitTimeOfFallback,
+ 61 more matches in this file
8import {
9 CompilerDiagnostic,
10▶ CompilerError,
11 ErrorCategory,
12} from '../CompilerError';
· · ·
11▶ ErrorCategory,
12} from '../CompilerError';
13import {
· · ·
12▶} from '../CompilerError';
13import {
14 BlockId,
· · ·
35 *
36 * ```javascript
37▶ * // ERROR
38 * const ref = useRef();
39 * ref.current;
· · ·
55
56function makeRefId(id: number): RefId {
57▶ CompilerError.invariant(id >= 0 && Number.isInteger(id), {
58 reason: 'Expected identifier id to be a non-negative integer',
59 loc: GeneratedSource,
+ 75 more matches in this file
20
21type CompileSuccess = {kind: 'success'};
22▶type CompileParseError = {kind: 'parse_error'; message: string};
23type CompileErrors = {
24 kind: 'errors';
· · ·
23▶type CompileErrors = {
24 kind: 'errors';
25 errors: Array<{category: string; reason: string; description: string | null}>;
· · ·
24▶ kind: 'errors';
25 errors: Array<{category: string; reason: string; description: string | null}>;
26};
· · ·
25▶ errors: Array<{category: string; reason: string; description: string | null}>;
26};
27type CompileResult = CompileSuccess | CompileParseError | CompileErrors;
· · ·
27▶type CompileResult = CompileSuccess | CompileParseError | CompileErrors;
28
29/**
+ 32 more matches in this file
106 props.children != null
107 ) {
108▶ console.error(
109 'A component is `contentEditable` and contains `children` managed by ' +
110 'React. It is now your responsibility to guarantee that none of ' +
· · ·
128 if (tag === 'form') {
129 if (key === 'formAction') {
130▶ console.error(
131 'You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>.',
132 );
· · ·
137 ) {
138 didWarnFormActionMethod = true;
139▶ console.error(
140 'Cannot specify a encType or method for a form that specifies a ' +
141 'function as the action. React provides those automatically. ' +
· · ·
145 if (props.target != null && !didWarnFormActionTarget) {
146 didWarnFormActionTarget = true;
147▶ console.error(
148 'Cannot specify a target for a form that specifies a function as the action. ' +
149 'The function will always be executed in the same window.',
· · ·
153 } else if (tag === 'input' || tag === 'button') {
154 if (key === 'action') {
155▶ console.error(
156 'You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>.',
157 );
+ 61 more matches in this file
15} from '.';
16import {
17▶ CompilerError,
18 CompilerErrorDetail,
19 ErrorCategory,
· · ·
18▶ CompilerErrorDetail,
19 ErrorCategory,
20} from '../CompilerError';
· · ·
19▶ ErrorCategory,
20} from '../CompilerError';
21import {Environment, ExternalFunction} from '../HIR';
· · ·
20▶} from '../CompilerError';
21import {Environment, ExternalFunction} from '../HIR';
22import {
· · ·
274 );
275 if (assertResult.isErr()) {
276▶ fn.env.recordErrors(assertResult.unwrapErr());
277 }
278 }
+ 62 more matches in this file
10import {
11 CompilerDiagnostic,
12▶ CompilerError,
13 CompilerErrorDetail,
14 ErrorCategory,
· · ·
13▶ CompilerErrorDetail,
14 ErrorCategory,
15} from '../CompilerError';
· · ·
14▶ ErrorCategory,
15} from '../CompilerError';
16import {CompileErrorDetail} from './Options';
· · ·
15▶} from '../CompilerError';
16import {CompileErrorDetail} from './Options';
17import {ExternalFunction, ReactFunctionType} from '../HIR/Environment';
· · ·
16▶import {CompileErrorDetail} from './Options';
17import {ExternalFunction, ReactFunctionType} from '../HIR/Environment';
18import {CodegenFunction} from '../ReactiveScopes';
+ 68 more matches in this file
173 isSuspenseInstancePending,
174 isSuspenseInstanceFallback,
175▶ getSuspenseInstanceFallbackErrorDetails,
176 supportsHydration,
177 supportsResources,
· · ·
183} from './ReactFiberConfig';
184import type {ActivityInstance, SuspenseInstance} from './ReactFiberConfig';
185▶import {shouldError, shouldSuspend} from './ReactFiberReconciler';
186import {
187 pushHostContext,
· · ·
248 claimNextHydratableSuspenseInstance,
249 warnIfHydrating,
250▶ queueHydrationError,
251} from './ReactFiberHydrationContext';
252import {
· · ·
276import {pushCacheProvider, CacheContext} from './ReactFiberCacheComponent';
277import {
278▶ createCapturedValueFromError,
279 createCapturedValueAtFiber,
280} from './ReactCapturedValue';
· · ·
281import {OffscreenVisible} from './ReactFiberOffscreenComponent';
282import {
283▶ createClassErrorUpdate,
284 initializeClassErrorUpdate,
285} from './ReactFiberThrow';
+ 86 more matches in this file
18 TREE_OPERATION_REORDER_CHILDREN,
19 TREE_OPERATION_SET_SUBTREE_MODE,
20▶ TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS,
21 TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
22 TREE_OPERATION_APPLIED_ACTIVITY_SLICE_CHANGE,
· · ·
80 BridgeProtocol,
81} from 'react-devtools-shared/src/bridge';
82▶import UnsupportedBridgeOperationError from 'react-devtools-shared/src/UnsupportedBridgeOperationError';
83import type {DevToolsHookSettings} from '../backend/types';
84
· · ·
125 'React::DevTools::recordChangeDescriptions';
126
127▶type ErrorAndWarningTuples = Array<{id: number, index: number}>;
128
129export type Config = {
· · ·
185 collapseNodesByDefault: [],
186 componentFilters: [],
187▶ error: [Error],
188 hookSettings: [$ReadOnly<DevToolsHookSettings>],
189 hostInstanceSelected: [Element['id'] | null],
· · ·
212 _bridge: FrontendBridge;
213
214▶ // Computed whenever _errorsAndWarnings Map changes.
215 _cachedComponentWithErrorCount: number = 0;
216 _cachedComponentWithWarningCount: number = 0;
+ 130 more matches in this file
917 };
918
919▶ var ErrorBoundary9 = function (x) {
920 if (x === 9) {
921 return FluxContainer_AdsPEBIGAdAccountSelectorContainer_8(8);
· · ·
934 }
935 if (x === 57) {
936▶ return FluxContainer_AdsPETopErrorContainer_35(56);
937 }
938 if (x === 60) {
· · ·
968 };
969
970▶ var AdsErrorBoundary10 = function (x) {
971 if (x === 10) {
972 return ErrorBoundary9(9);
· · ·
972▶ return ErrorBoundary9(9);
973 }
974 if (x === 14) {
· · ·
975▶ return ErrorBoundary9(13);
976 }
977 if (x === 28) {
+ 51 more matches in this file
9//!
10//! This pass uses abstract interpretation to compute effects describing
11▶//! creation, aliasing, mutation, freezing, and error conditions for each
12//! instruction and terminal in the HIR.
13
· · ·
17use react_compiler_diagnostics::CompilerDiagnostic;
18use react_compiler_diagnostics::CompilerDiagnosticDetail;
19▶use react_compiler_diagnostics::ErrorCategory;
20use react_compiler_hir::AliasingEffect;
21use react_compiler_hir::AliasingSignature;
· · ·
170 if iteration_count > 100 {
171 return Err(CompilerDiagnostic::new(
172▶ ErrorCategory::Invariant,
173 "[InferMutationAliasingEffects] Potential infinite loop: \
174 A value, temporary place, or effect was not cached properly",
· · ·
199 .unwrap_or_else(|| "".to_string());
200 // Use usage_loc if available, otherwise fall back to identifier's own loc
201▶ let error_loc = usage_loc.or_else(|| ident_info.and_then(|i| i.loc));
202 // Match TS printPlace format: "<unknown> name$id:type"
203 let type_str = ident_info
· · ·
209 let description = format!("<unknown> {}${}{}", name, uninitialized_id.0, type_str);
210 let diag = CompilerDiagnostic::new(
211▶ ErrorCategory::Invariant,
212 "[InferMutationAliasingEffects] Expected value kind to be initialized",
213 Some(description),
+ 50 more matches in this file
922 };
923
924▶ var ErrorBoundary9 = function (props) {
925 if (props.x === 9) {
926 return React.createElement(
· · ·
946 }
947 if (props.x === 57) {
948▶ return React.createElement(FluxContainer_AdsPETopErrorContainer_35, {
949 x: 56,
950 });
· · ·
989 };
990
991▶ var AdsErrorBoundary10 = function (props) {
992 if (props.x === 10) {
993 return React.createElement(ErrorBoundary9, {x: 9});
· · ·
993▶ return React.createElement(ErrorBoundary9, {x: 9});
994 }
995 if (props.x === 14) {
· · ·
996▶ return React.createElement(ErrorBoundary9, {x: 13});
997 }
998 if (props.x === 28) {
+ 52 more matches in this file
339 // Verify deps, but only on mount to avoid extra checks.
340 // It's unlikely their type would change as usually you define them inline.
341▶ console.error(
342 '%s received a final argument that is not an array (instead, received `%s`). When ' +
343 'specified, the final argument must be an array.',
· · ·
380 }
381
382▶ console.error(
383 'React has detected a change in the order of Hooks called by %s. ' +
384 'This will lead to bugs and errors if not fixed. ' +
· · ·
384▶ 'This will lead to bugs and errors if not fixed. ' +
385 'For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' +
386 ' Previous render Next render\n' +
· · ·
402 didWarnAboutUseFormState.add(componentName);
403
404▶ console.error(
405 'ReactDOM.useFormState has been renamed to React.useActionState. ' +
406 'Please update %s to use React.useActionState.',
· · ·
429 if (!didWarnAboutAsyncClientComponent.has(componentName)) {
430 didWarnAboutAsyncClientComponent.add(componentName);
431▶ console.error(
432 '%s is an async Client Component. ' +
433 'Only Server Components can be async at the moment. This error is often caused by accidentally ' +
+ 88 more matches in this file
252 ? 'tertiary-dark'
253 : 'primary-dark'
254▶ : 'error';
255
256 if (!__DEV__) {
· · ·
373}
374
375▶export function logComponentErrored(
376 fiber: Fiber,
377 startTime: number,
· · ·
378 endTime: number,
379▶ errors: Array<CapturedValue<mixed>>,
380): void {
381 if (supportsUserTiming) {
· · ·
388 let debugTask: ?ConsoleTask = null;
389 const properties: Array<[string, string]> = [];
390▶ for (let i = 0; i < errors.length; i++) {
391 const capturedValue = errors[i];
392 if (debugTask == null && capturedValue.source !== null) {
· · ·
391▶ const capturedValue = errors[i];
392 if (debugTask == null && capturedValue.source !== null) {
393 // If the captured value has a source Fiber, use its debugTask for
+ 82 more matches in this file
51 enqueueModel(json: string): void;
52 close(json: string): void;
53▶ error(error: Error): void;
54}
55
· · ·
66const RESOLVED_MODEL = 'resolved_model';
67const INITIALIZED = 'fulfilled';
68▶const ERRORED = 'rejected';
69
70const __PROTO__ = '__proto__';
· · ·
105 then(resolve: (ReadableStream) => mixed, reject?: (mixed) => mixed): void,
106};
107▶type ErroredChunk<T> = {
108 status: 'rejected',
109 value: null,
· · ·
116 | ResolvedModelChunk<T>
117 | InitializedChunk<T>
118▶ | ErroredChunk<T>;
119
120// $FlowFixMe[missing-this-annot]
· · ·
146 let inspectedValue = chunk.value;
147 // Recursively check if the value is itself a ReactPromise and if so if it points
148▶ // back to itself. This helps catch recursive thenables early error.
149 let cycleProtection = 0;
150 const visited = new Set<typeof ReactPromise>();
+ 99 more matches in this file