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

iOS simulator crash on rapid keyboard input in search screen #3622

Open
rk-for-zulip opened this issue Sep 19, 2019 · 4 comments
Open

iOS simulator crash on rapid keyboard input in search screen #3622

rk-for-zulip opened this issue Sep 19, 2019 · 4 comments

Comments

@rk-for-zulip
Copy link
Contributor

rk-for-zulip commented Sep 19, 2019

Steps to reproduce:

  1. Open the app in the iOS simulator, connected to a dev server. Log in if needed.
  2. Tap the magnifying glass in the upper right.
  3. Smash the physical keyboard.

After a moment, the app will crash with the message Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string., with an associated callstack containing only library code.

Could not replicate on the Android emulator. Could not replicate while connected to chat.zulip.org (rather than a dev server). Tests not yet performed with real hardware.

@rk-for-zulip rk-for-zulip changed the title i iOS simulator crash on rapid keyboard input in search screen Sep 19, 2019
@rk-for-zulip
Copy link
Contributor Author

(Accidentally submitted very prematurely due to fumblefingers. Apologies.)

@rk-for-zulip rk-for-zulip reopened this Sep 19, 2019
@gnprice
Copy link
Member

gnprice commented Sep 19, 2019 via email

@chrisbobbe
Copy link
Contributor

Hmm. I just ran into this error today while working on #3832, except I wasn't typing in the search box, I was typing in the compose box.

It only happened once, and I haven't been able to reproduce it again. It seemed as though (maybe?) clicking the back button shortly after I finished smashing the keyboard might have triggered it, but again it's only happened this once. It was on chat.zulip.org, which Ray says he tried but wasn't able to reproduce it on.

I was using the iOS simulator (simulating iPhone 11, iOs 13.3).

I noticed that the WebView does not use the "injectJavaScript" or the "injectedJavaScript" props; it seems like the error message refers to the latter prop.

@gnprice
Copy link
Member

gnprice commented Jan 24, 2020

I noticed that the WebView does not use the "injectJavaScript" or the "injectedJavaScript" props; it seems like the error message refers to the latter prop.

Yeah, this isn't a name we refer to directly in our code, but it appears in the implementation of WebView, and specifically in the implementation of the postMessage method, which we do use.

Here's the source code for that error message, in fact:

$ rg injectedJavaScript node_modules/
[...]
node_modules/react-native-webview/ios/RNCWKWebView.m
798:      RCTLogError(@"Error evaluating injectedJavaScript: This is possibly due to an unsupported return type. Try adding true to the end of your injectedJavaScript string.");

Some related discussion in #3572. I guess in particular my comment above:

I think it probably has to mean a bug in the implementation of postMessage.

would mean that fixing #3572 would also fix this issue.

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

3 participants