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

"Error evaluating injectedJavaScript" #12

Open
timfrompepperstone opened this issue Jan 7, 2021 · 1 comment
Open

"Error evaluating injectedJavaScript" #12

timfrompepperstone opened this issue Jan 7, 2021 · 1 comment

Comments

@timfrompepperstone
Copy link

Minor issue, but when refreshing the token I'm getting a warning:

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=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}

The way I'm using the library is:

import ReCaptchaV3 from '@haskkor/react-native-recaptchav3';
...
const captchaRef = React.createRef<ReCaptchaV3>();

const SignInPage = () => {
    ...
    <ReCaptchaV3
        ref={captchaRef}
        captchaDomain={environment.captchaBaseUrl}
        siteKey={environment.captchaSiteKey}
        action={'signIn'}
        onReceiveToken={token => {
            ...
        }}
    />
    ...
    captchaRef.current?.refreshToken();
    ...
}

It'd be nice to get rid of the warning completely, but I'll suppress it anyway, so this is really quite a minor thing.

Thank you for the nice library 😄

@supmanyu
Copy link

onReceiveToken is not firing when this error is thrown when refreshToken is called, making this library unusable in our case.

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

2 participants