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

Upload client stuck when there's no failed upload #37

Closed
null09264 opened this issue Mar 18, 2021 · 2 comments
Closed

Upload client stuck when there's no failed upload #37

null09264 opened this issue Mar 18, 2021 · 2 comments

Comments

@null09264
Copy link

I'm triggering the xcmetric binary through scripts and didn't use the launcher. I notice that occasionally xcmetric runs forever when I trigger it without any new xcactivitylog.

I did a very brief skim on the source code, please kindly correct me if I'm wrong:

In MetricUploaderLogic.swift, it seems both cleanedUpLogs and savedUploadRequests need to be received before we can send mobiusLoopCompleted? For my cases, I never received savedUploadRequests.

Then I trace it back to UploadMetricsEffectHandler.swift, line 42, there's an empty check

if !failedURLs.isEmpty {
    effects.append(.logsUploadFailed(logs: failedURLs))
}

So it seems when nothing fails, the logsUploadFailed will be skipped, and consequently persistNonUploadedLogs will not be triggered, so in the end no savedUploadRequests events will be emitted.

Currently I removed the empty check and it seems to work for my cases now. Have I understood the problem correctly? And will there be any other unwanted side effects if I remove the empty check?

@sebskuse
Copy link

We're seeing the same issue. Looks like there's an open PR with a fix for this - #46, just given it a go and it seems to resolve the issue

@polac24
Copy link
Contributor

polac24 commented Oct 7, 2021

Fixed in #46

@polac24 polac24 closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants