fluttercommunity / plus_plugins

Flutter Community Plus Plugins
BSD 3-Clause "New" or "Revised" License
1.61k stars 964 forks source link

[Bug]: #1664

Closed hiral1987 closed 1 year ago

hiral1987 commented 1 year ago

Platform

Android 12

Plugin

share_plus

Version

6.3.1

Flutter SDK

3.0.0

Steps to reproduce

Save image on your external storage for eg : /sdcard/NotesApp/1679229095384.jpg. Then call Share.shareFiles or Share.XFiles & pass image path.

i got below error

E/flutter ( 7334): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Share failed, '/sdcard/NotesApp/1679229095384.jpg': The source file doesn't exist., null, null) E/flutter ( 7334): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) E/flutter ( 7334): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) E/flutter ( 7334):

Code Sample

Share.shareFiles(_imageList, text: '${_titleController.text}\n\n${_noteController.text}');

Logs

E/flutter ( 7334): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Share failed, '/sdcard/NotesApp/1679229095384.jpg': The source file doesn't exist., null, null)
E/flutter ( 7334): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
E/flutter ( 7334): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)
E/flutter ( 7334): <asynchronous suspension>
E/flutter ( 7334):

Flutter Doctor

PS D:\FlutterProj\note_app> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.7.7, on Microsoft Windows [Version 10.0.22621.1413], locale en-IN)
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.75.1)
[√] Connected device (4 available)
[√] HTTP Host Availability

Checklist before submitting a bug

hiral1987 commented 1 year ago

Anyone pls provide solution to this

vbuberen commented 1 year ago

Could you share the code snippet including the file path that you provide? I assume something is wrong with the path you provide.

hiral1987 commented 1 year ago

I have already shared filepath & code snippet on github which i tried.

You can use same code to reproduce.

Thanks & Regards, Hiral Dharod

On Tue, Apr 18, 2023, 17:13 Volodymyr Buberenko @.***> wrote:

Could you share the code snippet including the file path that you provide? I assume something is wrong with the path you provide.

— Reply to this email directly, view it on GitHub https://github.com/fluttercommunity/plus_plugins/issues/1664#issuecomment-1512934820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD72PS6CMZQSIOBVHXHNZE3XBZ46HANCNFSM6AAAAAAWQI7BUA . You are receiving this because you authored the thread.Message ID: @.***>

vbuberen commented 1 year ago

I have already shared filepath & code snippet on github which i tried.

I can't reproduce as I clearly explained that I assume that the issue is in file paths you provide and your snippet has no info on what is _imageList and which items you have in that list. Can't help you without a proper full sample to reproduce.

hiral1987 commented 1 year ago

Ok. I wil share filePath which i used to store images

Thanks & Regards, Hiral Dharod

On Wed, Apr 26, 2023, 16:47 Volodymyr Buberenko @.***> wrote:

I have already shared filepath & code snippet on github which i tried.

I can't reproduce as I clearly explained that I assume that the issue is in file paths you provide and your snippet has no info on what is _imageList and which items you have in that list. Can't help you without a proper full sample to reproduce.

— Reply to this email directly, view it on GitHub https://github.com/fluttercommunity/plus_plugins/issues/1664#issuecomment-1523247228, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD72PS4NMRKAQYTD6RVBGWDXDD743ANCNFSM6AAAAAAWQI7BUA . You are receiving this because you authored the thread.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days