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

Error with RN 0.57: java.lang.String cannot be cast to AccessibilityDelegateUtil #597

Closed
farzeni opened this issue Oct 13, 2018 · 10 comments

Comments

@farzeni
Copy link

farzeni commented Oct 13, 2018

Current behaviour

With RN version 0.57, on android, in a new application created with react-native init every component crash the application with the following error:

java.lang.String cannot be cast to com.facebook.react.uimanager.AccessibilityDelegateUtil$AccessibilityRole
setDelegate
    AccessibilityDelegateUtil.java:93
updateViewAccessibility
    BaseViewManager.java:260
onAfterUpdateTransaction
    BaseViewManager.java:266
updateProperties
    ViewManager.java:33
createView
    NativeViewHierarchyManager.java:269
execute
    UIViewOperationQueue.java:200
run
    UIViewOperationQueue.java:888
flushPendingBatches
    UIViewOperationQueue.java:1001
access$2400
    UIViewOperationQueue.java:46
doFrameGuarded
    UIViewOperationQueue.java:1061
doFrame
    GuardedFrameCallback.java:29
doFrame
    ReactChoreographer.java:134
doFrame
    ChoreographerCompat.java:105
run
    Choreographer.java:909
doCallbacks
    Choreographer.java:723
doFrame
    Choreographer.java:655
run
    Choreographer.java:897
handleCallback
    Handler.java:790
dispatchMessage
    Handler.java:99
loop
    Looper.java:164
main
    ActivityThread.java:6494
invoke
    Method.java
run
    RuntimeInit.java:438
main
    ZygoteInit.java:807

Code sample

  • create a new app with react-native init
  • than install react-native-paper with
$ yarn add react-native-paper
$ yarn add react-native-vector-icons
$ react-native link react-native-vector-icons
  • add PaperProvider Component
  • add a Button or AppBar to the main component

Your Environment

software version
android Oreo
react-native 0.57
react-native-paper 2.1.3
node 10.0
npm or yarn 1.10.1
@satya164
Copy link
Member

Maybe a bug in React Native? Related: facebook/react-native#21754

@mshenoy
Copy link

mshenoy commented Oct 14, 2018

Same issue

@RaulCorreia
Copy link

RaulCorreia commented Oct 17, 2018

Same, this happens when I use the Button, as it says in the documentation.
< Button >Ok</ Button >

@HasithaPriyasad
Copy link

same issue

@HasithaPriyasad
Copy link

While this is urgent i use some work around for this
<TouchableOpacity onPress={()=>this.props.navigation.navigate('Signup')}>
Sign up

@Biplovkumar
Copy link

same here in 0.57.3

@satya164
Copy link
Member

It's a bug in React Native 0.57.3. You need to downgrade to 0.57.1 or lower. I'm closing this issue since we can't fix it in paper.

@Biplovkumar
Copy link

Biplovkumar commented Oct 18, 2018

@satya164 Sorry to say u give Proper solution then close any issue.

Ref :- https://stackoverflow.com/questions/52784633/i-have-some-error-when-add-button-to-my-react-native-app

Solution :-

1.delete your node_modules directory (rm -rf node_modules/)
2.npm i -S [email protected] or yarn add [email protected]
3.npm add @babel/runtime or yarn add @babel/runtime
4.npm i [email protected] --save-dev or yarn add [email protected] --save-dev
5.npm i or yarn

@httol
Copy link

httol commented Oct 23, 2018

same issue,i think its a bug

@Trancever
Copy link
Contributor

@httol It's bug in react-native. Check this comment - #597 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants