You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2022. It is now read-only.
Ran across a crash running the Ditto Android test suite. Somehow it appears that a null value is being passed to the serviceFound() method of our anonymous BrowseListener implementation from the RxDNSSD library.
// dnssd: DNSSD?
browseService = dnssd!!.browse("_http-alt._tcp", object:BrowseListener {
overridefunserviceFound(
browser:DNSSDService, flags:Int, ifIndex:Int,
serviceName:String, regType:String, domain:String
) {
searchingPrefix?.let { prefix ->DittoLog.d(TAG, "mDNS saw service $serviceName")
// Ignore any _http-alt._tcp peers who are not Ditto. Their announce string comes after the prefix.if (!serviceName.startsWith(prefix)) {
return
}
// Ignore ourselvesif (serviceName == makeServiceNameForPrefix(prefix, announce)) {
return
}
val params =ResolveParameters()
params.flags = flags
params.ifIndex = ifIndex
params.serviceName = serviceName
params.regType = regType
params.domain = domain
val announce = serviceName.substring(prefix.length)
serviceInfo[announce] = params
peerAppeared(announce)
}
}
overridefunserviceLost(
browser:DNSSDService, flags:Int, ifIndex:Int,
serviceName:String, regType:String, domain:String
) {
searchingPrefix?.let { prefix ->DittoLog.i(TAG, "mDNS lost service $serviceName")
if (serviceName.startsWith(prefix)) {
val announce = serviceName.substring(prefix.length)
peerDisappeared(announce)
}
}
}
overridefunoperationFailed(service:DNSSDService, errorCode:Int) {
DittoLog.e(TAG, "mDNS browse error: $errorCode")
browseFailed()
}
})
Version
0.9.15
What API do you use?
Bindable (recommended)
What device / emulator do you use?
SM-G960U1
What Android API version is on your device?
29
Relevant log output
live.ditto.dittotests.DittoTests > dittoTransportDiagnostics[SM-G960U1 - 10] FAILED
java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter browser
at live.ditto.transports.MdnsPlatform$doStartSearching$1.serviceFound(Unknown Source:2)
Tests on SM-G960U1 - 10 failed: Instrumentation run failed due to 'Process crashed.'
Could you reproduce this issue in samples?
Yes, I can reproduce this issue in sample app of this repo?
phatblat
changed the title
[Bug]: NullPointerException: Null value passed for browser parameter to BrowseListener.serviceFound() method
[Bug]: NullPointerException: Null value passed for browser parameter to BrowseListener.serviceFound()
May 25, 2022
What happened?
Ran across a crash running the Ditto Android test suite. Somehow it appears that a null value is being passed to the
serviceFound()
method of our anonymousBrowseListener
implementation from the RxDNSSD library.Version
0.9.15
What API do you use?
Bindable (recommended)
What device / emulator do you use?
SM-G960U1
What Android API version is on your device?
29
Relevant log output
Could you reproduce this issue in samples?
The text was updated successfully, but these errors were encountered: