martinpaljak / GlobalPlatformPro

🌐 🔐 Manage applets and keys on JavaCard-s like a pro (via command line or from your Java project)
https://javacard.pro/globalplatform
GNU Lesser General Public License v3.0
673 stars 210 forks source link

Running on m1 mac results in error "jnasmartcardio not bundled" #299

Open mistial-dev opened 2 years ago

mistial-dev commented 2 years ago

Describe the bug

Possibly related to #260 .

When attempting to run the latest pre-release version (20.08.12) on a M1 mac, an error is returned with "jnasmartcardio not bundled". Running Java 1.8.

The workaround from #260 works.

Expected behavior

GlobalPlatform Pro runs.

Full log

Re-run your command with -d -v -i switches and:

% java -jar gp.jar -d -i -v 
# 
# gp -d -i -v
Error: jnasmartcardio not bundled
java.lang.IllegalStateException: jnasmartcardio not bundled
    at apdu4j.TerminalManager.getTerminalFactory(TerminalManager.java:120)
    at pro.javacard.gp.GPTool.main(GPTool.java:96)
% uname -v
Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
% java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (Zulu 8.58.0.53-CA-macos-aarch64) (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (Zulu 8.58.0.53-CA-macos-aarch64) (build 25.312-b07, mixed mode)
% ijava -jar gp.jar -d -i -v | grep -v SCardConnect | head -n 4
[DEBUG] TerminalManager - Selected the only reader with a card
[DEBUG] GPSession - Auto-detected ISD: A000000151000000
[WARN] GPData - Invalid CPLC date: 4753
[WARN] GPData - Bogus data detected, fixing double tag
Warning: no keys given, defaulting to 404142434445464748494A4B4C4D4E4F
# 
# gp -d -i -v
# GlobalPlatformPro 325fe84
# Running on Mac OS X 12.4 x86_64, Java 11.0.15 by Amazon.com Inc.
martinpaljak commented 1 year ago

Have a go on 'next' branch if possible until a release.

startxc commented 1 year ago

@martinpaljak Hi , martinpaljak , how is that going? I met the same issue.