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

postbuild step failed timeout for particular library in the app #231

Open
anuragstar opened this issue Nov 22, 2023 · 8 comments
Open

postbuild step failed timeout for particular library in the app #231

anuragstar opened this issue Nov 22, 2023 · 8 comments

Comments

@anuragstar
Copy link

anuragstar commented Nov 22, 2023

My integration setup
@polac24 I am using CocoaPods cocoapods-xcremotecache plugin, I am running app in producer mode for remote server we are using S3.
We are getting postbuild step failed timeout for some random library everytime, any way to increase the timeout, or skip the libraries to upload.
Screenshot 2023-11-22 at 9 21 40 AM

[ ] CocoaPods cocoapods-xcremotecache plugin
[ ] Automatic integration using xcprepare integrate ...
[ ] Manual integration
[ ] Carthage

Expected/desired behavior

Minimal reproduction of the problem with instructions

Producer Logs

 [REPLACE THIS WITH YOUR INFORMATION] 

Consumer Logs

 [REPLACE THIS WITH YOUR INFORMATION] 

Pods/Carthage file

 [REPLACE THIS WITH YOUR INFORMATION] 

Environment

  • XCRemoteCache: X.Y.Z
  • cocoapods-xcremotecache: X.Y.Z <!-- check with gem list cocoapods-xcremotecache >
  • HTTP cache server: ... <!-- e.g. demo docker, nginx, AWS etc. >
  • Xcode: X.Y.Z

Post build stats

 [REPLACE THIS WITH YOUR INFORMATION] 

Others

@polac24
Copy link
Collaborator

polac24 commented Nov 22, 2023

Hi!

  1. Maybe that problem surfaces because of the problem to be fixed in Fixed task hang up in shellInternal due to unread error pipe. #230?
  2. To skip a given library, you can pass exclude_targets parameter in your Podfile, see
  3. There is one configurable timeout: timeout_response_data_chunks_interval, if you know that the timeout is too strict (I personally doubt)
  4. I recommend capturing logs on you CI log show --predicate 'sender == "xcpostbuild"' --style compact --info --debug -last 5m, right after the errror

@anuragstar
Copy link
Author

Hey @polac24 When running on CI on post build merge on development branch, after switching to producer mode, by script at run time in podFile and .rcinfo file, want to understand facing strange issue in - bundle exec pod install

Error

NoMethodError - undefined method `[]' for false:FalseClass
/Users/xxxx/.rvm/gems/ruby-3.0.6/gems/cocoapods-xcremotecache-0.0.18/lib/cocoapods-xcremotecache/command/hooks.rb:464:in `block in <class:XCRemoteCache>'

@polac24
Copy link
Collaborator

polac24 commented Dec 5, 2023

The error says that xcprepare --configuration some_configuration --platform some_platform did not succeed. Most likely the command to check output will resolve to (but I just guess a configuration and a platform:

xcprepare --configuration Debug --platform iphonesimulator

after switching to producer mode

you say "by script" but with CocoaPods, you should always configure everything in Podfile.
If you provide a demo project with steps required to reproduce it, I could take a look if that is a bug on our side but most likely you mix cocoapods and manual integration modes (which are exclusive to each other).

@anuragstar
Copy link
Author

anuragstar commented Dec 13, 2023

hey @polac24
We have integrated on our CI jobs, where in producer mode we have configured the pipeline to run in producer mode and generate artifact and publish it to S3, but when running in consumer mode for PR checks or on-demand builds from particular branch, where artifact is generated from producer mode, It shows error as - _**XCRemoteCache disabled - no artifacts available**_

We tried running producer and consumer mode on different mac machine, but consumer mode always returns - XCRemoteCache disabled - no artifacts available, even we tried producer and consumer on same CI machine, it results in same error

I checked the configuration in Podfile and the .rcinfo file configuration is correct, can you please help us to unblock this issuse.

@anuragstar
Copy link
Author

anuragstar commented Dec 13, 2023

On my local machine both producer-fast and consumer are working fine, but on CI, consumer mode is failing always with this error - XCRemoteCache disabled - no artifacts available, I have set configuration correctly in Podfile and .rcinfo file

@polac24
Copy link
Collaborator

polac24 commented Dec 14, 2023

What does this command print, quickly after the XCRemoteCache disabled - no artifacts available is printed?

log show --predicate 'sender BEGINSWITH "xc"' --style compact --info --debug -last 10m

It should print all HTTP requests and some 404 (except the probe requests, which can fail) should give you some hints. There might be problems like: only a single-branch is checked out, incorrect base_branch or many other.

Also, check FAQ out.

@anuragstar
Copy link
Author

@polac24 let me add logs and check it, but on the same branch, I can run from my local, producer, and consumer works fine.

@anuragstar
Copy link
Author

@polac24 Is it possible for you to connect on a call and close this issue? please let me know when you will be free for 15 mins call

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

2 participants