Auto-provision fails with: undefined method `dependencies' for nil:NilClass

I am using the latest version of the auto-provision step (1.0.1) and I tried older versions but to no avail.

The application builds and archives correctly from Github but I can’t get this to work.

Analyzing project
Error:
undefined method dependencies' for nil:NilClass Stacktrace (for debugging): /private/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise947544706/step_src/lib/autoprovision/project_helper.rb:289:incollect_dependent_targets’

Build: https://www.bitrise.io/build/965923a3e46cbdae

2 Likes

@viktorbenei

Hi @ronan.o.ciosoig,

Thanks for reporting! I checked the logs but I did not find anything obvious, scheduled a task for the tooling team to do a more thorough debugging, they will update you here once they figure out what causes this issue.

I have the same issue in one our apps: https://www.bitrise.io/build/65368614513d0350
There are multiple schemes in the project, the first one works fine but it always fails with the second one.

@viktorbenei The error is a bit different with 1.0.2. Looks like it can’t find the target for the specified scheme. It works in Xcode.

Error:
undefined method `platform_name' for nil:NilClass
Stacktrace (for debugging):        /private/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise209367052/step_src/lib/autoprovision/project_helper.rb:24:in `initialize'
/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise209367052/step_src/step.rb:36:in `new'
/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise209367052/step_src/step.rb:36:in `<main>'

Ok, I think I found the source of the problem. In Xcode / Manage Schemes → Build the checkmark for the target was not set for “Test” and “Profile”:

50

Checking “Test” and “Profile” makes the schemes work … not sure why those are needed though.
Note that I also had to use version 0.9.7 of the Auto Provisioning step because newer versions did not find the Xcode generated provisioning profile.

1 Like

Hi @ronan.o.ciosoig and @matthias.buchetics,

does this issue exist in the latest version (1.1.0) of the step?

1 Like

Hi @ronan.o.ciosoig and @matthias.buchetics,
do you see the same issue in the latest version of the step?

Our issue was in fact a broken run script that connected to New Relic. After removing that it worked fine.

1 Like

Hi,
sorry, I haven’t had a chance to test this until now. I tried it in a different project (disabling the “Test” and “Profile” in the build options of the scheme) and the build was successful in 1.1.0.

1 Like