-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
java.lang.String cannot be cast to com.facebook.react.uimanager.AccessibilityDelegateUtil$AccessibilityRole - on 0.57.3 #21754
Comments
Same !! |
Same issue. Please find issue posted in SO |
Same !! Why ??????????????????????????????????????????? {
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.5.0",
"react-native": "^0.57.3"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.48.1",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
} |
same !! please fix it :( |
same!!!!! |
1 similar comment
same!!!!! |
Same here, in my case it occurs when I want to use Environment
|
Okay, i take a look on source code Button, and AccessibilityRole is using string, maybe this code outdated maybe currently the type is needed is enum AccessibilityRole so for you guys using component Button I suggest change to Touchable component. |
Here come the reproduction repo, and a potential fix. Environment
DescriptionReact native crash with the following (native) stack trace under Android:
Reproducible DemoBuild and run this application on Android: https://github.com/peat-psuwit/react-native-button-crash-demo Additional infoFrom stack trace and |
Turns out, it happens because incomplete cherry-pick from master. Branch 0.57-stable (which I believe is where 0.57.x releases are cut from) has d3f2f96 cherry-picked (which becomes 677f1de) along with a few accessibility commits without its pre-requisites, 139559f and 1f96ff6. https://github.com/peat-psuwit/react-native/tree/0.57-stable_android-accessibility-role_v2 contains my attempt to cherry-pick those commits. I have to revert an incorrect attempt to "Update bad method", then cherry-pick 2 aforementioned commits. I've tested this branch with my reproduction repository in the previous comment and it doesn't crash. So, I guess that should fix this bug. However, I haven't run a full test yet. And I guess I'm not supposed to send a PR to a stable branch, am I? |
How do I go about the changes please? |
@peat-psuwit "And I guess I'm not supposed to send a PR to a stable branch, am I?" Especially if a cherry pick messed up master I'd merge the fix only with master, nothing else. I'm experiencing this issue too, please if you could, merge it asap as it would make me able to finish something I'm working on for work. |
Temporary workaround found: https://github.com/xotahal/react-native-material-ui/blob/master/docs/Button.md Just tested their buttons out and they work |
I was using a |
Thanks @peat-psuwit for the detailed explanation, we'll cherry pick those two commits in the next 0.57.4 to fix this. @grabbou I think this was related to your local commit 1592a8d, can you confirm? 🤔 |
While 0.57.4 is not released, could someone post a patch diff here, so people like me can monkey-patch 0.57.3 with |
Same issue when adding title to Button. |
Is there a way for me to locally roll back to an earlier version of the package to get past the error? edit: https://stackoverflow.com/a/52796919/2152216 helped me roll back |
here is workaround if have no time to wait when "ninjas" fix their odd work
|
Same issue |
Thanks, it works! |
Same issue for project created with
|
The workaround of @denisviklov was resolving my headache ;) |
We need the update 0.57.4 ... |
It was working for a short period of time, now I am facing the same issue again - with the previously working solution. It's super frustrating! I hope v0.57.4 is coming soon!!! |
Yeah ... RN is so instable ... RN dev spend more time fixing bugs than properly coding |
same here in new app which is created by react native init. |
This comment has been minimized.
This comment has been minimized.
Same here. Try to upgrade Hope fix will be landed soon. 😦
|
thanks @denisviklov, really nice, its working. |
@merbin2012 ,many errors in 0.57.3 so u need to downgrade 0.57.1 Solution :- 1.delete your node_modules directory (rm -rf node_modules/) |
I agree with the others that: The library is not stable if the default template doesn't work. My thoughts on this are it might be easier for stability the components are in their own repository too, and maybe it's an idea to write tests for all the components, to make sure running Renders something, then if the test fails the CI rejects the build from being merged with master. (it should prevent this happening in future too) It would mean showstoppers, e.g. components not working could be patched quicker, than the run-time library or vice versa (hot-fixes) and the original developers could focus on making the basics work then fix the crash bugs in the run-time. Right now: (these figures are rough estimates) It means that the open source community could focus on fixing lots of layout/components. Which could potentially mean less work for them, because JS developers can handle the non-native device side of things, without having the hassle of building the library. this is very useful if you have multiple run-time versions (stable, testing and beta) I'd like react to sort this out as I think they're overwhelmed by all the issues they are having, it's actually an okay problem to have as it means their library is getting used. I think writing tests for the CI should be a must especially when the default template doesn't work. Just sharing my two cents here as it helped a lot back when I worked on collaborative development work. Anyway, thanks to the react team for actually releasing React Native, and I hope they get this sorted soon. TL;DR: Write tests please for all the components and don't let a release be sent to clients without a pass, make sure there is a test for every example from the documentation (implementation based and coverage based testing). Perhaps seperate the components into their own repository too, to seperate layout problems vs runtime issues Sorry for the wall of text 👍 |
This comment has been minimized.
This comment has been minimized.
Ok this issue is clearly getting out of hand so I'll lock it. We test the releases before rolling out, and I would like to remember everyone that this is an Open Source project. The first way you can fix things is by submitting PRs to resolve your issues or fork it. You are entitled to the support that you pay for, and that's zero. Being harsh has only the effect of making feel bad the people that spend their free time helping with this project. |
0.57.5 fix this issue, please upgrade. |
Environment
Description
Dependencies
The text was updated successfully, but these errors were encountered: