[pasteboard] Copying image to clipboard throws PlatformException on Android
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- android, flutter
- Domain
- documentation
Research direction
The Android setup is described in README.md and uses provider_paths.xml with AndroidManifest.xml; start by comparing the documented paths with the failing Android 15 setup. Update the setup documentation to cover the required cache path, then verify that Pasteboard.writeImage copies an image without the PlatformException.
Written by the indexing model from the issue text.
Description
Trying to copy an image to clipboard using Pasteboard.writeImage (Android setup was done already) fails with the following error:
I/flutter (28309): PlatformException(Error, Failed to write image, Failed to find configured root that contains /data/data/futuristicgoo.emotic.debug/cache/3eb33b68-e614-45f3-a8f3-68dd913bb9ad.png, null)
I/flutter (28309): Stacktrace: #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652:7)
I/flutter (28309): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:370:18)
I/flutter (28309): <asynchronous suspension>
I/flutter (28309): #2 PasteboardPlatformIO.writeImage (package:pasteboard/src/pasteboard_platform_io.dart:66:7)
I/flutter (28309): <asynchronous suspension>
I/flutter (28309): #3 copyImageToClipboard (package:emotic/core/helper_functions.dart:83:7)
I/flutter (28309): <asynchronous suspension>
Reproduce Steps
Steps to reproduce the behavior:
- Do Android setup steps - modifying the AndroidManifest.xml and adding the provider_paths.xml file as mentioned in README
- Use
Pasteboard.writeImage(imageBytes)API on Android 15 - See error
Expected behavior
The image copies without any error
Version:
- Flutter Version: 3.29.3
- OS: Android 15 (don't know if this is version specific)
- plugin: pasteboard: 0.4.0
Additional context
I was able to fix it by adding the following to provider_paths.xml
<cache-path
name="cache"
path="." />
So I guess this should be added to the README.md?
Thank you for your work btw ^_^
- Dominant language
- C
- Stars
- 512
- Forks
- 292
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MixinNetwork/flutter-plugins
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
MixinNetwork/flutter-plugins#401 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
MixinNetwork/flutter-plugins#504 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
MixinNetwork/flutter-plugins#502 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
MixinNetwork/flutter-plugins#497 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
MixinNetwork/flutter-plugins#489 ·
All issues in MixinNetwork/flutter-plugins
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·