Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Error with GetAccountDataResponse #92

Open
avihai-developer opened this issue Feb 24, 2018 · 1 comment
Open

Error with GetAccountDataResponse #92

avihai-developer opened this issue Feb 24, 2018 · 1 comment

Comments

@avihai-developer
Copy link

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)

@kwek20
Copy link
Contributor

kwek20 commented Oct 7, 2018

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.

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

No branches or pull requests

2 participants