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

bug: Empty NFC tags cannot be written to on iOS #439

Open
5 of 34 tasks
wizzomafizzo opened this issue Feb 28, 2025 · 5 comments
Open
5 of 34 tasks

bug: Empty NFC tags cannot be written to on iOS #439

wizzomafizzo opened this issue Feb 28, 2025 · 5 comments

Comments

@wizzomafizzo
Copy link

Plugin(s)

  • Android Battery Optimization
  • Android Dark Mode Support
  • Android Edge-to-Edge Support
  • Android Foreground Service
  • App Review
  • App Shortcuts
  • App Update
  • Asset Manager
  • Background Task
  • Badge
  • Bluetooth Low Energy
  • Cloudinary
  • Datetime Picker
  • File Compressor
  • File Opener
  • File Picker
  • Live Update
  • Managed Configurations
  • NFC
  • Photo Editor
  • Posthog
  • Printer
  • Screen Orientation
  • Screenshot
  • Speech Recognition
  • Speech Synthesis
  • Torch
  • Zip

Version

7.0.2

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Trying to read, write or erase a blank NTAG tag on iOS results in the error: NDEF tag does not contain any NDEF message

Writing to the tag on Android and then writing with the same tag on iOS works.

Expected behavior

The tags are definitely valid and work correctly on Android.

Reproduction

https://github.com/ZaparooProject/zaparoo-app

Steps to reproduce

  1. Run Nfc.write with a valid NDEF record

Other information

I don't know if it's related or not but I believe this started happening after I upgraded the package from 6.4.0

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 7.0.1
@capacitor/core: 7.0.1
@capacitor/android: 7.0.1
@capacitor/ios: 7.0.1

Installed Dependencies:

@capacitor/core: 7.0.1
@capacitor/cli: 7.0.1
@capacitor/android: 7.0.1
@capacitor/ios: 7.0.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@wizzomafizzo wizzomafizzo added bug/fix Something isn't working needs: triage labels Feb 28, 2025
@wizzomafizzo
Copy link
Author

wizzomafizzo commented Feb 28, 2025

After downgrading to 7.0.1 I can now write to empty cards sometimes. The number isn't consistent but the first write always seems to fail, then the second or third write goes through.

I can also read empty cards consistently without error. On 7.0.2 they will error during read as well.

@robingenz
Copy link
Member

Thank you for reporting this. I will try to reproduce this tomorrow.

@wizzomafizzo
Copy link
Author

Thank you! Please let me know if you need any more information or testing. The behaviour in 7.0.1 is acceptable as long as I can instruct users how to eventually get it working without external apps/equipment. I was guessing it's probably not safe to downgrade as far as 6.4.0 now that my capacitor is v7

@robingenz
Copy link
Member

robingenz commented Mar 1, 2025

I have just tried to reproduce the problem with our NFC demo app but unfortunately without success:

ScreenRecording_03-01-2025.15-20-03_1.1.MP4

Deleting, adding and reading (empty) NDEF messages works without any problems. Please give me more detailed instructions and create a minimal, reproducible example so that I can reproduce the problem.

@wizzomafizzo
Copy link
Author

Thank you for testing it. Let me go back and try to refactor what I've got, I can only imagine I've done something wrong then, I have some complicated logic to manage the scan session globally. No problem to close this then I'm not sure if I can produce a minimal build any time soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants