mattermost / mattermost/react-native-paste-input
NullPointerException com.mattermost.pasteinputtext.PasteInputEditText in onCreateInputConnection
Personne n'a encore pris cette issue.
- Langage dominant
- Objective-C
- Étoiles
- 213
- Forks
- 38
- Merge moyen
- 12 h 25 min
- PR mergées (30 j)
- 1
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par inspecter PasteInputEditText.onCreateInputConnection à la ligne 58 et examinez l’utilisation non contrôlée de React Native fournie. Reproduisez la stack trace de Sentry sur Android avec les props d’exemple, puis déterminez si l’échec se situe dans la bibliothèque ou dans l’intégration. Done doit inclure une cause confirmée et une résolution vérifiée, mais l’issue ne définit ni le comportement attendu ni la couverture des tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- android, react-native
- Domaine
- mobile-dev
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 28/100