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] CoreNFC "Session invalidated unexpectedly" #29
Comments
I at least got it to stop crashing CoreNFC entirely by commenting out line 136 in
Unfortunately, this stops Edit: I got it working again by checking for
Hope this helps. I've never made a PR, but I can submit one if you'd like. |
@martyfuhry Yes, the same happens here on iOS 13.3, iPhone X, nfc_in_flutter 2.0.3. |
Your fix worked for me too 🙂 |
This issue still occurs in version 2.0.5 -> tested on iPhone 8 iOS version 14.8 |
I'm using an iPhone 8 running iOS 13.2. The plugin works fine for the first two interactions, but then I get this error:
2020-01-08 14:37:02.396459-0500 Runner[276:4816] [CoreNFC] 00000002 8364fea0 -[NFCHardwareManager queueReaderSession:sessionConfig:completionHandler:]:98 error=Error Domain=NFCError Code=202 "Session invalidated unexpectedly" UserInfo={NSLocalizedDescription=Session invalidated unexpectedly} 2020-01-08 14:37:02.396655-0500 Runner[276:4816] [CoreNFC] 00000002 818cfd00 -[NFCNDEFReaderSession beginSessionWithConfig:]:324 error:Error Domain=NFCError Code=202 "Session invalidated unexpectedly" UserInfo={NSLocalizedDescription=Session invalidated unexpectedly}, errorCode: 0xca 2020-01-08 14:37:02.397651-0500 Runner[276:4790] [VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: PlatformException(SessionTerminatedUnexpectedlyError, Session invalidated unexpectedly, null)
The NFC dialog won't come up, and only a reboot of the device will allow me to interact with CoreNFC again.
Steps to reproduce:
You'll need to reboot your device in order to get NFC working again. I tried walking through the debugger a few times, and the only thing I found was that second time I started reading NFC, the
onCancelWithArguments
function ran immediately, and thenreaderSession: didInvalidateWithError
function ran after that.Can anyone else with a physical device reproduce this behavior?
The text was updated successfully, but these errors were encountered: