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

Send file broken in SimpleChatSwift example #4

Open
aral opened this issue Feb 5, 2017 · 1 comment
Open

Send file broken in SimpleChatSwift example #4

aral opened this issue Feb 5, 2017 · 1 comment

Comments

@aral
Copy link

aral commented Feb 5, 2017

SimpleChatSwift example running on same laptop (currently behind VPN) with:

a. iOS app running in simulator
b. Mac app running on the Mac

Observed behaviour:

  1. Peer discovery, connection works
  2. Sending messages works
  3. Sending files does not work (from either end)

The log output iOS (at end), displays the error.

Log output (Mac side)

Reto[Info] 2017-02-05 14:55:50 +0000: Started browsing using <sReto.BonjourBrowser: 0x6000000cc630>
Reto[Info] 2017-02-05 14:55:51 +0000: published wlan bonjour address: 82051D37-47DC-44C3-B933-A014E14B788B
Reto[Info] 2017-02-05 14:55:51 +0000: Started advertisement using <sReto.BonjourAdvertiser: 0x6000000cc1d0>
Reto[Info] 2017-02-05 14:55:51 +0000: found address for: 82051D37-47DC-44C3-B933-A014E14B788B, there are 2 addresses available.
Reto[Info] 2017-02-05 14:56:16 +0000:  -- Discovered Neighbor: A32E6ACA-4ADD-445B-AF67-55516CC81932 -- 
Reto[Info] 2017-02-05 14:56:16 +0000:  -- Peer Discovery Information -- 
Reto[Info] 2017-02-05 14:56:16 +0000:  - Peers now reachable: 
Reto[Info] 2017-02-05 14:56:16 +0000: 	A32E6ACA-4ADD-445B-AF67-55516CC81932 (via A32E6ACA-4ADD-445B-AF67-55516CC81932, cost: 1000.0)
createChatPeer
Reto[Error] 2017-02-05 14:56:16 +0000: Failed to establish direct connection as no direct addresses are known for this node.
Reto[Error] 2017-02-05 14:56:16 +0000: Failed to establish hop connections.
Reto[Error] 2017-02-05 14:56:16 +0000: Failed to establish connection.
Reto[Info] 2017-02-05 14:56:16 +0000: No nodes became unreachable.
Reto[Info] 2017-02-05 14:56:16 +0000: No routes changed.
Reto[Info] 2017-02-05 14:56:16 +0000: Handling incoming connection...
Reto[Info] 2017-02-05 14:56:17 +0000: found address for: A32E6ACA-4ADD-445B-AF67-55516CC81932, there are 2 addresses available.
Reto[Info] 2017-02-05 14:56:17 +0000:  -- Peer Discovery Information -- 
Reto[Info] 2017-02-05 14:56:17 +0000:  - No new nodes reachable.
Reto[Info] 2017-02-05 14:56:17 +0000: No nodes became unreachable.
Reto[Info] 2017-02-05 14:56:17 +0000: Peers with changed routes: 
Reto[Info] 2017-02-05 14:56:17 +0000: try to connect to address data: 16 bytes, hostName: Arals-MacBook.local., port: 59252
Reto[Info] 2017-02-05 14:56:17 +0000: Attempt to write before connected
Reto[Info] 2017-02-05 14:56:17 +0000: 	A32E6ACA-4ADD-445B-AF67-55516CC81932 (old cost: 1000.0, new cost: 10.0, reachable via: A32E6ACA-4ADD-445B-AF67-55516CC81932
Reto[Info] 2017-02-05 14:56:17 +0000: socket connected to: 10.3.156.172, port: 59252
Reto[Info] 2017-02-05 14:56:17 +0000: Connection was established.
2017-02-05 15:56:27.286602 SimpleChatMac[14798:1135964] 0x600000143440 Copy matching assets reply: XPC_TYPE_DICTIONARY  <dictionary: 0x600000143440> { count = 2, transaction: 0, voucher = 0x0, contents =
	"Assets" => <data: 0x60000006f280>: { length = 4070 bytes, contents = 0x62706c6973743030d4000100020003000400050006017d01... }
	"Result" => <int64: 0x600000029360>: 0
}
2017-02-05 15:56:27.288337 SimpleChatMac[14798:1135964] 0x600000142d60 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x600000142d60> { count = 2, transaction: 0, voucher = 0x0, contents =
	"Attributes" => <data: 0x60000006f280>: { length = 302 bytes, contents = 0x62706c6973743030d40102030405061a1b58247665727369... }
	"Result" => <int64: 0x600000029280>: 0
}
2017-02-05 15:56:27.289822 SimpleChatMac[14798:1135964] 0x608000145800 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x608000145800> { count = 2, transaction: 0, voucher = 0x0, contents =
	"Attributes" => <data: 0x608000460540>: { length = 506 bytes, contents = 0x62706c6973743030d4010203040506232458247665727369... }
	"Result" => <int64: 0x600000029360>: 0
}
2017-02-05 15:56:27.291204 SimpleChatMac[14798:1135964] 0x608000145ee0 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x608000145ee0> { count = 2, transaction: 0, voucher = 0x0, contents =
	"Attributes" => <data: 0x6080004606c0>: { length = 302 bytes, contents = 0x62706c6973743030d40102030405061a1b58247665727369... }
	"Result" => <int64: 0x608000035540>: 0
}
2017-02-05 15:56:27.292641 SimpleChatMac[14798:1135964] 0x600000143440 Copy assets attributes reply: XPC_TYPE_DICTIONARY  <dictionary: 0x600000143440> { count = 2, transaction: 0, voucher = 0x0, contents =
	"Attributes" => <data: 0x600000272800>: { length = 506 bytes, contents = 0x62706c6973743030d4010203040506232458247665727369... }
	"Result" => <int64: 0x600000029840>: 0
}
Reto[Info] 2017-02-05 14:57:03 +0000: try to connect to address data: 16 bytes, hostName: Arals-MacBook.local., port: 59252
Reto[Info] 2017-02-05 14:57:03 +0000: Attempt to write before connected
Sending file name: aral-432.jpg
Reto[Info] 2017-02-05 14:57:03 +0000: socket connected to: 10.3.156.172, port: 59252
Reto[Info] 2017-02-05 14:57:03 +0000: Connection was established.
Reto[Info] 2017-02-05 14:57:03 +0000: socket disconnect, error: nil

Log output iOS Side:

objc[14881]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1183d3998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x1181f5880). One of the two will be used. Which one is undefined.
table has 0 rows
table has 0 rows
2017-02-05 15:56:10.716826 SimpleChatIOS[14881:1135739] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/aral/Library/Developer/CoreSimulator/Devices/353E0D97-2C76-4807-8A68-1B80BBA8E765/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-02-05 15:56:10.718210 SimpleChatIOS[14881:1135739] [MC] Reading from private effective user settings.
table has 0 rows
Reto[Info] 2017-02-05 14:56:16 +0000: Started browsing using <sReto.BonjourBrowser: 0x6080002c0e00>
Reto[Info] 2017-02-05 14:56:16 +0000: found address for: 82051D37-47DC-44C3-B933-A014E14B788B, there are 2 addresses available.
Reto[Info] 2017-02-05 14:56:16 +0000: try to connect to address data: 16 bytes, hostName: Arals-MacBook.local., port: 59237
Reto[Info] 2017-02-05 14:56:16 +0000: Attempt to write before connected
Reto[Info] 2017-02-05 14:56:16 +0000:  -- Peer Discovery Information -- 
Reto[Info] 2017-02-05 14:56:16 +0000:  - Peers now reachable: 
Reto[Info] 2017-02-05 14:56:16 +0000: 	82051D37-47DC-44C3-B933-A014E14B788B (via 82051D37-47DC-44C3-B933-A014E14B788B, cost: 10.0)
createChatPeer
Reto[Info] 2017-02-05 14:56:16 +0000: try to connect to address data: 16 bytes, hostName: Arals-MacBook.local., port: 59237
Reto[Info] 2017-02-05 14:56:16 +0000: Attempt to write before connected
table has 1 rows
Reto[Info] 2017-02-05 14:56:16 +0000: No nodes became unreachable.
Reto[Info] 2017-02-05 14:56:16 +0000: No routes changed.
Reto[Info] 2017-02-05 14:56:16 +0000: socket connected to: 10.3.156.172, port: 59237
Reto[Info] 2017-02-05 14:56:16 +0000: socket connected to: 10.3.156.172, port: 59237
Reto[Info] 2017-02-05 14:56:16 +0000: Connection was established.
Reto[Info] 2017-02-05 14:56:16 +0000:  -- Discovered Neighbor: 82051D37-47DC-44C3-B933-A014E14B788B -- 
Reto[Info] 2017-02-05 14:56:16 +0000: Connection was established.
Reto[Info] 2017-02-05 14:56:16 +0000: published wlan bonjour address: A32E6ACA-4ADD-445B-AF67-55516CC81932
Reto[Info] 2017-02-05 14:56:16 +0000: Started advertisement using <sReto.BonjourAdvertiser: 0x6000002c2e60>
Reto[Info] 2017-02-05 14:56:17 +0000: Handling incoming connection...
Reto[Info] 2017-02-05 14:56:17 +0000: found address for: A32E6ACA-4ADD-445B-AF67-55516CC81932, there are 2 addresses available.
2017-02-05 15:56:40.703887 SimpleChatIOS[14881:1136126] 0x60800034d680 Copy matching assets reply: XPC_TYPE_DICTIONARY  <dictionary: 0x60800034d680> { count = 1, transaction: 0, voucher = 0x0, contents =
	"Result" => <int64: 0x60800043bf20>: 29
}
2017-02-05 15:56:40.706000 SimpleChatIOS[14881:1136126] 0x60800034d940 Daemon configuration query reply: XPC_TYPE_DICTIONARY  <dictionary: 0x60800034d940> { count = 2, transaction: 0, voucher = 0x0, contents =
	"Dictionary" => <dictionary: 0x60800034d520> { count = 1, transaction: 0, voucher = 0x0, contents =
		"ServerURL" => <dictionary: 0x60800034dd60> { count = 3, transaction: 0, voucher = 0x0, contents =
			"com.apple.CFURL.magic" => <uuid: 0x608000445d00> C3853DCC-9776-4114-B6C1-FD9F51944A6D
			"com.apple.CFURL.string" => <string: 0x60800004cf30> { length = 30, contents = "https://mesu.apple.com/assets/" }
			"com.apple.CFURL.base" => <null: 0x10869bf20>: null-object
		}
	}
	"Result" => <int64: 0x60800043f340>: 0
}
2017-02-05 15:56:40.706837 SimpleChatIOS[14881:1136126] [MobileAssetError:29] Unable to copy asset information from https://mesu.apple.com/assets/ for asset type com.apple.MobileAsset.TextInput.SpellChecker
Reto[Info] 2017-02-05 14:57:03 +0000: Handling incoming connection...
Error Domain=NSCocoaErrorDomain Code=260 "The file “aral-432.jpg” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/aral/Library/Developer/CoreSimulator/Devices/353E0D97-2C76-4807-8A68-1B80BBA8E765/data/Containers/Data/Application/85D7AD48-5137-4296-8D9D-CDA98B547547/tmp/aral-432.jpg, NSUnderlyingError=0x60000044f870 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Reto[Info] 2017-02-05 14:57:03 +0000: socket disconnect, error: Optional(Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo={NSLocalizedDescription=Socket closed by remote peer})
@softsol-tech
Copy link

Any fix on this?

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

2 participants