-
Notifications
You must be signed in to change notification settings - Fork 167
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
The specified child already has a parent. You must call removeView() on the child's parent first. #39
The specified child already has a parent. You must call removeView() on the child's parent first. #39
Comments
Had a similar problem when using the navigator to swap a new pdf view on top of an old one. For mine, the path was stored in state and render() returned a fetching message (instead of a pdfview) if the path was unset. I can't say too much about why rendering a new PDF view on top of an old one seems to be problematic, but manually setting the path to null and delaying the navigation until after a rerender (promises, timeouts) all get me around this issue. |
Indeed some delay fixed that issue. Thanks a lot 👍 Unfortunately I dont know much about the native part (android) to fix the internal issue. So I think this issue should remain opened. |
How did you implement the delay to make this work? I keep running into this issue. |
@KristoferEng I implemented a simple hack adding some timeout while reseting the pdfPath value from my state. I was getting this error in my
However, it seems this bug has already been fixed. So it'd be better if @cnjon could release a new version with these last fixes.. 😄 |
I'm also running into this issue, is there a patch with this bug fix you mentioned? |
@Traviskn if you pull the latest code from the repo (e.g. replace the version number in your package json with the repository url) it should be resolved |
|
Thanks, I'll give that a shot! |
Unfortunately even using the latest version |
Hi I'm using PDFView as a redux router component in an Scene <Scene key={"pdfViewer"} component={PdfViewer} /> when I open a PDF the first time everything is OK, but when a try to open a new PDF in the same Scene i get the error, the Pdf name is different every time that i try to open it. Any idea what is causing it?
Thanks in advance |
fixes cnjon#39 Always returning a new view instance prevents crashing when multiple PDFViews are rendered.
Was this issue solved? I have a pdfView within a screen and am trying to fullscreen the pdf on touch, however I get this same error 'specified child already has a parent. You must call removeView() on the child's parent first' |
I had the same issue using react-native-router-flux: every time I came back to a tab that contained a PDF the app would show this message. Then I had to actually remove the PDFView when the path was
|
My page something like that |
this solved this issue for me right away, although I spent some significant time trying other solutions I found for it. Thank you! |
I'm getting this error when I rerender any PDF file on Android.
Any idea what might be causing it?
Thanks
The text was updated successfully, but these errors were encountered: