Getting error in Create Ticket and FAQ from API in android signed apk

Answered

9 Comments

  • Mathew Cropper
    Comment actions Permalink

    Hi there. Are you using the API to do this, or have you installed our SDK?

    If you are using the SDK (sounds like you are), check that you have correctly set your app up in Zendesk.

    If that doesn't work, enable logging and more often than not the logging will tell you where the issue is. You can enable SDK logging on Android using the following:

    Logger.setLoggable(true);
    0
  • Taazaa Inc.
    Comment actions Permalink

    @Mathew, we are using API Provider to creating tickets and FAQ. We integrated Zendesk SDK as you mentioned above and using API Provider with SDK.

    Everything is working fine in development however when we create signed apk, it shows following error (response we are getting from API): 

    We are totally stuck here and couldn't find anything related to this.

    We are using following code to initialise Zendesk :

    ZendeskConfig.INSTANCE.init(this, "https://taazaademo.zendesk.com", "APPLICATION_ID", "OAUTH_CLIENT_ID");

    Identity anonymousIdentity = new AnonymousIdentity.Builder().build();
    ZendeskConfig.INSTANCE.setIdentity(anonymousIdentity);

     Above code we are using on app start-up and for creating ticket we are using following code : 

    CreateRequest createRequest = new CreateRequest();

    if (ticketMessage.getText().toString().length() > 0) {
    createRequest.setDescription(ticketMessage.getText().toString().trim());
    }

    List<CustomField> customFields = new ArrayList<CustomField>() {{

    long firstName = Custom_Field_Long_Id;
    long lastName = Custom_Field_Long_Id;
    long emailId = Custom_Field_Long_Id;
    long phoneNo = Custom_Field_Long_Id;

    CustomField firstNameCustomField = new CustomField(firstName, "SOME_TEXT");
    add(firstNameCustomField);

    CustomField lastNameCustomField = new CustomField(lastName, "SOME_TEXT");
    add(lastNameCustomField);

    CustomField emailIdCustomField = new CustomField(emailId, "SOME_TEXT");
    add(emailIdCustomField);

    CustomField phoneNoCustomField = new CustomField(phoneNo, "SOME_TEXT");
    add(phoneNoCustomField);
    }};

    createRequest.setCustomFields(customFields);

    RequestProvider provider = ZendeskConfig.INSTANCE.provider().requestProvider();

    provider.createRequest(createRequest, new ZendeskCallback<CreateRequest>() {

    @Override
    public void onSuccess(CreateRequest request) {
    //Success Logic
    }

    @Override
    public void onError(ErrorResponse errorResponse) {
    // Error Logic
    });

    }

    Please help!

    0
  • Mathew Cropper
    Comment actions Permalink

    Thanks for this. The code looks fine, so there's definitely something fishy going on.

    Leave this with me. I'll ask one of the team to take a look at this and come back to you.

    0
  • Taazaa Inc.
    Comment actions Permalink

    @Mathew, Appreciate for your quick response, it would be really helpful if we get it fixed ASAP as we have a release today.

    Thanks again!

    0
  • Mathew Cropper
    Comment actions Permalink

    Our team is based in Dublin, where the current time is 7am. I promise to make this a priority for as soon as someone is in the office, and will definitely get back to you today.

    0
  • Taazaa Inc.
    Comment actions Permalink

    @Mathew, thanks for your valuable support.

    Looking forward to get it fixed :)

    0
  • Sebastian Chlan
    Comment actions Permalink

    Hi. The code looks totally fine, I was able to use in a development and production build of our sample app. I'm able to reproduce the issue.
    For looking further into it, can you please provide us with some more
    information?

    Can you build a signed version with logging enabled, as Mathew already suggested, and send us the output?
    Are you using Proguard for your signed build? If yes, can you send us the configuration?
    Do you see this issue happening consistently over different devices/android versions? 
    Feel free to open a ticket with us at support@zendesk.com if you don't want to post the information here publicly.

    Thanks,
    Sebastian

     

    0
  • Daniel Pawluk
    Comment actions Permalink

    I'm going to go ahead and move this into the SDK topic as well as create a ticket and CC everyone involved to prevent this thread from becoming a ticket. You can more easily attach and work with our team this way as well. Thanks for writing in!

    0
  • Taazaa Inc.
    Comment actions Permalink

    @Daniel, @Sebastian

    We created a support ticket as well for this issue.

    We are using proguard with default configuration and this issue is replicated on all devices we tested on.

    We also enabled logging for Zendesk and created a signed apk, still facing the same issue.

    May someone please check the logs and help us to get it fixed!

    0

Please sign in to leave a comment.

Powered by Zendesk