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

[Windows] Worked a couple times, now repeats error #77

Open
pdisser8 opened this issue Aug 1, 2022 · 5 comments
Open

[Windows] Worked a couple times, now repeats error #77

pdisser8 opened this issue Aug 1, 2022 · 5 comments

Comments

@pdisser8
Copy link

pdisser8 commented Aug 1, 2022

The problem

Everything seems to launch fine and then once I actually try to start the stream I keep getting some kind of MAC value error like this
[AudioRealtime]: RTP ChaCha20_Poly1305 decrypt: ValueError('MAC check failed')

Is the best way to try to get it working again blow away the repo or is there some easier fix here that I just dont get?

What commit exhibits the issue?

9b37407

Was there a last known working commit?

9b37407

What type of installation are you running?

virtualenv

With which python3 version do you run Receiver?

3.9.6

OS the receiver runs on

Windows 11

OS the sender runs

Monterey 12.4

Which sender client was used

youtube (from chrome or opera gx same issue)

Command invocation

python ap2-receiver.py -m myap2 -n "{261386AF-A4C2-40D4-9FAB-90956F2AEEFC}"

Please include --debug output which helps to illustrate the problem

stdout.txt

Additional information

No response

@pdisser8
Copy link
Author

pdisser8 commented Aug 1, 2022

deleting repo and trying again did not work. I feel like something is locked to some wrong mac address forever now, I've restarted both computers a few times now, just not sure how to unstuck this.

@Neustradamus
Copy link
Contributor

@systemcrash, @LewdNeko: What do you think?

@systemcrash
Copy link
Member

It's possible Apple are moving away from bitflags. I see this:

NTP is absent from the default flags. Yet Mojave sends NTP (macOS often tries this towards video enabled endpoints, also). It's allowed to do so in its device declaration. Audio should still work. Perhaps something with your output device, as chosen by the python interpreter you run.

I don't yet understand what these lines are - they might or might not indicate a problem, since I don't remember seeing them (I don't run windows):

[comtypes]: Release <POINTER(IMMDeviceEnumerator) ptr=0x21ed5ad2730 at 21ed6dd9ec0>
[comtypes]: Release <POINTER(IMMDevice) ptr=0x21ed374ba90 at 21ed6e01040>
[comtypes]: Release <POINTER(IUnknown) ptr=0x21ed5aef4f0 at 21ed6dd9ec0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x21ed5b70b80 at 21ed6e011c0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x21ed5b71420 at 21ed6e010c0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x21ed5b702e0 at 21ed6e012c0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x21ed5b71b50 at 21ed6e01340>
[comtypes]: Release <POINTER(IAudioSessionManager2) ptr=0x21ed5aef4f0 at 21ed6e01140>
[comtypes]: Release <POINTER(IAudioSessionEnumerator) ptr=0x21ed5cf9c90 at 21ed6dd9ec0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x21ed5b70170 at 21ed6e013c0>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x21ed5b71b58 at 21ed6e012c0>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x21ed5b702e8 at 21ed6e010c0>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x21ed5b71428 at 21ed6e011c0>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x21ed5b70b88 at 21ed6e01040>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x21ed5b70178 at 21ed6e01340>
[asyncio]: Using proactor: IocpProactor

@FlavorJ
Copy link

FlavorJ commented Sep 6, 2022

[comtypes]: Release <POINTER(IMMDevice) ptr=0x136e2aafbe0 at 136e3b87f40>
[comtypes]: Release <POINTER(IUnknown) ptr=0x136e0449070 at 136e3b87ec0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x136e042dc10 at 136e3b87f40>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x136e042d0b0 at 136e3b881c0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x136e042da70 at 136e3b88240>
[comtypes]: Release <POINTER(IAudioSessionManager2) ptr=0x136e0449070 at 136e3b88040>
[comtypes]: Release <POINTER(IAudioSessionEnumerator) ptr=0x136e2903b40 at 136e3b87ec0>
[comtypes]: Release <POINTER(IAudioSessionControl) ptr=0x136e042ddb0 at 136e3b88140>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x136e042da78 at 136e3b881c0>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x136e042d0b8 at 136e3b87f40>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x136e042dc18 at 136e3b880c0>
[comtypes]: Release <POINTER(IAudioSessionControl2) ptr=0x136e042ddb8 at 136e3b88240>

Just found and tried this project, and I'm getting similar messages when using remote volume controls. Playback otherwise works fine. I'm on Windows 10. These might be unhandled events.

This might be causing your issue: #79
Hard to verify without testing ;)

@pdisser8 You can test for yourself by changing line 445 of ./ap/connections/audio.py to self.key_and_iv = True if ((sk_len == 16 or sk_len == 24 or sk_len == 32) and session_iv is not None) else False -- Add extra parentheses around sk_len == 16 or sk_len == 24 or sk_len == 32

@pdisser8
Copy link
Author

pdisser8 commented Sep 6, 2022

Thanks, I'll give it a shot. If I still run into issues I'll look at putting this in a container instead.

systemcrash added a commit that referenced this issue Oct 7, 2022
Circumstantial evidence that PR #79 fixes it.

The multiple or conditions need to be grouped restricted for the key
length check.
systemcrash added a commit that referenced this issue Oct 7, 2022
Circumstantial evidence that PR #79 fixes it.

The multiple or conditions need to be grouped for the key
length check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants