Skip to content

Commit 5359759

Browse files
committed
Include component name in "async/await is not supported" error message if available (#32435)
DiffTrain build for [22e39ea](22e39ea)
1 parent 920b646 commit 5359759

23 files changed

+117
-102
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.1.0-native-fb-25677265-20250224
1+
19.1.0-native-fb-22e39ea7-20250225

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<51c03329699f31a3dc0e647b87137455>>
10+
* @generated SignedSource<<d74cd5ab55481ade5eb24c64e6575914>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.1.0-native-fb-25677265-20250224";
407+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<d1eb12151ad3ccbcc17e85f7e6ec2f48>>
10+
* @generated SignedSource<<f15bac883ab529ea438c8353023f4abc>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-25677265-20250224";
206+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<d1eb12151ad3ccbcc17e85f7e6ec2f48>>
10+
* @generated SignedSource<<f15bac883ab529ea438c8353023f4abc>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-25677265-20250224";
206+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<bbcc4f3ba4aa817fbbc852bf084e8add>>
10+
* @generated SignedSource<<1fd06ffcb012198fdeab97d6068359ab>>
1111
*/
1212

1313
/*
@@ -5285,7 +5285,7 @@ __DEV__ &&
52855285
100 < thenableState.shellSuspendCounter
52865286
)
52875287
throw Error(
5288-
"async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
5288+
"An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
52895289
);
52905290
thenableState = thenable;
52915291
thenableState.status = "pending";
@@ -5485,7 +5485,10 @@ __DEV__ &&
54855485
didWarnAboutAsyncClientComponent.has(nextRenderLanes) ||
54865486
(didWarnAboutAsyncClientComponent.add(nextRenderLanes),
54875487
console.error(
5488-
"async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
5488+
"%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
5489+
null === nextRenderLanes
5490+
? "An unknown Component"
5491+
: "<" + nextRenderLanes + ">"
54895492
));
54905493
workInProgress.memoizedState = null;
54915494
workInProgress.updateQueue = null;
@@ -25883,11 +25886,11 @@ __DEV__ &&
2588325886
};
2588425887
(function () {
2588525888
var isomorphicReactPackageVersion = React.version;
25886-
if ("19.1.0-native-fb-25677265-20250224" !== isomorphicReactPackageVersion)
25889+
if ("19.1.0-native-fb-22e39ea7-20250225" !== isomorphicReactPackageVersion)
2588725890
throw Error(
2588825891
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2588925892
(isomorphicReactPackageVersion +
25890-
"\n - react-dom: 19.1.0-native-fb-25677265-20250224\nLearn more: https://react.dev/warnings/version-mismatch")
25893+
"\n - react-dom: 19.1.0-native-fb-22e39ea7-20250225\nLearn more: https://react.dev/warnings/version-mismatch")
2589125894
);
2589225895
})();
2589325896
("function" === typeof Map &&
@@ -25924,10 +25927,10 @@ __DEV__ &&
2592425927
!(function () {
2592525928
var internals = {
2592625929
bundleType: 1,
25927-
version: "19.1.0-native-fb-25677265-20250224",
25930+
version: "19.1.0-native-fb-22e39ea7-20250225",
2592825931
rendererPackageName: "react-dom",
2592925932
currentDispatcherRef: ReactSharedInternals,
25930-
reconcilerVersion: "19.1.0-native-fb-25677265-20250224"
25933+
reconcilerVersion: "19.1.0-native-fb-22e39ea7-20250225"
2593125934
};
2593225935
internals.overrideHookState = overrideHookState;
2593325936
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26071,5 +26074,5 @@ __DEV__ &&
2607126074
listenToAllSupportedEvents(container);
2607226075
return new ReactDOMHydrationRoot(initialChildren);
2607326076
};
26074-
exports.version = "19.1.0-native-fb-25677265-20250224";
26077+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";
2607526078
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<01cb7f4be4df5102154afb4d247509e9>>
10+
* @generated SignedSource<<caa343da4890ccbfdf3de26c436929bc>>
1111
*/
1212

1313
/*
@@ -16001,14 +16001,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1600116001
};
1600216002
var isomorphicReactPackageVersion$jscomp$inline_1785 = React.version;
1600316003
if (
16004-
"19.1.0-native-fb-25677265-20250224" !==
16004+
"19.1.0-native-fb-22e39ea7-20250225" !==
1600516005
isomorphicReactPackageVersion$jscomp$inline_1785
1600616006
)
1600716007
throw Error(
1600816008
formatProdErrorMessage(
1600916009
527,
1601016010
isomorphicReactPackageVersion$jscomp$inline_1785,
16011-
"19.1.0-native-fb-25677265-20250224"
16011+
"19.1.0-native-fb-22e39ea7-20250225"
1601216012
)
1601316013
);
1601416014
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16030,10 +16030,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1603016030
};
1603116031
var internals$jscomp$inline_2245 = {
1603216032
bundleType: 0,
16033-
version: "19.1.0-native-fb-25677265-20250224",
16033+
version: "19.1.0-native-fb-22e39ea7-20250225",
1603416034
rendererPackageName: "react-dom",
1603516035
currentDispatcherRef: ReactSharedInternals,
16036-
reconcilerVersion: "19.1.0-native-fb-25677265-20250224"
16036+
reconcilerVersion: "19.1.0-native-fb-22e39ea7-20250225"
1603716037
};
1603816038
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1603916039
var hook$jscomp$inline_2246 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16137,4 +16137,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1613716137
listenToAllSupportedEvents(container);
1613816138
return new ReactDOMHydrationRoot(initialChildren);
1613916139
};
16140-
exports.version = "19.1.0-native-fb-25677265-20250224";
16140+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<adef006cb441cc02304ead4f4f4a7f01>>
10+
* @generated SignedSource<<eaf75657794691164bcac5ed251d38ee>>
1111
*/
1212

1313
/*
@@ -16651,14 +16651,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1665116651
};
1665216652
var isomorphicReactPackageVersion$jscomp$inline_1880 = React.version;
1665316653
if (
16654-
"19.1.0-native-fb-25677265-20250224" !==
16654+
"19.1.0-native-fb-22e39ea7-20250225" !==
1665516655
isomorphicReactPackageVersion$jscomp$inline_1880
1665616656
)
1665716657
throw Error(
1665816658
formatProdErrorMessage(
1665916659
527,
1666016660
isomorphicReactPackageVersion$jscomp$inline_1880,
16661-
"19.1.0-native-fb-25677265-20250224"
16661+
"19.1.0-native-fb-22e39ea7-20250225"
1666216662
)
1666316663
);
1666416664
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16680,10 +16680,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1668016680
};
1668116681
var internals$jscomp$inline_1887 = {
1668216682
bundleType: 0,
16683-
version: "19.1.0-native-fb-25677265-20250224",
16683+
version: "19.1.0-native-fb-22e39ea7-20250225",
1668416684
rendererPackageName: "react-dom",
1668516685
currentDispatcherRef: ReactSharedInternals,
16686-
reconcilerVersion: "19.1.0-native-fb-25677265-20250224",
16686+
reconcilerVersion: "19.1.0-native-fb-22e39ea7-20250225",
1668716687
getLaneLabelMap: function () {
1668816688
for (
1668916689
var map = new Map(), lane = 1, index$294 = 0;
@@ -16802,4 +16802,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1680216802
listenToAllSupportedEvents(container);
1680316803
return new ReactDOMHydrationRoot(initialChildren);
1680416804
};
16805-
exports.version = "19.1.0-native-fb-25677265-20250224";
16805+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6b42bf9935c83b1829de9d35d79e0003>>
10+
* @generated SignedSource<<4ef9266a7f19a05d7079f6abf92caa6e>>
1111
*/
1212

1313
/*
@@ -5293,7 +5293,7 @@ __DEV__ &&
52935293
100 < thenableState.shellSuspendCounter
52945294
)
52955295
throw Error(
5296-
"async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
5296+
"An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
52975297
);
52985298
thenableState = thenable;
52995299
thenableState.status = "pending";
@@ -5493,7 +5493,10 @@ __DEV__ &&
54935493
didWarnAboutAsyncClientComponent.has(nextRenderLanes) ||
54945494
(didWarnAboutAsyncClientComponent.add(nextRenderLanes),
54955495
console.error(
5496-
"async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
5496+
"%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
5497+
null === nextRenderLanes
5498+
? "An unknown Component"
5499+
: "<" + nextRenderLanes + ">"
54975500
));
54985501
workInProgress.memoizedState = null;
54995502
workInProgress.updateQueue = null;
@@ -25944,11 +25947,11 @@ __DEV__ &&
2594425947
};
2594525948
(function () {
2594625949
var isomorphicReactPackageVersion = React.version;
25947-
if ("19.1.0-native-fb-25677265-20250224" !== isomorphicReactPackageVersion)
25950+
if ("19.1.0-native-fb-22e39ea7-20250225" !== isomorphicReactPackageVersion)
2594825951
throw Error(
2594925952
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2595025953
(isomorphicReactPackageVersion +
25951-
"\n - react-dom: 19.1.0-native-fb-25677265-20250224\nLearn more: https://react.dev/warnings/version-mismatch")
25954+
"\n - react-dom: 19.1.0-native-fb-22e39ea7-20250225\nLearn more: https://react.dev/warnings/version-mismatch")
2595225955
);
2595325956
})();
2595425957
("function" === typeof Map &&
@@ -25985,10 +25988,10 @@ __DEV__ &&
2598525988
!(function () {
2598625989
var internals = {
2598725990
bundleType: 1,
25988-
version: "19.1.0-native-fb-25677265-20250224",
25991+
version: "19.1.0-native-fb-22e39ea7-20250225",
2598925992
rendererPackageName: "react-dom",
2599025993
currentDispatcherRef: ReactSharedInternals,
25991-
reconcilerVersion: "19.1.0-native-fb-25677265-20250224"
25994+
reconcilerVersion: "19.1.0-native-fb-22e39ea7-20250225"
2599225995
};
2599325996
internals.overrideHookState = overrideHookState;
2599425997
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26448,7 +26451,7 @@ __DEV__ &&
2644826451
exports.useFormStatus = function () {
2644926452
return resolveDispatcher().useHostTransitionStatus();
2645026453
};
26451-
exports.version = "19.1.0-native-fb-25677265-20250224";
26454+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";
2645226455
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2645326456
"function" ===
2645426457
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<f5c7ce3a6ff38e41c62f937d719b86b3>>
10+
* @generated SignedSource<<98df410b2f1c59df92b77d1a9e0d1142>>
1111
*/
1212

1313
/*
@@ -16012,14 +16012,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1601216012
};
1601316013
var isomorphicReactPackageVersion$jscomp$inline_1786 = React.version;
1601416014
if (
16015-
"19.1.0-native-fb-25677265-20250224" !==
16015+
"19.1.0-native-fb-22e39ea7-20250225" !==
1601616016
isomorphicReactPackageVersion$jscomp$inline_1786
1601716017
)
1601816018
throw Error(
1601916019
formatProdErrorMessage(
1602016020
527,
1602116021
isomorphicReactPackageVersion$jscomp$inline_1786,
16022-
"19.1.0-native-fb-25677265-20250224"
16022+
"19.1.0-native-fb-22e39ea7-20250225"
1602316023
)
1602416024
);
1602516025
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16041,10 +16041,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1604116041
};
1604216042
var internals$jscomp$inline_2248 = {
1604316043
bundleType: 0,
16044-
version: "19.1.0-native-fb-25677265-20250224",
16044+
version: "19.1.0-native-fb-22e39ea7-20250225",
1604516045
rendererPackageName: "react-dom",
1604616046
currentDispatcherRef: ReactSharedInternals,
16047-
reconcilerVersion: "19.1.0-native-fb-25677265-20250224"
16047+
reconcilerVersion: "19.1.0-native-fb-22e39ea7-20250225"
1604816048
};
1604916049
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1605016050
var hook$jscomp$inline_2249 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16302,4 +16302,4 @@ exports.useFormState = function (action, initialState, permalink) {
1630216302
exports.useFormStatus = function () {
1630316303
return ReactSharedInternals.H.useHostTransitionStatus();
1630416304
};
16305-
exports.version = "19.1.0-native-fb-25677265-20250224";
16305+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<72a2d13439397c8e49d0851c20b7d541>>
10+
* @generated SignedSource<<a9b7f69ac62d9793c4cb5f5098ad9074>>
1111
*/
1212

1313
/*
@@ -16666,14 +16666,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1666616666
};
1666716667
var isomorphicReactPackageVersion$jscomp$inline_1881 = React.version;
1666816668
if (
16669-
"19.1.0-native-fb-25677265-20250224" !==
16669+
"19.1.0-native-fb-22e39ea7-20250225" !==
1667016670
isomorphicReactPackageVersion$jscomp$inline_1881
1667116671
)
1667216672
throw Error(
1667316673
formatProdErrorMessage(
1667416674
527,
1667516675
isomorphicReactPackageVersion$jscomp$inline_1881,
16676-
"19.1.0-native-fb-25677265-20250224"
16676+
"19.1.0-native-fb-22e39ea7-20250225"
1667716677
)
1667816678
);
1667916679
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16695,10 +16695,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1669516695
};
1669616696
var internals$jscomp$inline_1888 = {
1669716697
bundleType: 0,
16698-
version: "19.1.0-native-fb-25677265-20250224",
16698+
version: "19.1.0-native-fb-22e39ea7-20250225",
1669916699
rendererPackageName: "react-dom",
1670016700
currentDispatcherRef: ReactSharedInternals,
16701-
reconcilerVersion: "19.1.0-native-fb-25677265-20250224",
16701+
reconcilerVersion: "19.1.0-native-fb-22e39ea7-20250225",
1670216702
getLaneLabelMap: function () {
1670316703
for (
1670416704
var map = new Map(), lane = 1, index$294 = 0;
@@ -16971,7 +16971,7 @@ exports.useFormState = function (action, initialState, permalink) {
1697116971
exports.useFormStatus = function () {
1697216972
return ReactSharedInternals.H.useHostTransitionStatus();
1697316973
};
16974-
exports.version = "19.1.0-native-fb-25677265-20250224";
16974+
exports.version = "19.1.0-native-fb-22e39ea7-20250225";
1697516975
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1697616976
"function" ===
1697716977
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)