Coder Social home page Coder Social logo

Comments (11)

alinz avatar alinz commented on July 30, 2024

I might start implementing a retry method to prevent this issue. Give me couple of days. Sorry that it takes tool long to answer.

from react-native-webview-bridge.

victorkas avatar victorkas commented on July 30, 2024

Hi Alinz,

Thanks for looking into this. I'm also experiencing the issue "Invalid view returned from registry", is there a workaround in the mean time?

Thanks!

from react-native-webview-bridge.

alinz avatar alinz commented on July 30, 2024

@victorkas I have experiences this crash in simulator. However, in device, I haven't seen it yet. Have you seen this happening in device?

from react-native-webview-bridge.

victorkas avatar victorkas commented on July 30, 2024

Thanks @alinz . I traced the issue and it looks like a fetch() call in a view code that when it returns tries to send a message to WebViewBridge and causes the issue if the component has unmounted. I'm not sure if there's a cleaner way to detect if a component has unmounted, but i've added a check to avoid the crash -
if (!this.refs.webViewBridge) return;

from react-native-webview-bridge.

tazmattaz avatar tazmattaz commented on July 30, 2024

Hi @alinz, yes I am facing this issue in device too. Cause of this issue I have to stop some important tasks which is using webview bridge. So I need this asap. :(

Error getting while crashing:
OFF, performance optimizations are ON'
2015-09-30 12:34:28.808 projectname[1638:215192] *** Assertion failure in __53-[RCTWebViewManager(WebViewManager) callbackCleanup:]_block_invoke(), /path/projectname/node_modules/react-native-webview-bridge/WebViewBridge/RCTWebViewManager+WebViewManager.m:37
2015-09-30 12:34:28.810 [error][tid:main][RCTUIManager.m:887] Exception thrown while executing UI block: Invalid view returned from registry, expecting RKWebView, got: (null)

Thanks in advance.

from react-native-webview-bridge.

alinz avatar alinz commented on July 30, 2024

@tazmattaz I need some time for this since I have to dive into React-Native code base. in a meantime can you provide a simple example that always causes this problem?

from react-native-webview-bridge.

tazmattaz avatar tazmattaz commented on July 30, 2024

I cannot provide the main code but this happens usually while we typing into any textarea/textfield or navigate from one page to another(both or single page use webview) or if any age use webview and we click on back button without loading that page.
In all of above cases, my app is crashing....

from react-native-webview-bridge.

carbonphyber avatar carbonphyber commented on July 30, 2024

@alinz Steps to reproduce:

  1. close iOS Simulator and React Native packager if running.
  2. replace index.ios.js in Sample1 from react-native-webview-bridge repo with the index.ios.js code from this Gist
  3. clean (optional), run
  4. The two text links at the top are Navigator scenes. The default upon load is an empty View. Click the web text to load Netflix.com in a new scene composed of 'react-native-webview-bridge'
  5. Click the back text to unload the Webview Bridge scene.
  6. Assertion failure / thrown exception described in this issue is thrown soon after the WebView Bridge appears to be animated away.

from react-native-webview-bridge.

gs-akhan avatar gs-akhan commented on July 30, 2024

@alinz Hi,
This is resolved. ?

from react-native-webview-bridge.

CorpusCallosum avatar CorpusCallosum commented on July 30, 2024

Hi I was able to circumvent the error by wrapping the cleanup call in a try-catch. I created a fork here: https://github.com/CorpusCallosum/react-native-webview-bridge

You can install it via NPM by adding this line in your package.json dependencies:
"react-native-webview-bridge": "https://github.com/CorpusCallosum/react-native-webview-bridge/tarball/master"

I'm not sure what the cleanup call is doing, but this seems to be working as expected for me now with no errors.

from react-native-webview-bridge.

alinz avatar alinz commented on July 30, 2024

I have found and rewritten this module and I think this error has been resolved. The only thing that you have to remember is it has a hard dependency to react-native 0.16 and above. I will make support for 0.15 and 0.14 if I receive enough request. Please reopen this issue if you still encounter this problem.

from react-native-webview-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.