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

Remove logout from background requests #2586

Open
wants to merge 4 commits into
base: release/7.79
Choose a base branch
from

Conversation

bjtitus
Copy link
Contributor

@bjtitus bjtitus commented Dec 23, 2024

A duplicate of #2534 applied to 7.79 since the 7.80 release will be delayed a couple of weeks.

I think we should get these into testing ASAP as I've seen a number of recent tickets with similar behavior:

9138117-zd-a8c
8737139-zd-a8c
9118472-zd-a8c
9204151-zd-a8c

To test

  • Apply this patch (ForcedLogoutRefresh.patch) to either this branch or trunk
  • Add a breakpoint at AppDelegate:110 in didFinishLaunching after scheduleNextBackgroundRefresh() is called.
  • Build and run the app
  • When the breakpoint is hit, background the app
  • Execute this command in the debug console to trigger the scheduled background refresh task:
e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"au.com.shiftyjelly.podcasts.Refresh"]
  • Before this change, you should have been logged out
  • After this change, you should see TokenHelper: Skipped logout in background due to error logged

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

The flag is `avoid_logout_in_background`

# Conflicts:
#	Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift

# Conflicts:
#	Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift
@bjtitus bjtitus requested a review from a team as a code owner December 23, 2024 22:06
@bjtitus bjtitus requested review from danielebogo and removed request for a team December 23, 2024 22:06
@bjtitus bjtitus changed the title Logout change for Remove logout from background requests Dec 23, 2024
@bjtitus bjtitus added this to the 7.80 milestone Dec 23, 2024
@bjtitus bjtitus added the [Type] Bug Used for issues where something is not functioning as intended. label Dec 23, 2024
@bjtitus bjtitus modified the milestones: 7.80, 7.79 ❄️ Dec 23, 2024
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 7.79 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Used for issues where something is not functioning as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants