Giter VIP home page Giter VIP logo

Comments (11)

nkalupahana avatar nkalupahana commented on May 28, 2024

Are you able to reproduce this issue at all with the example app in the example/ folder?

Without a reproduction, I'm not sure where to go with this. The one thing I can think of though is that this is an EACESS issue on the Downloads folder. The Downloads folder is used when you're getting an image from a URL as a staging location. The image is then moved into the album and deleted from Downloads. It's possible that if you're running two downloads on the same URL in quick succession, Android is having some sort of issue with the file getting deleted and re-created. Just a thought -- feel free to provide any evidence for or against that.

from media.

edshkliaruk avatar edshkliaruk commented on May 28, 2024

@nkalupahana I will check this in example folder later and let you know what the result will be.

I am not sure, if it's problem with Android restriction of moving and removing images. Because, it's reproducible when I open an app at the first time and try to download gif or image and It can be crashed.

But, the interesting thing, this is crashed only with savePhoto, saveGif, saveVideo inside. getAlbum works correctly. Also I was trying to change album name, but it doesn't work.

from media.

nkalupahana avatar nkalupahana commented on May 28, 2024

If it's on first open, it's likely a configuration issue, unless there's something wrong with your device specifically. Let me know what happens with the example app and we can take it from there.

from media.

edshkliaruk avatar edshkliaruk commented on May 28, 2024

@nkalupahana hello, I checked out example in https://github.com/capacitor-community/media and faced with the same issue:
Screenshot 2023-09-16 at 13 34 40

As a result - app is crashed.

from media.

nkalupahana avatar nkalupahana commented on May 28, 2024

Hm, okay. Seems like an issue with your device specifically.

  • Could you share your device model and OS version?
  • With the example app, does it also only crash on the first save of an image? Is that the first save of any image (and then it works for any other image), or for the first time for any image/video from the Internet?
  • If you save from base64, does the error occur?
  • How much storage does your phone have left?

from media.

edshkliaruk avatar edshkliaruk commented on May 28, 2024

@nkalupahana
Yeah of course.

  1. Xiaoma Mi 11 Lite. Android version: 12 SKQ1.210908.001
  2. I haven't reproduced it at once. If you download several files from internet and base64 or video, eventually it will happend.
  3. I haven't tested this specific case (will do this later)
  4. I have 64GB (occupied 30.3 GB)

from media.

edshkliaruk avatar edshkliaruk commented on May 28, 2024

Is it possible to catch an error not to crash application? if it's difficult to resolve.

from media.

ericcch avatar ericcch commented on May 28, 2024

@edshkliaruk I have the same error, fixed it by adding android:requestLegacyExternalStorage="true" in AndroidManifest.xml

<application
    android:requestLegacyExternalStorage="true"
    android:allowBackup="true"
    ....

from media.

edshkliaruk avatar edshkliaruk commented on May 28, 2024

@ericcch I added this param in AndroidManifest.xml but It didn't help me.

from media.

nkalupahana avatar nkalupahana commented on May 28, 2024

Crash is now caught in 5.3.0.

from media.

edshkliaruk avatar edshkliaruk commented on May 28, 2024

@nkalupahana thank you so much)

from media.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.