-
Notifications
You must be signed in to change notification settings - Fork 877
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
Fix 'Object has been destroyed' when FreeTube is passed a URL with no windows open on macOS #6278
Conversation
on macOS when attempting to open URL with no windows open
Head branch was pushed to by a user without write access
Pull request was converted to draft
(trying to launch a second instance wouldn't have focused main window)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on macOS 13.7.1
Bug has been destroyed
Don't currently have access to a Mac to validate, but looks good from static analysis of the code. |
@kommunarr will you have access to it anytime soon or should we go ahead and approve this PR as @PikachuEXE tested it on their machine? |
* development: (96 commits) Move Invidious API calls into Invidious file (FreeTubeApp#6313) Translated using Weblate (Spanish) Use word-break on live chat error message (FreeTubeApp#6327) Bump youtubei.js from 11.0.1 to 12.0.0 (FreeTubeApp#6323) Bump shaka-player from 4.12.3 to 4.12.4 (FreeTubeApp#6318) Make seekbar and player controls appear at bottom of video and take full width (FreeTubeApp#6007) Fix 'Object has been destroyed' when FreeTube is passed a URL with no windows open on macOS (FreeTubeApp#6278) Bump mikefarah/yq from 4.44.5 to 4.44.6 (FreeTubeApp#6324) Translated using Weblate (French) Bump sass-loader from 16.0.3 to 16.0.4 (FreeTubeApp#6319) Bump webpack from 5.96.1 to 5.97.1 (FreeTubeApp#6322) Bump sass from 1.81.0 to 1.82.0 (FreeTubeApp#6320) Bump lefthook from 1.8.5 to 1.9.0 (FreeTubeApp#6321) Bump @intlify/eslint-plugin-vue-i18n from 3.1.0 to 3.2.0 (FreeTubeApp#6317) Translated using Weblate (Estonian) Translated using Weblate (Basque) Translated using Weblate (Icelandic) Translated using Weblate (Hungarian) Translated using Weblate (German) Fix channel home page list view (FreeTubeApp#6316) ...
Fix 'Object has been destroyed' when FreeTube is passed a URL with no windows open on macOS
Pull Request Type
Related issue
Relates to @srolandmarshall's comment on #4762 (but unrelated to the issue commented on).
Description
Because FreeTube does not quit automatically when all windows are closed on macOS (as on other plaforms), the main process tries to fire an IPC message to a non-existent
mainWindow
when it receives anopen-url
event or a command line URL argument. This results in anObject has been destroyed
error message.This PR sets
mainWindow
tonull
when all FreeTube windows have been closed, and, when this is the case, has the main process create a new window and pass it a URL to be opened onopen-url
(ifapp.isReady()
istrue
) orsecond-instance
(with a command line URL argument) events.Screenshots
Testing
freetube://
link (deep link).Desktop
Additional context