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

[Bug]: Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string #27

Open
martwozniak opened this issue Jun 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@martwozniak
Copy link

Version

"@api.video/react-native-player": "^1.0.2",

Environment that reproduces the issue

  • MacBook Pro physical device
  • iPhone physical device
  • Android Devices
  • IOS Simulators / iPhone / iPad
  • Android Simulators

Is it reproducible in the example application?

Not tested

Reproduction steps

  1. Create context
  2. Add ref from context to component
  3. Update video id dynamically, use ref to start and stop videos (cause rerender of Component with )
image (13)

Expected result

No error related to injected java script [yellow error in react native]

Actual result

Yellow error in react native:
Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: player, WKJavaScriptExceptionColumnNumber=7, WKJavaScriptExceptionSourceURL=undefined, NSLocalizedDescription=A JavaScript exception occurred}

Additional context

When i check url to video that must be displayed in browser I am getting 404 error,
but this error occur with correct video too.

Relevant logs output

WARN  Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: player, WKJavaScriptExceptionColumnNumber=7, WKJavaScriptExceptionSourceURL=undefined, NSLocalizedDescription=A JavaScript exception occurred}
 WARN  Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string. Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: player, WKJavaScriptExceptionColumnNumber=7, WKJavaScriptExceptionSourceURL=undefined, NSLocalizedDescription=A JavaScript exception occurred}
@martwozniak martwozniak added the bug Something isn't working label Jun 7, 2024
@olivierapivideo
Copy link
Member

Hey,
Can you try again with the new 1.1.0 version and let us know if the problem is still there?
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants