Bug with Apex Manager

I always have to scan my implant twice to generate my OTP codes, because the first scan keeps giving this error:

It used to just pull up the codes on first scan. any help in fixing this would be appreciated! :slight_smile:

I’m on version 3.4.9

1 Like

I’m on the same version but don’t have this problem.

Are you set up to go straight to OTP on scan?

What apps do you have on your Apex?

yes i have ‘navigate to OTP screen on initial scan’ enabled

installed apps are: hmac-sha1, otp authenticator, free memory, fido security

Has the phone or apps changed?

1 Like

sadly no, same phone since i put the implant in. i tried uninstalling and re-installing the app but i still get that error. i can still get my codes thankfully, it just requires two scans so it’s a bit of an annoyance

The only thing I can think of is a coupling problem. Initial scan does a lot.. it’s probing all the apps it’s selecting all the AIDs, and then finally pulling all the OTPs. If there’s a problem with the coupling at any point, it will show this error.

1 Like

There’s another possibility though. Has your phone had an update? My nothing phone 2 was working awesome with NFC tags, then I updated it and it continued to be absolute shit at reading anything until I had to fucking contact the goddamn engineer in Taiwan who built the NFC stack for the phone to tell me fucked it up. He gave me a preview patch which fixed it, then they pushed it in there next update.

Updates can always break shit.

4 Likes

i have updates disabled on my phone and im not sure if its coupling issue because it worked fine in the past. unclear what changed :frowning: is there a log file somewhere hidden in the app that could give me more details on the error?

@hoker may have put a secret log view in but adb logcat should output some useful information if you have developer tools on and want to debug it.

Clearly something has changed.. and if the phone hasn’t changed, you haven’t installed any other NFC apps, you haven’t changed NFC settings (google pay?), the app hasn’t changed, and settings on the app haven’t changed, then that leaves;

  • your behavior
  • your implant

Hopefully this is not an indication the implant is slowly losing performance (failing? infiltration?)

2 Likes

@pac

  • Are other applets working properly? As in, is the correct state loading for things other than OTP?
  • Is your OTP applet password protected
  • Can you try disabling the “Navigate to OTP” settings option and try scanning from launch again
  • If you go to settings and tap the version number at the bottom and then scroll to the top of the screen, you should see an “Export Logcat” option. It will write a logcat dump to your documents folder (I think that’s where I put it). Go ahead and DM me the logcat if you’re cool with it.
4 Likes

After doing this, scaning implant brings up the list of features, and then when i click authenticator, it shows the same error message. then re-scanning brings up my otp codes

yeah, since the day i had it put in. have the password cached into the app

yeah all the applets work, its just the OTP applet that requires a second scan to actually get at the codes whereas before it would just bring them up on the first scan with no error.

DM’d you :slight_smile:

2 Likes

What phone are you using? Would you mind doing something really annoying for me?

It sounds like a potential coupling issue. Like @amal said, the initial scan in Apex Manager is doing a LOT. It’s manually sniffing out what applets are installed, and then performing actions (like OTP code generation, 2 passes btw) for each applet that is installed. I currently have the app wired where if an applet action doesn’t 100% succeed, it won’t necessarily count as a bad scan, but the applet that failed to run it’s actions will simply require a rescan.

OTP is currently the heaviest applet in terms of raw APDUs running under the hood on initial scan.

Anyways, back to the annoying thing. Will you as carefully as possible, position your phone as perfectly on your implant as possible while on the Apex Manager initial screen (with navigate to OTP off). Get like 10 scans from the initial screen and let me know if any of them result in the OTP creds showing without you first having to rescan.

I just want to know if there’s ever a time when they generate properly from initial scan. I’ll dig through your logcat now in the meantime:)

2 Likes

Hey, one more thing, does a version number show on the right side of the OTP applet card on the Apex Manager main screen post-initial scan?

2 Likes

No it just says authenticator and then a “>” on the right side of that

I tried this and none of the scans from the initial screen worked (but then scanning a second time from the error message screen works fine), do you want the logcat from these attempts as well?

1 Like

Nah, you’re good. Thanks though. Your first logcat actually pointed me to what I believe is the smoking gun. You have an old version of the OTP applet. It has a different AID and I believe what’s happening is the code that fires from the initial scan is using the new AID exclusively, while on the OTP screen itself, I have a fallback option to the old AID if the new one doesn’t work. If it’s alright with you, I’ll try and fix this on my end and then send you a test APK to have you test and confirm it’s been resolved. Unfortunately I don’t have any P71s with the old OTP applet on it so I can’t verify myself easily. Is that cool with you? I can work on a fix now.

5 Likes

Thanks for reporting this issue @pac ! I never would’ve found this otherwise

3 Likes

Little update, I had to make a change to my underlying NFC library to add the old AID in. It’s currently running a new build now. Once that’s done, I’ll pull it down and cut a new test build of Apex Manager and send you an APK @pac .

5 Likes

happy to test the apk for ya :slight_smile: i can also update my otp applet

2 Likes

Eh, It’s a pain to update the applet cause you’d lose all your OTP credentials. If you don’t mind, give this a test first at least:) Building the APK now with the potential fix. Finger’s crossed!

1 Like

I’ll DM it to ya

1 Like