Forum Discussion

Pinged's avatar
Pinged
Explorer | Level 3
8 years ago

API crash no log

I am getting a kind of weird error with my client request, every time the code gets to

 client.users().getCurrentAccount()

it seems to crash with no error reporting, the app just stops. Did I se up somthing wrong? I am using the token generated from my account.

Account account1;
final String ACCESS_Token = "<redacted>";
//create dropbox clirent
DbxRequestConfig config = new DbxRequestConfig("dropbox/java-tutorial");
DbxClientV2 client = new DbxClientV2(config, ACCESS_Token);

try {



TextView TV1bx = (TextView) findViewById(R.id.TV1);
account1 = client.users().getCurrentAccount();
String accountID = account1.getAccountId();

TV1bx.setText(accountID);


} catch (DbxException e1) {
e1.printStackTrace();
}

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Your code looks fine, and it's working for me (as long as I remove the TextView code).

     

    When you say "the app just stops" though, does the app actually stop running, or is it hung on something? If it's the former, I would certainly expect some sort of error or output. If it's the latter though, perhaps the network call isn't completing for some reason. (E.g., Do you have any firewall, proxy, etc. that may be interfering?)

    • Pinged's avatar
      Pinged
      Explorer | Level 3

      I am using android, the app just stops all together and crashes. The debugger doesn't even work.

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        Are you sure you're not getting an error message? I would definitely expect some exception if the app crashed. Perhaps your log is set to a filter that isn't showing the message?

        If not, can you share a sample project that reproduce the issue so we can investigate?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 3 hours ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!