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

Developer: Network Debugging #1813

Merged
merged 11 commits into from
Jun 17, 2024
Merged

Conversation

bjtitus
Copy link
Contributor

@bjtitus bjtitus commented Jun 6, 2024

Adds Pulse network logging framework.

Simulator.Screen.Recording.-.iPhone.13.mini.-.2024-06-06.at.14.24.00.mp4

To test

Network debugging

  • Enable the networkDebugging flag in Beta Features
  • Restart the app
  • Download an episode
  • Navigate to Profile > Settings > Developer > Network Debugging
  • Note that episode download, along with other network activity and logs, is shown in debugging menu

Exported Logs

  • Profile > Help & Feedback > Export Database
  • Follow the instructions below to access export:
    • Device: Airdrop the file to your computer
    • Simulator: Run this script to access the files from Files.app:
#!/bin/bash
open "$(xcrun simctl get_app_container booted com.apple.DocumentsApp groups | grep LocalStorage | awk -F'\t' '{print $2 "/File Provider Storage"}')"
  • Verify that network.pulse file exists
  • This file can be opened with the Pulse Pro mac app

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.

@dangermattic
Copy link
Collaborator

dangermattic commented Jun 6, 2024

3 Warnings
⚠️ Modules/DataModel/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages in Xcode.
⚠️ Modules/Server/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages in Xcode.
⚠️ Modules/Utils/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages in Xcode.

Generated by 🚫 Danger

@pocketcasts
Copy link
Contributor

Pocket Casts Prototype Build📲 You can test the changes from this Pull Request in Pocket Casts Prototype Build by scanning the QR code below to install the corresponding build.
App NamePocket Casts Prototype Build Pocket Casts Prototype Build
Build Numberpr1813-e437fe9
Version7.66
Bundle IDau.com.shiftyjelly.podcasts.prototype
Commite437fe9
App Center BuildPocket Casts - Prototype Builds #13
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@bjtitus bjtitus marked this pull request as ready for review June 14, 2024 02:38
@bjtitus bjtitus requested a review from a team as a code owner June 14, 2024 02:38
@bjtitus bjtitus requested review from SergioEstevao and removed request for a team June 14, 2024 02:38
@bjtitus
Copy link
Contributor Author

bjtitus commented Jun 14, 2024

@leandroalonso I tried several different ways to reference the Pulse Swift Package only in Release builds but none of them seemed to work. I've just moved it to Cocoapods for now. I verified it wasn't included by checking for symbols using Hopper:

CleanShot 2024-06-13 at 17 30 47@2x

Don't really agree with this but it satisfies dangermattic
@bjtitus bjtitus force-pushed the bjtitus/developer/network-debugging branch from 456e5b9 to ab68cff Compare June 14, 2024 02:49
@bjtitus bjtitus added this to the 7.67 milestone Jun 14, 2024
@bjtitus bjtitus added the [Type] Tooling Issues related to tooling: build tools, ruby, scripts, etc. label Jun 14, 2024
@leandroalonso
Copy link
Member

@bjtitus Nice! The test target is failing though. 🔴

@bjtitus
Copy link
Contributor Author

bjtitus commented Jun 14, 2024

Good to go now @leandroalonso and @SergioEstevao!

Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition to our debug tools!
It could be very helpful to find issues when streaming files and see request results on the context of playback skipping.

In general the tool is working correctly and I just found a crash but I think it's on Pulse codebase.
Steps to reproduce:

  • Go to Network Debug
  • Tap on Filters and select group by host
  • On a Group tap on See All,
  • See it crash

@SergioEstevao SergioEstevao self-requested a review June 17, 2024 18:02
Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just left a comment regarding a crash that I think is part of the PulseUI library itself.

@bjtitus bjtitus merged commit d95ea98 into trunk Jun 17, 2024
4 of 6 checks passed
@bjtitus bjtitus deleted the bjtitus/developer/network-debugging branch June 17, 2024 18:48
@bjtitus
Copy link
Contributor Author

bjtitus commented Jun 18, 2024

Thanks @SergioEstevao! I reproduced the crash and filed an issue (kean/Pulse#263) on Pulse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Tooling Issues related to tooling: build tools, ruby, scripts, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants