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

castValue error #48629

Open
water-cooling opened this issue Jan 13, 2025 · 7 comments
Open

castValue error #48629

water-cooling opened this issue Jan 13, 2025 · 7 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Version Info Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@water-cooling
Copy link

Description

ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:100:12: error: no matching function for call to 'castValue' #

Steps to reproduce

On XCode 16.2, the rn version is 0.72 Debug can run on a real machine. Release will report an error

React Native Version

0.72

Affected Platforms

Other (please specify)

Output of npx react-native info

1.4 GHz 四核Intel Core i5  xcode 16.2

Stacktrace or Logs

Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:100:12: error: no matching function for call to 'castValue'
100 |     return castValue(dynamic_, (T *)nullptr);
|            ^~~~~~~~~
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/build/generated/ios/react/renderer/components/safeareacontext/ShadowNodes.cpp:11:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Private/React-Codegen/react/renderer/components/safeareacontext/ShadowNodes.h:14:
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Private/React-Codegen/react/renderer/components/safeareacontext/Props.h:42:57:  note: in instantiation of function template specialization 'facebook::react::RawValue::operator unordered_map<std::unordered_map<std::string, facebook::react::RawValue>>' requested here
42 |   auto map = (std::unordered_map<std::string, RawValue>)value;
|                                                         ^
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/build/generated/ios/react/renderer/components/safeareacontext/ShadowNodes.cpp:11:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Private/React-Codegen/react/renderer/components/safeareacontext/ShadowNodes.h:14:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Private/React-Codegen/react/renderer/components/safeareacontext/Props.h:12:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/ViewProps.h:10:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/AccessibilityProps.h:11:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/Props.h:14:
In file included from /Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawProps.h:21:
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:209:19:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'RawValue *' for 2nd argument
209 |   static RawValue castValue(
|                   ^
210 |       const folly::dynamic &dynamic,
211 |       RawValue *type) noexcept {
|       ~~~~~~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:215:15:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'bool *' for 2nd argument
215 |   static bool castValue(const folly::dynamic &dynamic, bool *type) {
|               ^                                        ~~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:219:14:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'int *' for 2nd argument
219 |   static int castValue(const folly::dynamic &dynamic, int *type) {
|              ^                                        ~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:223:18:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'int64_t *' (aka 'long long *') for 2nd argument
223 |   static int64_t castValue(const folly::dynamic &dynamic, int64_t *type) {
|                  ^                                        ~~~~~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:227:16:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'float *' for 2nd argument
227 |   static float castValue(const folly::dynamic &dynamic, float *type) {
|                ^                                        ~~~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:231:17:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'double *' for 2nd argument
231 |   static double castValue(const folly::dynamic &dynamic, double *type) {
|                 ^                                        ~~~~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:235:22:  note: candidate function not viable: no known conversion from 'std::unordered_map<std::string, facebook::react::RawValue> *' to 'std::string *' (aka 'basic_string<char> *') for 2nd argument
235 |   static std::string castValue(
|                      ^
236 |       const folly::dynamic &dynamic,
237 |       std::string *type) {
|       ~~~~~~~~~~~~~~~~~
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:242:25:  note: candidate template ignored: could not match 'vector' against 'unordered_map'
242 |   static std::vector<T> castValue(
|                         ^
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:255:38:  note: candidate template ignored: could not match 'vector' against 'unordered_map'
255 |   static std::vector<std::vector<T>> castValue(
|                                      ^
/Volumes/MobileDisk/dahan/project/jim-oa-harmony/PlatformProject/ios/Pods/Headers/Public/React-Fabric/react/renderer/core/RawValue.h:268:38:  note: candidate template ignored: could not match 'F14FastMap' against 'unordered_map'

Reproducer

none

Screenshots and Videos

none

@react-native-bot
Copy link
Collaborator

Warning

Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Jan 13, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@react-native-bot
Copy link
Collaborator

Warning

Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

@water-cooling
Copy link
Author

"react": "18.2.0",
"react-native": "0.72.5",

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jan 13, 2025
@shubhamguptadream11 shubhamguptadream11 added the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label Jan 13, 2025
@react-native-bot
Copy link
Collaborator

Warning

Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@shubhamguptadream11
Copy link
Collaborator

@water-cooling Can you please try to repro this issue on latest react-native version 0.76.x.

@water-cooling
Copy link
Author

@shubhamguptadream11 my project involves HarmonyOS cannot be upgraded to a higher version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Version Info Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

3 participants