react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Not able to proceed with TextInput || iOS release

Open HarshitMadhav opened this issue 1 year ago • 60 comments

New Version

0.72.0

Old Version

0.68.5

Build Target(s)

iOS simulator release mode

Output of react-native info

System: OS: macOS 14.1.1 CPU: (8) arm64 Apple M1 Pro Memory: 77.88 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild Languages: Java: 17.0.7 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.72.0 => 0.72.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

Hi! I have updated the react native version from 0.68.5 to 0.72.0 the flipper and other dependencies are updated successfully.

I am facing this issue

-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

while I am running the iOS app in release mode in Simulator (iPhone 15 - iOS 17.0), due to which I am not able to proceed further in the application.

The debug build works fine.

Attached screenshot is of the log that I am getting while clicking on a button after giving input to a TextInput

Screenshot 2023-12-05 at 5 05 23 PM

HarshitMadhav avatar Dec 05 '23 11:12 HarshitMadhav

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Dec 05 '23 11:12 github-actions[bot]

also dealing with this issue. I believe the same issue has been addressed on Apple forum https://forums.developer.apple.com/forums/thread/731700 and on StackOverflow https://stackoverflow.com/questions/77165006/searchable-swiftui-on-ios-17-cause-an-error-invalid-numeric-value but no solution has been proposed yet. I get the same log when I click a TextInput on the simulator.

RN 72.5 Expo 49.0.13

hcac10 avatar Dec 21 '23 21:12 hcac10

Getting this too, in release mode I can't input text, works fine in development

Expo 50 RN 0.73.2

squareborg avatar Jan 29 '24 18:01 squareborg

Also getting this: [RemoteTextInput] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

Expo 50.0.4 RN 0.73.2

dancosta-fed avatar Jan 30 '24 18:01 dancosta-fed

Also getting this: [RemoteTextInput] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

Expo 50.0.4 RN 0.73.2

same

SamiAljord avatar Jan 31 '24 08:01 SamiAljord

Also getting this: [RemoteTextInput] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

Expo 50.0.4 RN 0.73.2

same

RichardSchleger avatar Jan 31 '24 16:01 RichardSchleger

anyone looking into this issue?

geekabhinavp avatar Feb 08 '24 10:02 geekabhinavp

@geekabhinavp I'm facing the same issue in .NET MAUI. Got some folks looking into it - I'll try to post helpful content here once the solution is found.

justinflint avatar Feb 12 '24 01:02 justinflint

Also getting this: [RemoteTextInput] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

Expo 50.0.4 RN 0.73.2

same

coyksdev avatar Feb 22 '24 11:02 coyksdev

Same

webdiego avatar Feb 23 '24 01:02 webdiego

Bummer, I have this same issue in my app when I try to use my "sell" button in the simulator which should subtract from an array I made..hopefully we can solve it.

UnknownUserdot avatar Feb 23 '24 16:02 UnknownUserdot

You are likely destroying/recreating the component on re-rendering. Hard to say for sure what the issue is without any reproduction code.

If you are doing something like this where you define an input inline, i.e.

App() {
 const InlineInput = () => <TextInput /> // Move this outside of the function definition.

  return (
   <InlineInput />
  )
}

You will see this error.

Previous versions of RN/iOS didn't seem to mind this, but now it's causing problems. My opinion is this is not a bug, but an implementation issue. Native devs see this too when they use LazyVStacks that recycle.

Hope that helps

mphill avatar Feb 28 '24 11:02 mphill

Same thing happens to me even with HTML textarea/inputs. Tried with webview element in as root level (app/_layout.tsx) but it didn't help.

boltlessengineer avatar Feb 28 '24 19:02 boltlessengineer

same issue, "react-native": "0.71.14", expo 0.7.3 even if nothing but textinput surrounded by view with no other code will still get error when press on text input in simulator: [RemoteTextInput] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

update: worked with reset to metro.

joshuagodwin avatar Mar 08 '24 07:03 joshuagodwin

@joshuagodwin can you elaborate your solution please, currently having the same issue in development

CRIIPI11 avatar Mar 19 '24 00:03 CRIIPI11

Seems that issue only happens when you use physical keyboard on ios simulator, try to use "Software keyboard" from simulator. Menu bar > I/O > Keyboard > Toggle Software Keyboard.

lesimoes avatar Apr 10 '24 02:04 lesimoes

Seems that issue only happens when you use physical keyboard on ios simulator, try to use "Software keyboard" from simulator. Menu bar > I/O > Keyboard > Toggle Software Keyboard.

I tried it... It still remain... But if its just a development warning, then no problem. :)

hassanad94 avatar Apr 17 '24 14:04 hassanad94

"Command" + "Shift" + "K" alternates between software or hardware keyboard...but yeah, in development, the warning error will still be shown in the console:

[RemoteTextInput] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:]  perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = <null selector>, customInfoType = UIEmojiSearchOperations

ianbunn avatar Jul 19 '24 14:07 ianbunn

You are likely destroying/recreating the component on re-rendering. Hard to say for sure what the issue is without any reproduction code.

If you are doing something like this where you define an input inline, i.e.

App() {
 const InlineInput = () => <TextInput /> // Move this outside of the function definition.

  return (
   <InlineInput />
  )
}

You will see this error.

Previous versions of RN/iOS didn't seem to mind this, but now it's causing problems. My opinion is this is not a bug, but an implementation issue. Native devs see this too when they use LazyVStacks that recycle.

Hope that helps

I had the same structure as below. When separating some components as function expressions within the same component, the same error occurs, and there's an issue with losing focus after typing.

const MyComponent = () => {

  const HeaderComponent = () => <TextInput />;

  return (
    <>
      <HeaderComponent />
    </>
  );
};

export default MyComponent;

The problem was resolved by modifying it as follows, but I'm not sure about the exact cause either.

const MyComponent = () => {
  return (
    <>
      <TextInput />;
    </>
  );
};

export default MyComponent;

eyedroot avatar Jul 22 '24 07:07 eyedroot

I am facing the same issue. I found that first mount is ok, then I used expo-router to navigate back, and navigate to data entry page again that is when I see this message

clool avatar Jul 30 '24 19:07 clool

I found that first mount is ok, then I used expo-router to navigate back, and navigate to data entry page again that is when I see this message

I am seeing the same error when navigating back to a previous page after entering data on a dedicated data-entry page in .Net MAUI 8 via MAUI's Shell as well. Seems to only be happening on my Sim's, not real devices. Tried iOS-sim v17.2/17.5 with/without physical keyboard and didn't seem to change. iPhone XR with iOS 17.5.1 and iPhone 12-iOS 16.6 had no issues.

jasells avatar Aug 05 '24 19:08 jasells

I am facing the same issue when using in-app-payments-react-native-plugin. Happens when I enter card information and tap "Pay". on React Native CLI 0.74.3, iOS 17.

KlutchKyle avatar Aug 06 '24 16:08 KlutchKyle