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 PAUSE button crash app #2344

Closed
luisfuertes opened this issue Apr 9, 2021 · 1 comment
Closed

Android PAUSE button crash app #2344

luisfuertes opened this issue Apr 9, 2021 · 1 comment

Comments

@luisfuertes
Copy link

luisfuertes commented Apr 9, 2021

Bug

When i use "controls=true" and press "pause" app crash on Android

Platform

Android Exoplayer

Which player are you experiencing the problem on:

  • Android ExoPlayer

Environment info

To configure player i only install module, create react-native.config.js file and execute npx react-native run-android

Exoplayer configured with react-native.config.js:

module.exports = {
  dependencies: {
    'react-native-video': {
      platforms: { android: { sourceDir: '../node_modules/react-native-video/android-exoplayer' } },
    },
  },
}

React native info output:

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 20.48 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.4.0 - ~/.nvm/versions/node/v12.4.0/bin/node
    Yarn: Not Found
    npm: 7.6.3 - ~/.nvm/versions/node/v12.4.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 23, 25, 26, 27, 28, 29, 30
      Build Tools: 23.0.1, 25.0.0, 25.0.2, 27.0.3, 28.0.3, 29.0.1, 29.0.2, 29.0.3, 30.0.2, 30.0.3
      System Images: android-27 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_222 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0 => 0.64.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version:

"react-native-video": "^5.1.1",
"@types/react-native-video": "^5.0.4",

Steps To Reproduce

  1. Load video
  2. Press "pause" controls button
  3. App crash
    (Tested on Xiaomi Mi Mix 2 (Android 9) and Xiaomi Mi A1 (Android 10))

Expected behaviour

  1. Load video
  2. Press "pause" controls button
  3. App crash

Reproducible sample code

import React, { FC, useRef } from 'react'
import { SafeAreaView } from 'react-native'
import Video from 'react-native-video'
import styles from './styles'

const PlayerView: FC = () => {
  const videoRef = useRef(null)
  const videoUri = 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8'

  return (
    <SafeAreaView style={styles.container}>
      <Video
        source={{ uri: videoUri }}
        ref={videoRef}
        //onBuffer={}
        //onError={this.videoError}
        style={{ flex: 1 }
        controls
      />
    </SafeAreaView>
  )
}

export default PlayerView

Video sample

const videoUri = 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8'

ADB Logcat FATAL EXCEPTION

 Shutting down VM
 FATAL EXCEPTION: main
 Process: com.myapp, PID: 32521
 java.lang.IllegalArgumentException: Unable to find JSIModule for class UIManager
 	at com.facebook.react.bridge.JSIModuleRegistry.getModule(JSIModuleRegistry.java:24)
 	at com.facebook.react.bridge.CatalystInstanceImpl.getJSIModule(CatalystInstanceImpl.java:564)
 	at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:90)
 	at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:46)
 	at com.facebook.react.uimanager.UIManagerHelper.getUIManagerForReactTag(UIManagerHelper.java:40)
 	at com.facebook.react.animated.NativeAnimatedNodesManager.handleEvent(NativeAnimatedNodesManager.java:505)
 	at com.facebook.react.animated.NativeAnimatedNodesManager.onEventDispatch(NativeAnimatedNodesManager.java:483)
 	at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:116)
 	at com.facebook.react.uimanager.JSTouchDispatcher.handleTouchEvent(JSTouchDispatcher.java:74)
 	at com.facebook.react.ReactRootView.dispatchJSTouchEvent(ReactRootView.java:283)
 	at com.facebook.react.ReactRootView.onInterceptTouchEvent(ReactRootView.java:201)
 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2573)
 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
 	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:444)
 	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1830)
 	at android.app.Activity.dispatchTouchEvent(Activity.java:3465)
 	at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
 	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:402)
 	at android.view.View.dispatchPointerEvent(View.java:12768)
 	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5274)
 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5074)
 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4589)
 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4642)
 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4608)
 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4748)
 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4616)
 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4805)
 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4589)
 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4642)
 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4608)
 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4616)
 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4589)
 	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7319)
 	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7286)
 	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7247)
 	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7427)
 	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:253)
 	at android.os.MessageQueue.nativePollOnce(Native Method)
 	at android.os.MessageQueue.next(MessageQueue.java:332)
 	at android.os.Looper.loop(Looper.java:168)
 	at android.app.ActivityThread.main(ActivityThread.java:6878)
 	at java.lang.reflect.Method.invoke(Native Method)
 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876)
@luisfuertes
Copy link
Author

I downgrade versions of rn / react to:

"react": "16.13.1",
"react-native": "0.63.4",

And bug fixed.

Maybe it is related with this react-native issue

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

1 participant