Object entries requires that input parameter not be null or undefined
aasuparekh1 opened this issue · comments
Issue Description
Error: Object.entries requires that input parameter not be null or undefined
Steps to Reproduce / Code Snippets
import React from 'react'
import { StyleSheet, View, Text,Dimensions } from 'react-native'
import PDFReader from 'rn-pdf-reader-js'
export default class App extends React.Component {
render() {
return (
<PDFReader
source={{
uri: 'https://pmkusum.hareda.gov.in/Site Survey Form.pdf',
}}
webviewProps={{
startInLoadingState: true,
}}
/>
)
}
}
const styles = StyleSheet.create({
container: {
paddingTop: 30,
flex: 1,
},
imageContainer: {
flex: 1,
width: Dimensions.get("window").width,
height: Dimensions.get("window").height,
},
})
Expected Results
open pdf in pdf viewer
Additional Information
- Nodejs version: v18.17.0
- React version: 0.72.4
- expo version: 49.0.10
- rn-pdf-reader-js version: ^4.1.1
- react-native-webview: ^13.6.0
- Platform(s) (iOS, Android, or both?): Android
Had the same issue after upgrading to expo SDK49. I am not sure if this is the best approach, but after downgrading react-native-webview
in my case back to 11.23.1
it works again. However, it is not the recommended version by expo.
Checkout the comment to make it resolve.
Had the same issue after upgrading to expo SDK49. I am not sure if this is the best approach, but after downgrading
react-native-webview
in my case back to11.23.1
it works again. However, it is not the recommended version by expo.
但是在IOS ,不行
try this to resolve:
import PDFReader, { Props } from 'rn-pdf-reader-js'
class MyPDFReader extends PDFReader {
constructor(props: Props | Readonly<Props>) {
super(props);
this.state = { ...this.state, renderedOnce: true };
}
}
....
return (
<MyPDFReader
source={{ uri: uri }}
....
/>
)