vimeo / vimeo/vimeo-networking-java

'void com.vimeo.networking.GsonDeserializer.deserialize

Open
#398 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
128
Forks
48
PR merge metrics
No merged PRs in 30d

Description

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.vimeo.networking.GsonDeserializer.deserialize(com.google.gson.Gson, java.lang.Object, com.vimeo.networking.callbacks.ModelCallback)' on a null object reference
        at com.vimeo.networking.VimeoClient$5.success(VimeoClient.java:1169)
        at com.vimeo.networking.callbacks.VimeoCallback.onResponse(VimeoCallback.java:55)
        at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6810)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
var configBuilder = Configuration.Builder(VimeoHelper.clientId, VimeoHelper.clientSecret, VimeoHelper.SCOPE)
    .setCacheDirectory(activity?.getCacheDir())


VimeoClient.initialize(configBuilder.build());
VimeoClient.getInstance().authorizeWithClientCredentialsGrant(object : AuthCallback {
    override fun success() {
        vimeoClient = VimeoClient.getInstance();
        playVideo();
    }

    override fun failure(error: VimeoError?) {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }
})


vimeoClient ?.fetchNetworkContent("/videos/354539932", object : ModelCallback<VideoList>(com.vimeo.networking.model.VideoList::class.java) {
    override fun success(video: com.vimeo.networking.model.VideoList?) {
        Helper.setLog(TAG,"success")
    }

    override fun failure(error: VimeoError) {
        Helper.setLog(TAG,"failure"+error.developerMessage)
    }
})

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in VimeoClient.java around line 1169 and trace the GsonDeserializer reference through VimeoCallback.java and the reported callback path. Identify why the deserializer is null for this request, then verify that the same fetch invokes the success or failure callback without a NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
api, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.