Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle expired restore token on Wayland #259

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

Ape
Copy link
Contributor

@Ape Ape commented Jan 3, 2025

The previous version just gets crashes on an exception from invalid restore token and doesn't request a new valid one.

This version catches the exception and starts the screen cast with a new token.

I'm not sure what the purpose of the 200 ms sleep is, so I left it similar to the previous version.

The previous version just gets crashes on an exception from invalid
restore token and doesn't request a new valid one.

This version catches the exception and starts the screen cast with a new
token.

I'm not sure what the purpose of the 200 ms sleep is, so I left it
similar to the previous version.
@Ape
Copy link
Contributor Author

Ape commented Jan 3, 2025

Actually, this might be nicer if the permission request pop-up wasn't shown in the case of rerequesting the permissions since the user has already seen the pop-up earlier when he got the previous, now expired, restore token.

@sblantipodi sblantipodi self-assigned this Jan 3, 2025
@sblantipodi sblantipodi added the bug Something isn't working label Jan 3, 2025
@sblantipodi
Copy link
Owner

thank you Ape I appreciate it.

Actually, this might be nicer if the permission request pop-up wasn't shown in the case of rerequesting the permissions since the user has already seen the pop-up earlier when he got the previous, now expired, restore token.

I agree on this, I added that popup just because Wayland I found no other way to tell the user which screen is requesting the permission on multi monitor setup.
This can be avoided on single monitor setup...

I'll merge it and release this fix asap.

Thanks!

@Ape
Copy link
Contributor Author

Ape commented Jan 3, 2025

I added that popup just because Wayland I found no other way to tell the user which screen is requesting the permission on multi monitor setup.

So by that reasoning we want to show the pop-up when requesting the permissions again since it might be for a different screen.

Could this pop-up be completely disabled when there is just a single monitor?

@sblantipodi
Copy link
Owner

sblantipodi commented Jan 3, 2025

So by that reasoning we want to show the pop-up when requesting the permissions again since it might be for a different screen.

correct

Could this pop-up be completely disabled when there is just a single monitor?

yes, I'll add an if to the showChooseDisplayAlert() method that shows the popup.

thanks for your help @Ape much appreciated.
this PR will be included in the upcoming release.

@sblantipodi sblantipodi merged commit 8abf51a into sblantipodi:master Jan 3, 2025
2 checks passed
@sblantipodi sblantipodi mentioned this pull request Jan 3, 2025
@Ape Ape deleted the pr/wayland_restore_token_fix branch January 3, 2025 16:40
sblantipodi added a commit to sblantipodi/glow_worm_luciferin that referenced this pull request Jan 4, 2025
- ***Breaking changes***: requires `Firefly Luciferin` firmware (v2.19.3).   
- The priority of UDP packets in wireless mode has been increased to signal to the router that Luciferin traffic requires lower latency than standard packets.
- If the microcontroller is temporarily disconnected from the WiFi network, Firefly Luciferin is now able to reconnect much faster without restarting the screen capture.
- Added a 'bottom' capture option for [satellites](https://github.com/sblantipodi/firefly_luciferin/wiki/Surround-lighting-with-satellites) when the LEDs are configured to use a bottom gap.
- The [save state](https://github.com/sblantipodi/firefly_luciferin/wiki/Remote-Access#luciferin-web-interface) has been restructured. Auto-save has been disabled to prevent wear on the microcontroller's memory. Closes [#249](sblantipodi/firefly_luciferin#249).
- Arch Linux package. Note: AUR package is built from the official sources but it's currently maintained by @Ape. Closes [#246](sblantipodi/firefly_luciferin#246). Thanks @Ape for this.
- Libasound2t64 dependency prevents correct installation on some Linux distros. Closes [#253](sblantipodi/firefly_luciferin#253).
- Properly handle expired restore token on Wayland. Closes [#259](sblantipodi/firefly_luciferin#259). Thanks @Ape for the PR.
- Logging improvements. Closes [#260](sblantipodi/firefly_luciferin#260). Thanks @Ape for the PR.
- Proper config path on Linux. Config file and logs has been moved in XDG_CONFIG_HOME (~/.config/FireflyLuciferin). Old config files will be automatically moved to the new path. Closes [#261](sblantipodi/firefly_luciferin#261). 
- The snap version was crashing at startup when there were temporary files created by other instances of Firefly Luciferin on the system. Fixed.
sblantipodi added a commit that referenced this pull request Jan 4, 2025
- ***Breaking changes***: requires `Glow Worm Luciferin` firmware (v5.18.2).   
- The priority of UDP packets in wireless mode has been increased to signal to the router that Luciferin traffic requires lower latency than standard packets.
- If the microcontroller is temporarily disconnected from the WiFi network, Firefly Luciferin is now able to reconnect much faster without restarting the screen capture.
- Added a 'bottom' capture option for [satellites](https://github.com/sblantipodi/firefly_luciferin/wiki/Surround-lighting-with-satellites) when the LEDs are configured to use a bottom gap.
- The [save state](https://github.com/sblantipodi/firefly_luciferin/wiki/Remote-Access#luciferin-web-interface) has been restructured. Auto-save has been disabled to prevent wear on the microcontroller's memory. Closes [#249](#249).
- Arch Linux package. Note: AUR package is built from the official sources but it's currently maintained by @Ape. Closes [#246](#246). Thanks @Ape for this.
- Libasound2t64 dependency prevents correct installation on some Linux distros. Closes [#253](#253).
- Properly handle expired restore token on Wayland. Closes [#259](#259). Thanks @Ape for the PR.
- Logging improvements. Closes [#260](#260). Thanks @Ape for the PR.
- Proper config path on Linux. Config file and logs has been moved in XDG_CONFIG_HOME (~/.config/FireflyLuciferin). Old config files will be automatically moved to the new path. Closes [#261](#261). 
- The snap version was crashing at startup when there were temporary files created by other instances of Firefly Luciferin on the system. Fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants