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

Android 13 video freezes after some time #628

Closed
EdShel opened this issue Nov 28, 2022 · 11 comments
Closed

Android 13 video freezes after some time #628

EdShel opened this issue Nov 28, 2022 · 11 comments

Comments

@EdShel
Copy link

EdShel commented Nov 28, 2022

Bug Report

Current behavior
On Android 13 after connecting, the video suddenly freezes - the image stays the same forever (both for the current user and other subscribers). The audio still works OK.

Steps to reproduce

  1. Create and launch Android 13 simulator (API level 33) within Android Studio
  2. Clone Github repository with sample apps
  3. Go to BasicVideoChat project
  4. Inside App.js provide API key, session id, token
  5. (optional) Inside App.js add these props to the OTPublisher component (to use simulated 3D room back camera):
properties={{cameraPosition: 'back'}} 
  1. Run the app
yarn && yarn android
  1. You can move the camera around, but after some time the video gets stuck and never resumes.

After some time, we found out that the problem occurs on the OT Android SDK 2.23.0 and above (2.22.3 and lower worked ok) - we overrode the SDK version in gradle configuration.

We couldn't reproduce the bug on Android 12 and 11.

Android SDK sample app (Basic-Video-Chat-Java) also worked fine.

Example Project
Reproduced in sample apps

What is the current bug behavior?
The video randomly gets stuck on Android 13.

What is the expected correct behavior?
The video should always play.

Relevant logs and/or screenshots
Slice of the logs at the moment of freeze

11-28 17:15:45.153   393  6653 W android.hardware.audio@7.1-impl.ranchu: TinyalsaSource::read:143 pcm_read was late delivering frames, inserting 15238 us of silence
11-28 17:15:45.235  6485  6496 I .basicvideochat: Background concurrent copying GC freed 112658(10MB) AllocSpace objects, 8(160KB) LOS objects, 49% free, 6431KB/12MB, paused 40us,13us total 128.437ms
11-28 17:15:45.268  6485  6504 E BufferQueueProducer: [SurfaceTexture-42-6485-0](id:195500000002,api:4,p:512,c:6485) queueBuffer: BufferQueue has been abandoned
11-28 17:15:45.268   512  6589 E Surface : queueBuffer: error queuing buffer, -19
11-28 17:15:45.269   512  6589 E Camera3-PreviewFrameSpacer: queueBufferToClientLocked: Failed to queue buffer to client: No such device(-19)
11-28 17:15:45.270  6485  6634 E BufferQueueProducer: [SurfaceTexture-42-6485-0](id:195500000002,api:4,p:512,c:6485) dequeueBuffer: BufferQueue has been abandoned
11-28 17:15:45.270   512  6581 E Camera3-OutputStream: getBufferLockedCommon: Stream 0: Can't dequeue next output buffer: No such device (-19)
11-28 17:15:45.270   512  6581 W Camera2Client: notifyError: Received recoverable error 3 from HAL - ignoring, requestId 10000001
11-28 17:15:45.304   393  6653 W android.hardware.audio@7.1-impl.ranchu: TinyalsaSource::read:143 pcm_read was late delivering frames, inserting 15238 us of silence
11-28 17:15:45.310  6485  6634 E BufferQueueProducer: [SurfaceTexture-42-6485-0](id:195500000002,api:4,p:512,c:6485) queueBuffer: BufferQueue has been abandoned
11-28 17:15:45.311   512  6589 E Surface : queueBuffer: error queuing buffer, -19
11-28 17:15:45.345  6485  6504 E BufferQueueProducer: [SurfaceTexture-42-6485-0](id:195500000002,api:4,p:512,c:6485) queueBuffer: BufferQueue has been abandoned
11-28 17:15:45.345   512  6589 E Surface : queueBuffer: error queuing buffer, -19
11-28 17:15:45.518   393  6653 W android.hardware.audio@7.1-impl.ranchu: TinyalsaSource::read:143 pcm_read was late delivering frames, inserting 15238 us of silence
11-28 17:15:45.670   393  6653 W android.hardware.audio@7.1-impl.ranchu: TinyalsaSource::read:143 pcm_read was late delivering frames, inserting 15238 us of silence
11-28 17:15:45.883   393  6653 W android.hardware.audio@7.1-impl.ranchu: TinyalsaSource::read:143 pcm_read was late delivering frames, inserting 15238 us of silence

The complete log file:
basic-video-chat-video-freeze-logs.txt

@josmmv
Copy link

josmmv commented Dec 1, 2022

I had a similar issue, publisher video freezes after about 5 seconds. I had to flip the camera position to fix it, but it happens again after a few seconds.

Enviroment:

  • opentok-react-native: 0.21.1
  • Android: 11 (MIUI 12.5.8 stable)
Screenrecorder-2022-12-01-17-54-59-541.0.mp4

@KiranRadish
Copy link

KiranRadish commented Dec 2, 2022

I am having similar issue on android. publisher video freezes after few seconds.
opentok-react-native": "^0.21.1

@KiranRadish
Copy link

@josmmv @EdShel did you found any solution for this?

@EdShel
Copy link
Author

EdShel commented Dec 7, 2022

@josmmv @EdShel did you found any solution for this?

No, we've decided to reimplement streaming functionality on web using opentok-react and serve the new page via a web-view in the app. This approach still brings issues when connecting bluetooth headphones, but at least the video works

@vineus
Copy link

vineus commented Dec 28, 2022

Same issue here, downgrading to

 "opentok-react-native": "0.20.4"

"solved" it

@pietgk
Copy link
Contributor

pietgk commented Jan 10, 2023

@enricop89 any progress on this issue?, sorry to push but we are blocked on using vonage where we need to upgrade to use the latest android SDK and this needs to be fixed before that can happen.
Thx in advance for the feedback :-)

@kapilmishr
Copy link
Collaborator

kapilmishr commented Jan 10, 2023

@pietgk Team is working on this issue and we will have some updates by next week.

@pietgk
Copy link
Contributor

pietgk commented Jan 10, 2023 via email

@kapilmishr
Copy link
Collaborator

Hi Piet Groot Kormelink,

We will provide the relevant update here from Jira next week.

Thanks,
Kapil

@pietgk
Copy link
Contributor

pietgk commented Jan 10, 2023 via email

@nicwise
Copy link
Contributor

nicwise commented Jan 25, 2023

Hi @kapilmishr - any updates? We have a fair few users on Huawei phones, which means they get no audio until we get 2.24.x native android lib in.... and this one is blocking it, I'm told.

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

7 participants