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

bug: File picker error on IOS (Failed to associate thumbnails for picked URL) #396

Open
5 of 31 tasks
AvniAnay opened this issue Jan 21, 2025 · 4 comments
Open
5 of 31 tasks

Comments

@AvniAnay
Copy link

AvniAnay commented Jan 21, 2025

Plugin(s)

  • Android Foreground Service
  • Android Battery Optimization
  • App Review
  • App Shortcuts
  • App Update
  • Background Task
  • Badge
  • Bluetooth Low Energy
  • Cloudinary
  • Datetime Picker
  • File Compressor
  • File Opener
  • File Picker
  • Live Update
  • Managed Configurations
  • NFC
  • Photo Editor
  • Posthog
  • Printer
  • Screen Orientation
  • Screenshot
  • Speech Recognition
  • Speech Synthesis
  • Torch
  • Zip

Version

5.3.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

File picker works fine on web and android but on IOS its throwing below error when selecting any 'image/png', 'image/jpeg', 'application/pdf' files. This error is from simulator running IOS 17 but getting the same error on real device too. I have tested it on IOS 15/16 simulators, getting the same error.

Failed to associate thumbnails for picked URL file:///Users/abhi/Library/Developer/CoreSimulator/Devices/77AADAD7-F7A5-4729-B531-0B932B65C706/data/Containers/Data/Application/CA959BDB-3282-47CD-A7AD-A38E567BF9C4/Documents/receipt_2024-12-26.pdf with the Inbox copy file:///Users/abhi/Library/Developer/CoreSimulator/Devices/77AADAD7-F7A5-4729-B531-0B932B65C706/data/Containers/Data/Application/CA959BDB-3282-47CD-A7AD-A38E567BF9C4/tmp/com.app.fitness-Inbox/receipt_2024-12-26.pdf: Error Domain=QLThumbnailErrorDomain Code=102 "(null)" UserInfo={NSUnderlyingError=0x600000ce8ae0 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found" UserInfo={NSDescription=Generation not found}}}

Expected behavior

It should select the file without any errors.

Reproduction

https://github.com/capawesome-team/capacitor-plugins/tree/main/packages/file-picker

Steps to reproduce

  1. Using the same code snippet used as example in file picker repo:
try {
const result: any = await FilePicker.pickFiles({
        types: ['image/png', 'image/jpeg', 'application/pdf'],
        multiple: false,
      });
      const file = result.files[0];
}catch (err) {
      if (err instanceof Error) {
        this.utilityService.showToast(err.message, 'toast-card-red');
      }
    }
  1. Weird thing is , this error is not even caught as error. Xcode logs shows this error but application doesn't throw any error and file variable remains undefined.

Other information

I have tried using @capawesome/capacitor-file-picker 6.2.0 but still got the same error.

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 7.0.1
@capacitor/core: 7.0.1
@capacitor/android: 7.0.1
@capacitor/ios: 7.0.1

Installed Dependencies:

@capacitor/cli: 5.2.3
@capacitor/core: 5.2.3
@capacitor/ios: 5.2.3
@capacitor/android: 5.2.3

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@AvniAnay AvniAnay added bug/fix Something isn't working needs: triage labels Jan 21, 2025
@robingenz
Copy link
Member

Thank you for your request. Please try it again with the latest plugin version. We might have already fixed this issue.

@AvniAnay
Copy link
Author

I have tried using @capawesome/capacitor-file-picker 6.2.0 but still getting the same error @robingenz

@robingenz
Copy link
Member

Alright, in this case please provide a Minimal, Reproducible Example using this template in a public GitHub repository so I can debug the issue.

Copy link
Contributor

This issue has been labeled as needs: reproduction. This label is added to issues that need a code reproduction.

Please provide a Minimal, Reproducible Example using this template in a public GitHub repository so we can debug the issue.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for us to reproduce the issue.

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

No branches or pull requests

2 participants