Open jim-lub opened 1 month ago
Thanks for the detailed write-up. I'm not sure when I'll have time to investigate as I'm on holiday. Maybe towards the end of the month. If you manage to fix the issue please create a pull request :)
I had the same issue. @jim-lub in your android/build.gradle
change the castFrameworkVersion
from +
to 21.1.0
. The later versions are not working properly with RNGC for know.
@petrbela No worries at all, enjoy your holiday! Unfortunately, we're unable to dedicate more time to investigating the issue or working on a fix at the moment.
@pierrelouergagnon Thank you so much for the suggested fix. Pinning the version does indeed seem to resolve the issues we've been experiencing.
After pinning the version we still encountered one of the issues mentioned, where no cast devices are visible after backgrounding and foregrounding the app. This occurred specifically on a Samsung Galaxy S20 FE and a Samsung Galaxy S24. Interestingly, the issue seems to be resolved on all our non-Samsung devices.
@pierrelouergagnon Do you recognize this issue or have any thoughts on what might be causing it? Any further suggestions would be greatly appreciated!
Describe the bug
CastButton
,useDevices
ordiscoveryManager.getDevices
always show/return each device twice.useDevices
ordiscoveryManager.getDevices
. a.CastButton
has no problem showing the devices and connecting to them after backgrounding the app. b.useDevices
still shows the old devices, but they are not connectable. After hot reloading the app, the devices are lost. c.discoveryManager.getDevices
returns an empty array of devices.To Reproduce I have created a very minimal example to reproduce the issue. All issues are present in the example on the main screen (code available in
app/(tabs)/index.tsx
). All examples presented show double devices on app start, but only theuseDevices
anddiscoveryManager.getDevices
issues (where no devices are found) are present after backgrounding the app once.CastButton
is used to show the devices and connect to them.useDevices
is used to show the devices and sessionManager is used to connect to them.discoveryManager.getDevices
is used to fetch the devices.repo: https://github.com/jim-lub/experimental-googlecast
Expected behavior I expect each device to be shown only once and to be discoverable and connectable after backgrounding the app.
Device:
Checklist: