uncaughtException: The frame is bigger than expected
See original GitHub issueThe problem
Appium is sometimes crashing when running with video recording against real iOS devices.
Environment
- Appium version (or git revision) that exhibits the issue: v1.16.0-beta.1 (also happens on v1.15.0)
- Last Appium version that did not exhibit the issue (if applicable): Unsure, we just started using video recording
- Desktop OS/version used to run Appium: macOS 10.14.5
- Node.js version (unless using Appium.app|exe): v12.10.0
- Npm or Yarn package manager: npm 6.10.3
- Mobile platform/version under test: iOS 13.1
- Real device or emulator/simulator: Real
- Appium CLI or Appium.app|exe: CLI
Details
We are running native iOS tests against a real device with video recording on, per test. At the start of each test, we start video recording. At the end of each test, we stop video recording. There are multiple tests per suite run.
Sometimes Appium will crash when attempting to start the next video recording, with an error like the following:
uncaughtException: The frame is bigger than expected. Length: 1347703880, max: 1000000
Error: The frame is bigger than expected. Length: 1347703880, max: 1000000
at LengthBasedSplitter._decode (/usr/local/lib/node_modules/appium/node_modules/appium-ios-device/lib/util/transformer/length-based-splitter.js:37:13)
at LengthBasedSplitter._decode [as _transform] (/usr/local/lib/node_modules/appium/node_modules/appium-ios-device/lib/util/transformer/length-based-splitter.js:19:48)
at LengthBasedSplitter.Transform._read (_stream_transform.js:189:10)
at LengthBasedSplitter.Transform._write (_stream_transform.js:177:12)
at doWrite (_stream_writable.js:428:12)
at writeOrBuffer (_stream_writable.js:412:5)
at LengthBasedSplitter.Writable.write (_stream_writable.js:302:11)
at Socket.ondata (_stream_readable.js:722:22)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:182:23)
This may be related to the following issues: https://github.com/appium/appium/issues/13229 https://github.com/appium/appium/issues/13451
However, our problem differs in that we are only seeing these crashes when utilizing video recording, and our frame sizes seem absurdly high compared to the other issues. I should note, that this seems to happen more frequently on our older phones (iPhone 6+) compared to our newer phones (iPhone Xs), leading me to believe that this issue is exacerbated by how quickly the phone is to respond to video recording requests.
Link to Appium logs
https://gist.github.com/grant-mccarriagher/aaac30d0d76b4bb0d7eae3c55d339e98
Here’s a log of the suite when the error pops up.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)
Top GitHub Comments
@mykola-mokhnach I am still getting this issue with Appium 1.16.0
appium:safariWebInspectorMaxFrameLength
can customize it. https://github.com/appium/appium-xcuitest-driver#web-context