-
Notifications
You must be signed in to change notification settings - Fork 8
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
Undefined Method Error #12
Comments
Hi @CaptainScavo. Thanks for using the plugin. I'm not sure why that would be. Some things that come to mind: Is your project in the same directory as the Gemfile? You might need to specify a subdirectory. You could try using some of the other options to the action like :target, :configuration, :file, e.g.: update_settings_bundle(
xcodeproj: "appdemo.xcodeproj",
key: "pref_env",
value: "QA",
target: "appdemo",
configuration: "Release",
file: "Root.plist"
) And then if that fixes it remove them one by one to figure out which one is needed. Or keep them all explicit if you like. Is your settings bundle called Scanning through the code, I don't see anywhere that the subscript operator is used where a nil check is not performed beforehand with an explanatory error. That exception may be raised somewhere in a dependency. If none of the above helps figure out the problem, I can help you install from the master branch here and give you some changes with more debugging to dump out more information, like a stack trace. |
Looks like the settings bundle plugin get installed to: and my fastfile is in ~/Documents/projects/appdemo/fastlane
Updated the fastfile to the following:
but I still get the same error - undefined method `[]' for nil:NilClass
Yes. It lives in same directory as Main.storyboard and AppDelegate.*
That would be great. |
Are you using the self-contained Fastlane build installed via Homebrew/zip? Or are you running with Ruby, Modify the gem "fastlane-plugin-settings_bundle" to gem "fastlane-plugin-settings_bundle", git: "https://github.com/jdee/settings-bundle" Then install the version from master: bundle install And now run Fastlane using the Bundler bundle exec fastlane my_lane This adds a stack trace to the output. Could you please post the stack trace as well as either the output of Updated: The version of each dependency is recorded in |
With settings above, I get the error below:
If I update the configuration variable to match the config name used in my xcode project, I get the undefined method (ie original) error: bundle exec fastlane qa 15:02:49: --- Step: Verifying required fastlane version --- +------+------------------------------+-------------+ [15:02:50]: fastlane finished with errors
|
You'll need to add the The original error occurs because of a bad assumption, that There's one more new commit in master that will give you a bit more descriptive error in that case. In particular, it will tell you the path of the file it's failing to open. You can double-check that path and see if it's correct. If it's not, you can probably just use the I'd like to get more error reporting out of the |
So I updated to the newest version. That gives me the error: However, the Settings.bundle file is actually located at: When I use the :file option, it inserts the path AFTER Settings.bundle part. But really appreciate your responsiveness, and the updates you made to the README on Github are really good. |
You're having trouble because of a bug in the plugin. I'm still not sure what it is though. If you don't mind, I've added one more commit with diagnostics that should point to what the problem is. I also made a small change to how the path is built from components, though I'm not sure if it makes any difference here. But there's a small chance this will just work. Anyway, thanks for the patience and feedback. Now you should see something like:
That is output from a project structured somewhat like yours. The settings_bundle_path is taken from the project's file list. The path used is, essentially, project_parent/settings_bundle_path/file. The latest change will also respect relative file paths like ../AnotherFolder/Settings.bundle, though if that were the problem, the . or .. would have shown up in your last output. If there is no easy way to fix this inference, I can also add something like a Whatever the problem/solution is, there's also a good chance that the |
Here is the additional output:
|
@CaptainScavo I know what the problem is now. I duplicated the error by putting the Settings.bundle in a group. The path reported there is relative to the group. I should be able to get you a fix in the next day or so. However, I'm sure that |
@CaptainScavo What's in the master branch should now work with your project without moving the Settings.bundle. As indicated, I'll release this soon and submit changes to Fastlane as well. |
1.2 version works great. Thanks for the diagnostics and new version !!!! |
@CaptainScavo This PR has been submitted to Fastlane to fix gem "fastlane", git: "https://github.com/jdee/fastlane", branch: "commit-version-bump-bug" See the updated example Fastfile in this repo for new usage. You can get rid of the |
The fix for |
New to Fastlane and Ruby, so apologies if I have done something stupid to cause my error.
I have the following in my fastfile:
When I run my fastfile, I get the following error:
undefined method
[]' for nil:NilClass`Root.plist is as follows:
The text was updated successfully, but these errors were encountered: