Lkember / MotoIntercom

1 stars 0 forks source link

When adding a person to a call their devices are not originally connected on the right session #46

Open Lkember opened 7 years ago

Lkember commented 7 years ago

PhoneViewController > peersToBeAdded(peers:) > Entry -- 1 peers to call PhoneViewController > peersToBeAdded(peers:) > Adding peer Logan's iPhone PhoneViewController > peersToBeAdded(peers:) > Exit AddPeerViewController > addPeerButtonIsTouched > Exit ConnectionManager > session(_:didReceive:fromPeer:) > Received _acceptcall from peer Logan's iPhone PeerViewController > didReceiveStandardMessage > Received message = _acceptcall PhoneViewController > receivedStandardMessage > Entry > Number of peers: 1 PhoneViewController > receivedStandardMessage > Wrong peer ConnectionManager > session(_:didReceive:fromPeer:) > Received audio format from peer Logan's iPhone PhoneViewController > receivedPeerStreamInformation > Entry true PeerStreamOrganizer > updateAudioFormatForPeer(peer:format:) > Entry PeerStreamOrganizer > updateAudioFormatForPeer(peer:format:) > Exit PeerStreamOrganizer > isInputStreamSet(for:) > Could not find peer Logan's iPhone PeerStreamOrganizer > isOutputStreamSet(for:) > Could not find peer Logan's iPhone PhoneViewController > receivedPeerStreamInformation > Sending audio format back to Logan's iPhone ConnectionManager > sendData(format:toPeer:sessionIndex:) > Sending audio format ConnectionManager > sendData(format:toPeer:sessionIndex:) > Error, data could not be sent for the following reason: Peers ( "Logan's iPhone" ) not connected PeerStreamOrganizer > formatForPeer(peer:) PeerStreamOrganizer > isOutputStreamSet(for:) > Could not find peer Logan's iPhone fatal error: unexpectedly found nil while unwrapping an Optional value

Lkember commented 7 years ago

It looks like the issue is that the peer is not being added to the PeerOrganizer because of this line:

PhoneViewController > receivedStandardMessage > Entry > Number of peers: 1

Lkember commented 7 years ago

This issue has been updated to include the newest problem.

The problem is that the peer joining is not in the right session.

Lkember commented 7 years ago

The current issue is that the setupStream is not being called on the device that is being added to the multipeer call.

The issue may be that the "connectedWithPeer" is being called while in the PhoneViewController which causes an NPE.

Lkember commented 7 years ago

There is currently a crash due to the following: *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: _outputFormat.channelCount == buffer.format.channelCount'

I believe this issue will be fixed by issue #34, so for now this Issue will be on hold until 34 is fixed.