Error with GetAccountDataResponse
Error with GetAccountDataResponse Code:
api = new IotaAPI.Builder()
.protocol("https")
.host("node.iota-community.org")
.port("")
.build();
GetAccountDataResponse response = null;
try {
response = api.getAccountData(
"MYSEED",
2,
0,
true,
0,
true,
0,
0,
true,
0
);
Log.d("getNewAddress", response.toString());
} catch (ArgumentException e) {
e.printStackTrace();
}
Error: 02-24 17:47:24.841 6850-6964/org.iota.community.wallet W/System.err: jota.error.ArgumentException: [{"error":"Could not complete request","duration":417}] 02-24 17:47:24.842 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPICore.wrapCheckedException(IotaAPICore.java:71) 02-24 17:47:24.843 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPICore.getTrytes(IotaAPICore.java:292) 02-24 17:47:24.843 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPI.findTransactionsObjectsByHashes(IotaAPI.java:268) 02-24 17:47:24.843 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPI.findTransactionObjectsByAddresses(IotaAPI.java:297) 02-24 17:47:24.844 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPI.bundlesFromAddresses(IotaAPI.java:132) 02-24 17:47:24.844 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPI.getTransfers(IotaAPI.java:116) 02-24 17:47:24.845 6850-6964/org.iota.community.wallet W/System.err: at jota.IotaAPI.getAccountData(IotaAPI.java:736) 02-24 17:47:24.845 6850-6964/org.iota.community.wallet W/System.err: at cordova.plugin.iota.iota$1.run(iota.java:43) 02-24 17:47:24.846 6850-6964/org.iota.community.wallet W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 02-24 17:47:24.847 6850-6964/org.iota.community.wallet W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 02-24 17:47:24.849 6850-6964/org.iota.community.wallet W/System.err: at java.lang.Thread.run(Thread.java:764)
--------- beginning of crash
02-24 17:47:24.856 6850-6964/org.iota.community.wallet E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-2 Process: org.iota.community.wallet, PID: 6850 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] jota.dto.response.GetTrytesResponse.getTrytes()' on a null object reference at jota.IotaAPI.findTransactionsObjectsByHashes(IotaAPI.java:272) at jota.IotaAPI.findTransactionObjectsByAddresses(IotaAPI.java:297) at jota.IotaAPI.bundlesFromAddresses(IotaAPI.java:132) at jota.IotaAPI.getTransfers(IotaAPI.java:116) at jota.IotaAPI.getAccountData(IotaAPI.java:736) at cordova.plugin.iota.iota$1.run(iota.java:43) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)
Hey @avihai-developer
We now throw an error upon receiving an ArgumentException instead of returning null.
Can you confirm this problem still exists? I could not replicate.