Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

[Bug]: NullPointerException: Null value passed for resolver parameter to ResolveListener.serviceResolved() #216

Open
2 tasks
phatblat opened this issue May 25, 2022 · 0 comments
Assignees
Labels

Comments

@phatblat
Copy link

What happened?

Got this report from a customer - I haven't been able to reproduce it myself yet. Somehow it appears that a null value is being passed to the serviceResolved() method of our anonymous ResolveListener implementation from the RxDNSSD library.

dnssd!!.resolve(flags, ifIndex, serviceName, regType, domain, object : ResolveListener {
    override fun serviceResolved(
        resolver: DNSSDService,
        flags: Int,
        ifIndex: Int,
        fullName: String,
        hostName: String,
        port: Int,
        txtRecord: Map<String, String>
    ) {
        doQuery(serviceName, ifIndex, hostName, port)
    }

    override fun operationFailed(service: DNSSDService, errorCode: Int) {
        DittoLog.d(TAG, "mDNS resolve failed: $errorCode")
    }
})

Version

0.9.15

What API do you use?

Bindable (recommended)

What device / emulator do you use?

Huawei P20

What Android API version is on your device?

29

Relevant log output

Fatal Exception: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter resolver
at live.ditto.transports.MdnsPlatform$doResolve$1.serviceResolved(:2)
at com.github.druk.dnssd.DNSSD$2.lambda$serviceResolved$0(DNSSD.java:240)
at com.github.druk.dnssd.DNSSD$2$$ExternalSyntheticLambda1.run(:16)
at android.os.Handler.handleCallback(Handler.java:888)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)

Could you reproduce this issue in samples?

  • Yes, I can reproduce this issue in sample app of this repo?
  • Yes, I can reproduce this issue in Bonjour Browser?
@phatblat phatblat added the bug label May 25, 2022
@phatblat phatblat changed the title [Bug]: NullPointerException: : Null value passed for resolver parameter to ResolveListener [Bug]: NullPointerException: : Null value passed for resolver parameter to ResolveListener.serviceResolved() May 25, 2022
phatblat added a commit to getditto/RxDNSSD that referenced this issue May 25, 2022
@phatblat phatblat changed the title [Bug]: NullPointerException: : Null value passed for resolver parameter to ResolveListener.serviceResolved() [Bug]: NullPointerException: Null value passed for resolver parameter to ResolveListener.serviceResolved() May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants