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
613 stars 155 forks source link

target is not running or doesn't have entitlement on ios #361

Open gh-pro opened 1 week ago

gh-pro commented 1 week ago

Describe the bug on react-native 0.76.2 player frame not work i have error on xcode console

To Reproduce Steps to reproduce the behavior: Play video player and get error Expected behavior

Expected behavior Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "((target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.rendering AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.networking AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.webcontent))" UserInfo={NSLocalizedFailureReason=((target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.rendering AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.networking AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.webcontent))}>

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Jul1enF commented 6 days ago

There's a lot of us experimenting trouble with the latest react native for the initial loading of react native webview. I did not have the exact same error code but i think it's the same problem.

Just actualising the webview component with a key props and a setTimeOut solved it for me.

Here's my code (using webview 13.12.4) :

const [webviewKey, setWebviewKey]=useState(1)

   useEffect(() => {
        if (Platform.OS === "ios"){
            setTimeout(()=>setWebviewKey(key=>key+1), 50)
        }
    }, [])

   <YoutubePlayer
          height={RPW(56)}
          videoId={article.video_id}

          webViewProps={{
          key : webviewKey,
          }}
   />

For more details : https://github.com/react-native-webview/react-native-webview/issues/3616

gh-pro commented 5 days ago

Thanks, i have retrograded plugin react-native-web-view a 11.25.0 and, all its work.