LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
607 stars 155 forks source link

Bug Version Android #331

Open NeuVanessa opened 6 months ago

NeuVanessa commented 6 months ago

I'm trying to play the videos using the library, but I have this error.

ERROR Invariant Violation: Failed to call into JavaScript module method WebViewMessageHandler7.onMessage(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 12): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, HMRClient, AppRegistry, RCTEventEmitter, RNCWebViewMessagingModule. A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

         <YoutubePlayer
          videoId={"cRlYOHIwUGw"}
          height={250}
          ref={playerRef}
          initialPlayerParams={{
            controls: false,
            modestbranding: false,
            showClosedCaptions: 0,
          }}
          //onPlaybackQualityChange={"hd1080"}
          mute
          play
        />
LonelyCpp commented 6 months ago

can you add more details about your setup? (use the issue template)

rsunbabu commented 6 months ago

I too did see this error. Can you run this and see

sudo npx expo install --check

the cause of the issue may w.r.t to the react-native-webview version installed. In my case; after running the above command the version was downgraded and then it worked perfectly

image