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

Picker not responding to document selection on iOS 13 #246

Closed
spbriggs opened this issue Oct 5, 2019 · 21 comments
Closed

Picker not responding to document selection on iOS 13 #246

spbriggs opened this issue Oct 5, 2019 · 21 comments

Comments

@spbriggs
Copy link

spbriggs commented Oct 5, 2019

I have an app which works perfectly when running on an iOS 12 device but the exact same build fails on iOS 13 Simulator (I don't have an iOS 13 device to test on)

On iOS 13 the UIDocumentPickerViewController appears fine, I can navigate through folders OK but when I tap on a particular file nothing happens. No error message, nothing I can see in the logs.

I have iCloud capability as per attachment
Screenshot 2019-10-05 at 13 33 21

React Native code is just as below:

const res = await DocumentPicker.pick({
     });

XCode v11.0 (also tried with 11.1 GM Seed) used for both iOS 12 and 13 tests

@spbriggs
Copy link
Author

spbriggs commented Oct 5, 2019

Possibly same issue as #242

@spbriggs
Copy link
Author

spbriggs commented Oct 5, 2019

After playing around in the XCode debugger I can see this error message:

[DocumentManager] tried to call delegate -documentBrowser:didPickDocumentURLs: with an empty array of items. This indicates the items failed to be prepared and materialized on disk:

@edward-whittle
Copy link

I'm having the exact same issue that @spbriggs has, nothing happens when a document is selected in the browser.
The error message in the XCode debugger is when pickMultiple is used, nothing is printed in the console when pick is used.

@spbriggs
Copy link
Author

spbriggs commented Oct 7, 2019

@edward-whittle is this happening for you in the simulator or on a physical device?

@edward-whittle
Copy link

@spbriggs This is on the simulator using iOS 13. The implementation works fine when using iOS 12.2 on the simulator though.

@DanielBoening
Copy link

any news on this issue? We have the same problem with iOS 13 simulator. Physical devices have the same error.

@vmark99
Copy link

vmark99 commented Oct 25, 2019

Any help please? It doesn't work on iOS. Tried with a fresh react native 0.61 project with no other dependencies, on iOS 12.1, 12.2, 13. The file picker pops up, then there is no response or error when selecting a file.

@spbriggs
Copy link
Author

After spending the whole day trying to debug this I think I've finally tracked this down to a bug related to using XCode on macOS Mojave.

I set up a pure objective-c project in XCode (no React Native) with just a button to open a UIDocumentPickerViewController and hit a breakpoint when the didPickDocumentURLs function is called. I got the same behaviour as described in this bug ie the picker opened but the didPickDocumentURLs was never called.

Googling around I arrived here : https://stackoverflow.com/a/58091995 . I followed the same steps as the stackoverflow poster, setting up a macOS Catalina virtual machine, installed XCode and ran my toy project again. This time it worked perfectly, hitting the breakpoint with the file URL passed in.

Am I right in thinking that the other people reporting this bug are also on macOS Mojave?

@cdunkel
Copy link

cdunkel commented Oct 30, 2019

@spbriggs I'm having this issue with Xcode 10 builds in Mojave. I haven't tried Xcode 11 - I was waiting to update until after I'm through a big RN upgrade. As stated above, the document picker works fine in iOS 12.x on the sim, but has issues while running on my physical iOS 13 device.

So is the current thinking that upgrading to Catalina will fix it?

@spbriggs
Copy link
Author

@cdunkel I wouldn't say that it is "the current thinking" at the moment. It resolved my problem but yours might be different. I don't have an iOS 13 device so I was only using the simulator.

Of course, if you try Mojave and it fixes your problem please post here to let people know.

@cdunkel
Copy link

cdunkel commented Oct 31, 2019

I just spoke with one of our testers and she experienced no issues with the document picker while testing on an iPhone 7 and iPad running 13.1.3. I also just went back and re-tested on my iPhone X - which was the device on which the issue was first noticed - and I'm not seeing the problem anymore. It's also running iOS 13.1.3. All of the builds I've tested were built in Xcode 10 on Mojave.

I don't see anything in their release notes, but it's possible that this was addressed in a recent iOS update.

Can people verify what version(s) of iOS they're seeing this on?

Update: I was able to replicate the issue on iOS 13.1.3 after all, but only when attempting to select .docx files first. If I tried to select a different file type (.png, .pdf, etc) then I didn't have an issue.

@DanielBoening
Copy link

Experiencing issue with the following setup:
Mojave 10.14.5
XCode 11.1
iPhone 6s with iOS 13.0 (physical device)
iPhone X with iOS 13.1 (simulator)

@cdunkel
Copy link

cdunkel commented Oct 31, 2019

@DanielBoening, is there any way you could test with a simulator running 13.1.3 or 13.2?

@DanielBoening
Copy link

@cdunkel
No sorry. I cannot select those simulator runtimes in XCode. I think they are only available after upgrading to Catalina which I cannot do yet.

@cdunkel
Copy link

cdunkel commented Oct 31, 2019

Something else to test: what kind of docs are being attempting to select? In my testing I've seen the issue in apps build on both Mojave and Catalina, but I don't seem to have any issues when selecting images, PDFs, gifs, etc, but if I try to select a docx file it won't work. After one failed selection I can't select anything new without tapping it multiple times, even to navigate into a folder.

@Elyx0
Copy link
Collaborator

Elyx0 commented Jan 15, 2020

If anyone finds the issue and opens a PR, that would be really neat, I can't focus on this at all right now.

@ShavaShav
Copy link

This issue appears to still be present. Picker works on Android, but on iOS the promise is never resolved when files are picked - the spinner just spins. I've tried downgrading to 2.0.0 with no success. I've never worked with NativeModule before or I would attempt a fix.

@e3bmo3ty
Copy link

same on catalina / RN 61.3 / ios 13 / xcode 11.0 :( ..... any fix ?

@e3bmo3ty
Copy link

confirmed updated to xcode 11.3.1 & simulator iOS 11.3 is fix the issue

@Hermanyo
Copy link

Hermanyo commented Mar 7, 2021

In my case, I found this issue when I put Document Picker trigger in react-native-raw-bottom-sheet.
I guess that the issue have relation to show multiple modals at the same time

@vonovak
Copy link
Collaborator

vonovak commented Aug 19, 2021

hello, based on #246 (comment) and #246 (comment)

I'm assuming this is a bug we have no control over because it happens without this package too, and it likely was fixed at some point by apple. Please open a new issue if you still experience this, thank you! 🙂

@vonovak vonovak closed this as completed Aug 19, 2021
@react-native-documents react-native-documents locked as resolved and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants