NullPointerException com.mattermost.pasteinputtext.PasteInputEditText in onCreateInputConnection
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- android, react-native
- Domain
- mobile-dev
Research direction
Start by inspecting PasteInputEditText.onCreateInputConnection at line 58 and review the supplied uncontrolled React Native usage. Reproduce the Sentry stack trace on Android with the sample props, then determine whether the failure is in the library or the integration. Done should include a confirmed cause and a verified resolution, but the issue does not define expected behavior or test coverage.
Written by the indexing model from the issue text.
Description
Hey mattermost team, wonder if anyone hit this before on Android device.
More context on how we use it, we are using it as uncontrolled input like how bluesky is using it.
Will wanna identify if it's a library issue or my implementation issue.
Please let me know if any more information is needed.
Sample code on how I'm using it
const pasteInputRef = useRef<PasteInputRef>(null);
useImperativeHandle(ref, () => ({
focus: () => {
pasteInputRef.current?.focus();
},
blur: () => {
pasteInputRef.current?.blur();
},
clear: () => {
pasteInputRef.current?.clear();
},
}));
return (
<View style={containerStyle}>
<PasteInput
ref={pasteInputRef}
multiline
maxLength={500}
style={[styles.input, disabled && styles.disabled, inputStyle]}
onChangeText={onChangeText}
onPaste={() => {}}
autoCorrect
pointerEvents={disabled ? 'none' : 'auto'}
caretHidden={disabled}
editable={!disabled}
readOnly={disabled}
focusable={!disabled}
placeholderTextColor={disabled ? colorScheme['content-disabled'] : colorScheme['content-placeholder']}
allowFontScaling={false}
selectionColor={inputSelectionColor}
selectionHandleColor={androidInputSelectionHandleColor}
cursorColor={androidInputCursorColor}
>
{children}
</PasteInput>
</View>
);
Stack trace on Sentry:
com.mattermost.pasteinputtext.PasteInputEditText in onCreateInputConnection at line 58
android.view.inputmethod.InputMethodManager in startInputInner at line 2318
android.view.inputmethod.InputMethodManager in restartInput at line 2174
com.android.internal.inputmethod.RemoteInputConnectionImpl in lambda$scheduleInvalidateInput$0$com-android-internal-inputmethod-RemoteInputConnectionImpl at line 298
com.android.internal.inputmethod.RemoteInputConnectionImpl$$ExternalSyntheticLambda7 in run at line 4
android.os.Handler in handleCallback at line 942
android.os.Handler in dispatchMessage at line 99
android.os.Looper in loopOnce at line 211
android.os.Looper in loop at line 300
android.app.ActivityThread in main at line 8324
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 581
com.android.internal.os.ZygoteInit in main at line 1028
- Dominant language
- Objective-C
- Stars
- 213
- Forks
- 38
- Avg merge
- 12h 25m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mattermost/react-native-paste-input
-
v2 paste interception silently bails on RN 0.76+ Fabric (uses `__nativeTag` which is undefined) Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mattermost/react-native-paste-input#54 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
mattermost/react-native-paste-input#47 · 6 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
All issues in mattermost/react-native-paste-input
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objective-see/LuLu#925 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
obsproject/obs-studio#13918 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HigherOrderCO/Bend#842 · 2 comments ·