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

Recording fails with "We could not allocate necessary AV objects to perform the recording" #1

Open
ChaosCoder opened this issue Nov 28, 2020 · 4 comments

Comments

@ChaosCoder
Copy link

ChaosCoder commented Nov 28, 2020

I tried to use snaptake to record a video of my app. Generating the recordingFlag.txt works, but starting to record the video does not.

The error is the following when running IO.popen("xcrun simctl io booted recordVideo '#{path}'") inside the Listen.to-block:

Couldn't create an asset writer for writing video frames: allocationErrorError starting video recorder: Error Domain=simctl.SimulatorError Code=2 "We could not allocate necessary AV objects to perform the recording.".
An error was encountered processing the command (domain=simctl.SimulatorError, code=2):
We could not allocate necessary AV objects to perform the recording.

If I remove Listen.to and just manually start recording the same way within fastlane it works. Is that a permission problem because of different processes? Did you ever stumbled across this?

I found this when researching the problem: https://developer.apple.com/forums/thread/131926 and https://twitter.com/thesunshinejr/status/1245730408282677255 but it seams no one was able to fix that.

Here is the full output:

[21:06:06]: ▸ UISnapshots
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
[21:06:15]: Recording video now in screenshots/de-DE/iPhone 12 Pro-Preview.mp4
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
Couldn't create an asset writer for writing video frames: allocationErrorError starting video recorder: Error Domain=simctl.SimulatorError Code=2 "We could not allocate necessary AV objects to perform the recording.".
An error was encountered processing the command (domain=simctl.SimulatorError, code=2):
We could not allocate necessary AV objects to perform the recording.
[21:06:21]: ▸     ✓ testPreview (15.640 seconds)
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
[21:06:21]: ▸ 	 Executed 1 test, with 0 failures (0 unexpected) in 15.640 (15.643) seconds
[21:06:21]: ▸ 
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
[21:06:21]: Video recorded in screenshots/de-DE/iPhone 12 Pro-Preview.mp4
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
/Users/ChaosCoder/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.168.0/credentials_manager/lib/credentials_manager/appfile_config.rb:34: warning: conflicting chdir during another chdir block
[21:06:22]: ▸ 2020-11-28 21:06:22.147 xcodebuild[14107:10155506] [MT] IDETestOperationsObserverDebug: 21.744 elapsed -- Testing started completed.
[21:06:22]: ▸ 2020-11-28 21:06:22.148 xcodebuild[14107:10155506] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
[21:06:22]: ▸ 2020-11-28 21:06:22.148 xcodebuild[14107:10155506] [MT] IDETestOperationsObserverDebug: 21.744 sec, +21.744 sec -- end
[21:06:23]: ▸ Test Succeeded

(I get a lot of chdir-warnings, but these are not the problem, I think.)

@antranapp
Copy link

I get the same error right after following these tutorial https://www.vinzius.com/post/app-store-previews-guidelines-conversion-tips-ffmpeg/

@ChaosCoder, have you been able to solve the problem?

@ChaosCoder
Copy link
Author

Unfortunately not and I gave up using Snaptake. Good luck!

@Lausbert
Copy link
Owner

Sorry guys, this is no maintained Open Source project :) anyway good luck with everything you are up to.

@Scytalion
Copy link

"Couldn't create an asset writer for writing video frames: allocationErrorError starting video recorder"
means that the path is not correct/available. You can try the changes from my pull request.

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

4 participants