Skip to content

Crash when connecting to new URL #32

@bramley-stride

Description

@bramley-stride

After changing to the new endpoints provided last week, the library now crashes with the following trace:

2021-05-09 22:19:10.422 11260-11260/au.com.xxx E/resultProcessing > Failure: >>> java.lang.Error: checkAvailability error
2021-05-09 22:19:10.482 11260-11260/au.com.xxx D/AndroidRuntime: Shutting down VM
    
    
    --------- beginning of crash
2021-05-09 22:19:10.486 11260-11260/au.com.xxx E/AndroidRuntime: FATAL EXCEPTION: main
    Process: au.com.xxx, PID: 11260
    java.lang.NullPointerException: Attempt to read from field 'int com.android.volley.NetworkResponse.statusCode' on a null object reference
        at com.brightpattern.bpcontactcenter.ContactCenterCommunicator.parseVolleyError(ContactCenterCommunicator.kt:409)
        at com.brightpattern.bpcontactcenter.ContactCenterCommunicator.access$parseVolleyError(ContactCenterCommunicator.kt:39)
        at com.brightpattern.bpcontactcenter.ContactCenterCommunicator$requestChat$2.onErrorResponse(ContactCenterCommunicator.kt:204)
        at com.android.volley.Request.deliverError(Request.java:617)
        at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:104)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Debugging and inspecting the volleyError object showed it is of type TimeoutError, so it seems like the order of the when statement needs to change.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions