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

Cannot import files with chars like "äöü" in the name #40

Open
krabbenprgr opened this issue Jan 10, 2023 · 3 comments
Open

Cannot import files with chars like "äöü" in the name #40

krabbenprgr opened this issue Jan 10, 2023 · 3 comments

Comments

@krabbenprgr
Copy link

Thank you for the package, first. The problems in the receive_share_intent package have already cost me a lot of nerves....

If the name of a file contains the special chars like äöü the plugin crashes. The errors appears in the Uri.decodeFull() function. Tested with the example on Android. See the attached stacktrace for more information.

#0 _Uri._uriDecode (dart:core/uri.dart:3060:11)
#1 Uri.decodeFull (dart:core/uri.dart:1299:17)
#2 SharedAttachment.decode (package:share_handler_platform_interface/src/data/messages.dart:34:11)
#3 SharedMedia.decode. (package:share_handler_platform_interface/src/data/messages.dart:93:41)
#4 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31)
#5 ListIterator.moveNext (dart:_internal/iterable.dart:342:26)
#6 CastIterator.moveNext (dart:_internal/cast.dart:61:30)
#7 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#8 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#9 new List.of (dart:core-patch/array_patch.dart:51:28)
#10 Iterable.toList (dart:core/iterable.dart:470:12)
#11 SharedMedia.decode (package:share_handler_platform_interface/src/data/messages.dart:95:12)
#12 MethodChannelShareHandler.sharedMediaStream. (package:share_handler_platform_interface/src/method_channel/method_channel_share_handler.dart:54:26)
#13 _MapStream._handleData (dart:async/stream_pipe.dart:213:31)
#14 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
#15 _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
#16 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#17 _DelayedData.perform (dart:async/stream_impl.dart:515:14)
#18 _PendingEvents.handleNext (dart:async/stream_impl.dart:620:11)
#19 _PendingEvents.schedule. (dart:async/stream_impl.dart:591:7)
#20 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#21 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

@JoshJuncker
Copy link
Collaborator

@krabbenprgr I merged a pull request into master recently that I was hoping would fix this. Can you point to master and see if the issue is resolved?

@krabbenprgr
Copy link
Author

Sorry but the errors still occurs. The errors happens in the Uri.decodeFull(path) part that isn't affected by the merged pull request.

@Tienisto
Copy link

I am also German and it did actually fix the problem. You need to override the platform interface not the original package:

dependencies:
  # ...

dependency_overrides:
  share_handler_platform_interface:
    git:
      url: https://github.com/ShoutSocial/share_handler.git
      path: share_handler_platform_interface
      ref: 630cf945524dfbae1bc63ed83b28559b47b25ffa

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

No branches or pull requests

3 participants