plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[share_plus] Can't share a single word on iOS

Open SirFalk opened this issue 2 years ago • 14 comments

There is an issue when trying to share a single word a Text on iOS. Basically, if I use Share.share("mysingleword"+" "); it works just as it should but if I use Share.share("mysingleword"); a weird bug appears, where you can only share via AirDrop (in the menu) and that doesn't work either.

I also get

AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1149 (
	0   AXRuntime                           0x00000001a71e6b34 0DF68C9E-8AA7-3BE0-AC94-B96AD90BEE69 + 322356
	1   AXRuntime                           0x00000001a719c4ac _AXGetPortFromCache + 708
	2   AXRuntime                           0x00000001a719dbbc AXUIElementPerformFencedActionWithValue + 488
	3   UIKit                               0x00000001f26819a8 E9CFEA6B-2121-37B3-BBE3-B940CD5959C7 + 936360
	4   libdispatch.dylib                   0x0000000181445914 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 10516
	5   libdispatch.dylib                   0x0000000181447660 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 18016
	6   libdispatch.dylib                   0x000000018144ede4 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 48612
	7   libdispatch.dylib                   0x000000018144f958 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 51544
	8   libdispatch.dylib                   0x000000018145a1a8 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 94632
	9   libsystem_pthread.dylib             0x00000001f235e0f4 _pthread_wqthread + 288
	10  libsystem_pthread.dylib             0x00000001f235de94 start_wqthread + 8
)
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1149 (
	0   AXRuntime                           0x00000001a71e6b34 0DF68C9E-8AA7-3BE0-AC94-B96AD90BEE69 + 322356
	1   AXRuntime                           0x00000001a719c4ac _AXGetPortFromCache + 708
	2   AXRuntime                           0x00000001a719dbbc AXUIElementPerformFencedActionWithValue + 488
	3   UIKit                               0x00000001f26819a8 E9CFEA6B-2121-37B3-BBE3-B940CD5959C7 + 936360
	4   libdispatch.dylib                   0x0000000181445914 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 10516
	5   libdispatch.dylib                   0x0000000181447660 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 18016
	6   libdispatch.dylib                   0x000000018144ede4 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 48612
	7   libdispatch.dylib                   0x000000018144f958 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 51544
	8   libdispatch.dylib                   0x000000018145a1a8 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 94632
	9   libsystem_pthread.dylib             0x00000001f235e0f4 _pthread_wqthread + 288
	10  libsystem_pthread.dylib             0x00000001f235de94 start_wqthread + 8
)
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1149 (
	0   AXRuntime                           0x00000001a71e6b34 0DF68C9E-8AA7-3BE0-AC94-B96AD90BEE69 + 322356
	1   AXRuntime                           0x00000001a719c4ac _AXGetPortFromCache + 708
	2   AXRuntime                           0x00000001a719dbbc AXUIElementPerformFencedActionWithValue + 488
	3   UIKit                               0x00000001f26819a8 E9CFEA6B-2121-37B3-BBE3-B940CD5959C7 + 936360
	4   libdispatch.dylib                   0x0000000181445914 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 10516
	5   libdispatch.dylib                   0x0000000181447660 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 18016
	6   libdispatch.dylib                   0x000000018144ede4 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 48612
	7   libdispatch.dylib                   0x000000018144f958 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 51544
	8   libdispatch.dylib                   0x000000018145a1a8 A5CBAAB3-E389-3548-BAAC-FAB18411B94A + 94632
	9   libsystem_pthread.dylib             0x00000001f235e0f4 _pthread_wqthread + 288
	10  libsystem_pthread.dylib             0x00000001f235de94 start_wqthread + 8
)

in the console. I've attached some files what the bug looks like. I hope this helps.

Screenshots

IMG_2141 IMG_2140

SirFalk avatar Jan 15 '22 16:01 SirFalk

Same thing. We have to add a space at the end of the word to have all the good options for sharing 3D86C118-B949-4946-9555-F94D3ACBBC95

redDwarf03 avatar Jan 16 '22 07:01 redDwarf03

TLDR: My workaround only works on iPhone (not iPad), and I am using v2.0.0.

I noticed that using v2.0.0 on iPhone, I was able to share to any app, but now in 3.0.4 I am limited to Aidrop and "Plus", as per https://github.com/fluttercommunity/plus_plugins/issues/701#issuecomment-1013825093

However, I noticed that using v2.0.0 or v3.0.4 does not work iPad. It looks like iPad is not well supported by this package, and this issue on iPad is not a recent bug.

The iPad error running v3.0.4 is:

2022-01-16 11:13:54.957895+0000 Runner[8286:2096936] CFURLSetTemporaryResourcePropertyForKey failed because it was passed a URL which has no scheme
2022-01-16 11:13:54.967004+0000 Runner[8286:2096936] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
	(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x283a3d180 h=-&- v=--& _UIActivityContentNavigationBar:0x1048098d0.minY == 0   (active, names: '|':UILayoutContainerView:0x10483f390 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x283a3d1d0 h=-&- v=--& _UIActivityContentNavigationBar:0x1048098d0.height == 50   (active)>",
    "<NSLayoutConstraint:0x283a275c0 V:[_UIActivityContentNavigationBar:0x1048098d0]-(0)-[UIFocusContainerGuide:0x282664a50'UINavigationControllerContentFocusContainerGuide']   (active)>",
    "<NSLayoutConstraint:0x283a274d0 UIFocusContainerGuide:0x282664a50'UINavigationControllerContentFocusContainerGuide'.bottom == UILayoutContainerView:0x10483f390.bottom   (active)>",
    "<NSLayoutConstraint:0x283a27b60 V:|-(0)-[UILayoutContainerView:0x10483f390]   (active, names: '|':UIView:0x10482d020 )>",
    "<NSLayoutConstraint:0x283a27bb0 UILayoutContainerView:0x10483f390.bottom == UIView:0x10482d020.bottom   (active)>",
    "<NSLayoutConstraint:0x283a3db80 'UIView-Encapsulated-Layout-Height' UIView:0x10482d020.height == 0   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x283a275c0 V:[_UIActivityContentNavigationBar:0x1048098d0]-(0)-[UIFocusContainerGuide:0x282664a50'UINavigationControllerContentFocusContainerGuide']   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2022-01-16 11:13:54.975369+0000 Runner[8286:2096936] CFURLCopyResourcePropertyForKey failed because it was passed a URL which has no scheme
2022-01-16 11:13:54.991641+0000 Runner[8286:2096936] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x283a15770 H:|-(0)-[_UIActivityContentTitleView:0x102c9fbe0]   (active, names: '|':_UINavigationBarContentView:0x104811050 )>",
    "<NSLayoutConstraint:0x283a15ae0 _UIActivityContentTitleView:0x102c9fbe0.trailing == _UINavigationBarContentView:0x104811050.trailing   (active)>",
    "<NSLayoutConstraint:0x283a14c30 LPLinkView:0x102cbe040.leading == UILayoutGuide:0x282062060'UIViewLayoutMarginsGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x283a14b40 H:[LPLinkView:0x102cbe040]-(27)-|   (active, names: '|':_UIActivityContentTitleView:0x102c9fbe0 )>",
    "<NSLayoutConstraint:0x283a3d7c0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x104811050.width == 0   (active)>",
    "<NSLayoutConstraint:0x283a14aa0 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x282062060'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UIActivityContentTitleView:0x102c9fbe0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x283a14c30 LPLinkView:0x102cbe040.leading == UILayoutGuide:0x282062060'UIViewLayoutMarginsGuide'.leading   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2022-01-16 11:13:55.016340+0000 Runner[8286:2096936] [Process] 0x1070c7e18 - [pageProxyID=21, webPageID=22, PID=8290] WebPageProxy::didFailProvisionalLoadForFrame: frameID=3, domain=WebKitErrorDomain, code=101
2022-01-16 11:13:55.023227+0000 Runner[8286:2097559] [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
2022-01-16 11:13:55.023289+0000 Runner[8286:2097559] [ProcessSuspension] 0x11b1f9500 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=8290, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}

ben-xD avatar Jan 16 '22 11:01 ben-xD

@SirFalk, can you update the title to have [share_plus], like https://github.com/fluttercommunity/plus_plugins/issues/693

ben-xD avatar Jan 16 '22 11:01 ben-xD

Would also be good to follow the issue template provided for reporting a bug in this repo.

vbuberen avatar Jan 16 '22 11:01 vbuberen

Can confirm the issue from my side as well.

vbuberen avatar Jan 17 '22 14:01 vbuberen

I can confirm this issue and for my case it's not solvable adding extra space to string. I'm unfortunately back on 2.0.0 where it works just fine on iOS

ryzizub avatar Jan 27 '22 18:01 ryzizub

It works normally in version 3.0.3.

ttb-inc avatar Feb 07 '22 06:02 ttb-inc

@ben-xD I also get a similar error Unable to simultaneously satisfy constraints.. Do you have a solution now?

YowFung avatar Mar 17 '22 07:03 YowFung

Still an issue on 4.0.3

ryzizub avatar Mar 17 '22 13:03 ryzizub

Issue still here : the fix is to add an extra space at the end of the title.

EArminjon avatar Apr 02 '22 06:04 EArminjon

Issue still here : the fix is to add an extra space at the end of the title.

No because the app proposed to share are not good

redDwarf03 avatar Apr 02 '22 06:04 redDwarf03

Issue still here : the fix is to add an extra space at the end of the title.

No because the app proposed to share are not good

I don't understand.

EArminjon avatar Apr 02 '22 06:04 EArminjon

I'm having the same issue. Adding a space after the text is the only way to show the other actions.

jlalvarez18 avatar Apr 15 '22 15:04 jlalvarez18

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

github-actions[bot] avatar Jun 15 '22 00:06 github-actions[bot]

I think FluffyChat (Matrix client) is also affected by this when attempting to copy a username. The effect is that moderation (and bots for it) become painful as the /commands (or !commands) expect to receive a complete Matrix identifier (MXID) and this has been affecting us for a while.

Mikaela avatar Aug 21 '22 14:08 Mikaela

A new version of share_plus 4.1.0 has been released with fixes for sharing text on iOS.

Please check with this new version of the plugin and open a new GitHub issue if it persists.

You can check the details on the PR #1055

miquelbeltran avatar Sep 06 '22 13:09 miquelbeltran