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

Trying to resolve view with tag 1978 which doesn't exist at com.facebook.react.uimanager.RNCustomKeyboardModule.getEdiyById (RNCustomKeyboardModule.java:48) #20

Open
singhlovey opened this issue May 21, 2018 · 10 comments · May be fixed by #21

Comments

@singhlovey
Copy link

Hi,

I am getting very strange crash. When I opened keyboard on text input on any of the pages of my app and switch to another page, my app get crashed.

I have attached one screen shot of bug. Please help!!

Thanks

60083853-7ec1-4347-a248-4421c12f12fd

@scottaglia
Copy link

I'm getting the same error.

"react-native": "0.54.3",
"react-native-custom-keyboard": "^1.0.4",

For now I'm avoiding the crash with a try catch in android (I'm not building for iOs), even though this won't activate the custom keyboard.

private ReactEditText getEditById(int id) {
		try {
			UIViewOperationQueue uii = this.getReactApplicationContext().getNativeModule(UIManagerModule.class).getUIImplementation().getUIViewOperationQueue();
			return (ReactEditText) uii.getNativeViewHierarchyManager().resolveView(id);
		} catch(IllegalViewOperationException e) {
			return null;
		}
}

@singhlovey
Copy link
Author

singhlovey commented May 21, 2018

@markainick

Can you please test the same on different devices. I have also made the same changes and not getting crash but now getting different crash.

this crash comes on android 7.1

8214dfb3-d152-4140-aa49-0d6ee532e464

@scottaglia
Copy link

@singhlovey can you please paste the full error stack?
Btw it looks like I'm getting the error only in Remote JS Debugging

@singhlovey
Copy link
Author

@markainick

I am not getting any crash in debug mode. After testing release apk on multiple device, I got the above in one of the devices.

I have only this screen shot for now.

Thanks

@singhlovey
Copy link
Author

@markainick

Please help for the above issue. I am stuck.

Thanks

@scottaglia
Copy link

I don't really have a solution. For now I'm getting around it by manually installing the custom keyboard when i know for certain that the custom input is on screen.

@singhlovey
Copy link
Author

singhlovey commented May 23, 2018

@markainick

Can you please provide me sample e.g of how you are installing the custom keyboard when needed.

Thanks

@laurentS
Copy link

@markainick we've been experiencing this issue as well, but it's been inconsistent. As you can see in my PR, I've pushed what you did above a step further, and kept looping until it finds the input. This seems to cause apps to hang in some cases, that we haven't quite identified yet. (see the comments on the PR thread)
Can you share how you "know for certain that the custom input is on screen"?

@scottaglia
Copy link

@laurentS I added the same method (with name installKeyboard) in the CustomTextInput inside index.js (just like you did in you PR), and I'm calling that method from the onLayout callback of the custom input wrapper through a ref.

@singhlovey
Copy link
Author

singhlovey commented May 24, 2018

@markainick

Can you please provide sample example of the above you did to get more clarification. It would be really helpful.

Thanks

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

Successfully merging a pull request may close this issue.

3 participants