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

Can't activate Audio Recording #825

Closed
alberto-roldan opened this issue Apr 15, 2020 · 23 comments
Closed

Can't activate Audio Recording #825

alberto-roldan opened this issue Apr 15, 2020 · 23 comments

Comments

@alberto-roldan
Copy link

macOS version: 19.4.0 (darwin)
Kap version: 3.2.0

Steps to reproduce

Here is a video showing the issue: https://streamable.com/ky2k8s

Seems that Kap have the correct permissions but it won't let me activate Audio Recording.

I've already tried to completely uninstall Kay (including the Library path) and install it again but no luck :(

Current behavior

The Audio Recording switch can't be activated

Expected behavior

Activate Audio Recording

@karaggeorge
Copy link
Member

@alberto-roldan I've been tracking this issue for a while but haven't been able to reproduce. I'm also not on Catalina, so I don't know if it has something to do with that.

I might need your help with debugging. If I get a quick dev build up, with some logging, would you mind trying it out and sharing the results?

@alberto-roldan
Copy link
Author

@karaggeorge Sure!

@alexheruth
Copy link

MacOS Version 15.3
Kap Version 3.2.0

I got the exact same Problem. Did you already find a solution?

@karaggeorge
Copy link
Member

@alexheruth I'm still working on investigating and getting a small test build :)

@karaggeorge
Copy link
Member

Whoever is having this issue, can you please download and test this build and let me know if that works?

Note that it's not notarized, so you might have to right-click -> open depending on your macOS version

@alberto-roldan
Copy link
Author

@karaggeorge it works! 🎉

@pistachoo
Copy link

I uninstalled Kap, including ~/Library/Application Support/Kap. Then I installed the test build mentioned above, and attempted to set the audio toggle to ON, which triggered the permissions popup. I accepted, and for good measure, went into SysPref and made sure Kap was allowed to access the mic. Quit and restarted Kap, and now the audio toggle is ON (yay) but the app crashes with this message (boo):
image

@karaggeorge
Copy link
Member

@pistachoo do you have an input device selected, under the audio toggle?

@pistachoo
Copy link

pistachoo commented Apr 17, 2020

I tried installing the latest stable build on top, to see what would happen. When I first ran it, it triggered the audio permission pop up, which I allowed. When I went into preferences, it was toggled to ON but the box below it said "no input device". I tested it by taking a random Kap of my screen while talking, and it recorded the video with no sound (but the sound/speaker icon was white). When I clicked on the sound/speaker icon in the recording, it went to grey, and then would not click back to white. When I went into Kap preferences and switched the audio toggle to OFF, it flipped left, and now it stays OFF and I cannot turn it back to ON.

I think it might not see the mic?? (I.e., there are no choices when I click on the 'No Input device'; no dropdown menu appears, and clicking on it does nothing.)

First screenshot (left) is with the stable build not seeing the mic. Second (right) screenshot is with test build, which does see the mic. Too bad the test version keeps crashing with the above error message. SO close!!

image

@hwinnemo
Copy link

Whoever is having this issue, can you please download and test this build and let me know if that works?

Note that it's not notarized, so you might have to right-click -> open depending on your macOS version

This worked for me while nothing before it has. Well done!!

@alexheruth
Copy link

alexheruth commented Apr 20, 2020 via email

@jochenmanz
Copy link

The dev build fixed the audio recording issue for me, too :) Thank you!

@tatablack
Copy link

Hmm, same problem as @pistachoo, here. I can toggle the audio switch in the preferences, I can select the internal mic from the list of options, but after I start recording a video I get the timeout error and it crashes.
Happy to try other builds.

MacOS 10.14.6 (Mojave).

@swhamilton
Copy link

I debugged this on two MBPs (2015 and 2019) and found some different results.

Audio Recording issue:

  • MBP 2019 Catalina: toggle worked with Kap 3.2.0 (no custom build required)
  • MBP 2015 Mojave: the Preferences -> Audio Recording toggle did not work with Kap 3.2.0 until I downloaded the custom build.

Audio Devices issue:

  • MBP 2019 Catalina: Lists all devices, no code change required
  • MBP 2015 Mojave: crashes every time, no available inputs.

The issue with the audio devices is due to the function getAudioDevices from preferences.js.

https://github.com/wulkano/kap/blob/8cb1aaea87d4c9b29d1d551e2edd473b39012c05/renderer/containers/preferences.js#L43

getAudioDevices() needs to return an array of audio devices like this:

[{name: 'MacBook Pro Microphone', id: 'BuiltInMicrophoneDevice'}]

but returns a massive log string:

2020-04-24 13:01:02.071 aperture[9823:124325] alloc
2020-04-24 13:01:02.072 aperture[9823:124325] query 2
2020-04-24 13:01:02.072 aperture[9823:124325] release 2
2020-04-24 13:01:02.072 aperture[9823:124325] ** MyPlugInitializeWithObjectID
2020-04-24 13:01:02.072 aperture[9823:124325] init
2020-04-24 13:01:02.072 aperture[9823:124325] MyPlugObjectSetPropertyData
2020-04-24 13:01:02.072 aperture[9823:124325] MyPlugObjectSetPropertyData
2020-04-24 13:01:02.072 aperture[9823:124325] MyPlugObjectSetPropertyData
2020-04-24 13:01:02.284 aperture[9823:124325] <CMVideoFormatDescription 0x7fe14421e400 [0x7fff8d8d28c0]> {
	mediaType:'vide' 
	mediaSubType:'BGRA' 
	mediaSpecific: {
		codecType: 'BGRA'		dimensions: 320 x 240 
	} 
	extensions: {{
    CVBytesPerRow = 1280;
    CVFieldCount = 1;
    FormatName = "Component Video - CCIR-601 RGB";
    "com.apple.cmio.format_extension.video.only_has_i_frames" = 1;
}}
}
2020-04-24 13:01:02.284 aperture[9823:124325] alloc
2020-04-24 13:01:02.284 aperture[9823:124325] query 2
2020-04-24 13:01:02.284 aperture[9823:124325] release 2
2020-04-24 13:01:02.284 aperture[9823:124325] ** MyPlugInitializeWithObjectID
2020-04-24 13:01:02.284 aperture[9823:124325] init
2020-04-24 13:01:02.284 aperture[9823:124325] MyPlugObjectSetPropertyData
2020-04-24 13:01:02.284 aperture[9823:124325] MyPlugObjectSetPropertyData
2020-04-24 13:01:02.284 aperture[9823:124325] MyPlugObjectSetPropertyData
2020-04-24 13:01:02.284 aperture[9823:124325] <CMVideoFormatDescription 0x7fe144220030 [0x7fff8d8d28c0]> {
	mediaType:'vide' 
	mediaSubType:'2vuy' 
	mediaSpecific: {
		codecType: '2vuy'		dimensions: 320 x 240 
	} 
	extensions: {{
    CVFieldCount = 1;
    CVImageBufferColorPrimaries = "SMPTE_C";
    CVImageBufferTransferFunction = "ITU_R_709_2";
    CVImageBufferYCbCrMatrix = "ITU_R_601_4";
    FormatName = "Component Video - CCIR-601 uyvy";
    "com.apple.cmio.format_extension.video.only_has_i_frames" = 1;
}}
}
2020-04-24 13:01:02.293 aperture[9823:124325] MyPlugObjectHasProperty
2020-04-24 13:01:02.293 aperture[9823:124325] enog
2020-04-24 13:01:02.293 aperture[9823:124325] bolg
2020-04-24 13:01:02.293 aperture[9823:124325] 0
2020-04-24 13:01:02.293 aperture[9823:124325] MyPlugObjectSetPropertyData
... // List of audio devices below
[{"id":"Someabracadabramagic","name":"ManyCam Virtual Microphone"},{"id":"SoundflowerEngine:1","name":"Soundflower (64ch)"},{"id":"AppleUSBAudioEngine:BLUE MICROPHONE:Blue Snowball:201305:1","name":"Blue Snowball"},{"id":"AppleHDAEngineInput:1B,0,1,0:1","name":"Built-in Microphone"},{"id":"SoundflowerEngine:0","name":"Soundflower (2ch)"}]
2020-04-24 13:01:02.301 aperture[9823:124325] MyPlugTeardown
2020-04-24 13:01:02.301 aperture[9823:124325] MyPlugTeardown

I found good protection code for the same aperature.getAudioDevices()...probably could copy that over to preferences.js to protect against operating on any non-array returned from getAudioDevices:

https://github.com/wulkano/kap/blob/8cb1aaea87d4c9b29d1d551e2edd473b39012c05/main/common/settings.js#L97

I don't know how to actually fix the aperature.getAudioDevices method, but hopefully this helps solve the issue.

@karaggeorge
Copy link
Member

@swhamilton Thank you so much for this! This helps a lot and we finally know how to fix this issue. I'll be updating the PR soon 😄

@jh3y
Copy link

jh3y commented Apr 26, 2020

Whoever is having this issue, can you please download and test this build and let me know if that works?

Note that it's not notarized, so you might have to right-click -> open depending on your macOS version

I've been having the same issue 😭 Tried out the build link you shared above and all is working for me 🎉

Look forward to the new version! 👍 Great work! 👏

@pistachoo
Copy link

pistachoo commented Apr 30, 2020

@swhamilton Thank you so much for this! This helps a lot and we finally know how to fix this issue. I'll be updating the PR soon 😄

Will you post up here so we know when and where to look? :) Looking forward to getting the fixed version!

@karaggeorge
Copy link
Member

@pistachoo and everyone else, can you try the latest release? (3.2.2)

@tatablack
Copy link

Hey, @karaggeorge - works for me! 🥳

After launching 3.2.2, the "Audio recording" option was already selected, but no input sources were available in the dropdown. I turned the option on and off again, it asked me permission to use the audio hardware, and then the dropdown contained my input devices.

After that, I tried actually recording, no issue at all. Thanks for fixing this. 👍

MBP 2017 Mojave (10.14.6)

@karaggeorge
Copy link
Member

I'm glad everything is working 😄 Let's wait for a few more people to test and if no one has an issue we can close this

@pistachoo
Copy link

@pistachoo and everyone else, can you try the latest release? (3.2.2)

It works! Thank you!!

@swhamilton
Copy link

Works for me on 2015 MBP Catalina. Thanks and great work!

@skllcrn
Copy link
Member

skllcrn commented May 7, 2020

Closing this issue now, thank you everyone for your help debugging and testing!

@skllcrn skllcrn closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants