Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
Android React Native WebView cargando Recaptcha a través de la pestaña de script no funciona

Tenemos el siguiente código cargado en un WebView en React Native:

 <!DOCTYPE html> <html> <head> <style> body { display: flex; justify-content: left; align-items: top; } </style> </head> <body> <div id="inline-badge"></div> <script src="https://www.google.com/recaptcha/api.js?render=explicit&onload=onRecaptchaLoadCallback"></script> <script> alert('js is running'); function onRecaptchaLoadCallback() { alert('onRecaptchaLoadCallback loaded'); } </script> </body> </html>`

Lo que se espera que suceda es que el código se cargue para Recaptcha desde https://www.google.com . Una vez cargado, onload=onRecaptchaLoadCallback llamará a la función onRecaptchaLoadCallback.

Esto funciona en iOS. La alerta para js is working , luego de cargar el script, se llama a la función onRecaptchaLoadCallback (y muestra el contenido de la alerta)

En Android, solo recibimos la primera alerta, pero nunca se llama a onRecaptchaLoadCallback.

Aquí está el código del componente WebView como referencia:

 <WebView nativeID={id} style={{ width: 0, height: 0 }} originWhitelist={['*']} startInLoadingState={true} javaScriptEnabledAndroid={true} javaScriptEnabled={true} domStorageEnabled={true} mixedContentMode="always" allowUniversalAccessFromFileURLs={true} source={{ html: recaptchaHtmlWithKey, baseUrl: 'https://www.our-site-url.com' }} onMessage={(event) => { onCheck(event.nativeEvent.data) }} />

También tenga en cuenta que tenemos el permiso de INTERNET establecido en el archivo Gradle de Android.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!