question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled Promise Rejection Error: Call `.startRecording()`

See original GitHub issue

macOS version: 10.14

Kap version:

screen shot 2018-11-27 at 9 06 39 am

Steps to reproduce

  • Record a video
  • Play the recording
  • Select a Window

Current behaviour

Unhandled Promise Rejection
Error: Call `.startRecording()` first
    at Aperture.stopRecording (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/aperture/index.js:141:13)
    at EventEmitter.<anonymous> (file:///Applications/Kap.app/Contents/Resources/app.asar/dist/renderer/js/main.js:207:39)
    at Generator.next (<anonymous>)
    at step (file:///Applications/Kap.app/Contents/Resources/app.asar/dist/renderer/js/main.js:39:191)
    at file:///Applications/Kap.app/Contents/Resources/app.asar/dist/renderer/js/main.js:39:437
    at Promise (<anonymous>)
    at EventEmitter.<anonymous> (file:///Applications/Kap.app/Contents/Resources/app.asar/dist/renderer/js/main.js:39:99)
    at EventEmitter.stopRecording (file:///Applications/Kap.app/Contents/Resources/app.asar/dist/renderer/js/main.js:223:20)
screen shot 2018-11-27 at 9 04 51 am

Expected behaviour

It should not throw the error.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
nmccrea-dbcommented, Jan 3, 2019

Getting the exact same error. Here’s a bit more info:

macOS: Version 10.14.2 Kap: Version 2.2.0 (2.2.0.880)

I opened the application and it asked for permission to use the microphone. It’s never asked me that before so I’m assuming it’s due to a version update.

I said no.

When I start a recording, the following error messages pop up.

screen shot 2019-01-03 at 3 42 49 pm

(“Recording error” pops up first, and then “aperture quit unexpectedly” pops up less than a second later.)

Here is my stab at prettifying the content of the error message:

Command failed: /Applications/Kap.app/Contents/Resources/app.asar.unpacked/node_modules/aperture/aperture {
  "destination":"file:///private/var/folders/2p/5pbqmrms5c90c9x1szvzk2hw0000gn/T/e960e9cfa3f3c2e128ffdb7e43697701.mp4",
  "fps":30,"showCursor":true,"highlightClicks":true,"displayId":"69948396",
  "audioDeviceId":"AppleHDAEngineInput:1F,3,0,1,0:1",
  "cropRect":[[514,286],[1209,768]]
}
Fatal error: Error raised at top level:
  Error Domain=AVFoundationErrorDomain
  Code=-11852 "Cannot use Built-in Microphone"
  UserInfo={
    NSLocalizedFailureReason=This app is not authorized to use Built-in Microphone.,
    AVErrorDeviceKey=<AVCaptureHALDevice: 0x7fc964413110 [Built-in Microphone][AppleHDAEngineInput:1F,3,0,1,0:1]>,
    NSLocalizedDescription=Cannot use Built-in Microphone
  }
  : file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.69.2/src/swift/stdlib/public/core/ErrorType.swift,
  line 187

This clearly indicates the problem is due to not having access to the microphone.

At this point, Kap thinks it is recording (the stop button is shown in the menubar icon). Whether it actually is or not I have no idea.

When I click the menubar icon to stop the recording, I get the identical error posted by @abranhe.

I do not get given a recording at this point. Menubar still shows the stop button. Application is essentially unusable.

Workaround

Re-enabling the microphone for Kap fixes the problem. Open System Preferences, then go to Security & Privacy > Privacy > Microphone and enable microphone access for Kap.

I don’t think it should be necessary for Kap to have microphone access to work. I use it for screen captures and don’t ever need or want it recording audio, which is why I disabled mic access originally. Hope this gets fixed in future versions!

Thanks for an awesome and extremely useful piece of software otherwise. Keep up the great work.

1reaction
wosevisioncommented, May 14, 2019

@skllcrn Nope, no error! I haven’t gotten the unhandled promise rejection error in this beta yet. Still no audio functionality though. The app prompted for use of my microphone but nothing recognized still; I guess this is a separate issue now since the original error seems to be gone!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled Promise Rejection Error: Call .startRecording() #596
("Recording error" pops up first, and then "aperture quit unexpectedly" pops up less than a second later.) Here is my stab at prettifying...
Read more >
Receiving 'Unhandled Promise Rejection' error - Stack Overflow
The following code creates a new id to pass to map.addSource each time targetTrackingLine is called: let targetTrackingCalls = 0; async ...
Read more >
Recording a media element - Web APIs | MDN
As mentioned before, startRecording() returns a Promise whose resolution handler is called (receiving as input an array of Blob objects ...
Read more >
Audio - Expo Documentation
A Promise that is rejected if creation failed, or fulfilled with the SoundObject . getAvailableInputs(). Returns a list of available recording inputs. This ......
Read more >
Questions - ReviewDB
I am getting the error Unhandled Promise Rejection Error: Call `.startRecording()` first at Aperture.stopRecording while i am recording large videos.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found