Issue with running server with React and Rails - ruby-on-rails

I had to reinstall my linux VM that I code on (for school purposes) and after re forking and cloning my app, I cannot start the server. I have run the necessary steps I believe, created and migrated the database, bundle intall, and install and reinstall node_modules...I have a rake task that starts both the api and web page for me simultaneously. Now if I rake start...here is my error message...I have followed to directions on the error message to no success...not sure if I am missing something here.
rake start
10:12:38 web.1 | started with pid 3280
10:12:38 api.1 | started with pid 3281
10:12:38 web.1 |
10:12:38 web.1 | > client#0.1.0 start /home/learn/Development/Code/hoop-it-up/client
10:12:38 web.1 | > react-scripts start
10:12:38 web.1 |
10:12:39 web.1 |
10:12:39 web.1 | There might be a problem with the project dependency tree.
10:12:39 web.1 | It is likely not a bug in Create React App, but something you need to fix locally.
10:12:39 web.1 |
10:12:39 web.1 | The react-scripts package provided by Create React App requires a dependency:
10:12:39 web.1 |
10:12:39 web.1 | "babel-eslint": "10.0.1"
10:12:39 web.1 |
10:12:39 web.1 | Don't try to install it manually: your package manager does it automatically.
10:12:39 web.1 | However, a different version of babel-eslint was detected higher up in the tree:
10:12:39 web.1 |
10:12:39 web.1 | /home/learn/Development/Code/hoop-it-up/node_modules/babel-eslint (version: 10.0.3)
10:12:39 web.1 |
10:12:39 web.1 | Manually installing incompatible versions is known to cause hard-to-debug issues.
10:12:39 web.1 |
10:12:39 web.1 | If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
10:12:39 web.1 | That will permanently disable this message but you might encounter other issues.
10:12:39 web.1 |
10:12:39 web.1 | To fix the dependency tree, try following the steps below in the exact order:
10:12:39 web.1 |
10:12:39 web.1 | 1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
10:12:39 web.1 | 2. Delete node_modules in your project folder.
10:12:39 web.1 | 3. Remove "babel-eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
10:12:39 web.1 | 4. Run npm install or yarn, depending on the package manager you use.
10:12:39 web.1 |
10:12:39 web.1 | In most cases, this should be enough to fix the problem.
10:12:39 web.1 | If this has not helped, there are a few other things you can try:
10:12:39 web.1 |
10:12:39 web.1 | 5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
10:12:39 web.1 | This may help because npm has known issues with package hoisting which may get resolved in future versions.
10:12:39 web.1 |
10:12:39 web.1 | 6. Check if /home/learn/Development/Code/hoop-it-up/node_modules/babel-eslint is outside your project directory.
10:12:39 web.1 | For example, you might have accidentally installed something in your home folder.
10:12:39 web.1 |
10:12:39 web.1 | 7. Try running npm ls babel-eslint in your project folder.
10:12:39 web.1 | This will tell you which other package (apart from the expected react-scripts) installed babel-eslint.
10:12:39 web.1 |
10:12:39 web.1 | If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
10:12:39 web.1 | That would permanently disable this preflight check in case you want to proceed anyway.
10:12:39 web.1 |
10:12:39 web.1 | P.S. We know this message is long but please read the steps above :We hope you find them helpful!
10:12:39 web.1 |
10:12:39 web.1 | npm ERR! code ELIFECYCLE
10:12:39 web.1 | npm ERR! errno 1
10:12:39 web.1 | npm ERR! client#0.1.0 start: `react-scripts start`
10:12:39 web.1 | npm ERR! Exit status 1
10:12:39 web.1 | npm ERR!
10:12:39 web.1 | npm ERR! Failed at the client#0.1.0 start script.
10:12:39 web.1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:12:39 web.1 |
10:12:39 web.1 | npm ERR! A complete log of this run can be found in:
10:12:39 web.1 | npm ERR! /home/learn/.npm/_logs/2020-01-10T18_12_39_116Z-debug.log
10:12:40 web.1 | exited with code 1
10:12:40 system | sending SIGTERM to all processes
10:12:40 api.1 | terminated by SIGTERM
As requested I found two references to the babel-eslint in my package.lock.json
"babel-eslint": {
"version": "10.0.3",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.3.tgz",
"integrity": "sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==",
"requires": {
"#babel/code-frame": "7.5.5",
"#babel/parser": "7.7.7",
"#babel/traverse": "7.7.4",
"#babel/types": "7.7.4",
"eslint-visitor-keys": "1.1.0",
"resolve": "1.12.2"
}
and also here
"react-scripts": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.3.0.tgz",
"integrity": "sha512-hzPc6bxCc9GnsspWqk494c2Gpd0dRbk/C8q76BNQIENi9GMwoxFljOEcZoZcpFpJgQ45alxFR6QaLt+51qie7g==",
"requires": {
"#babel/core": "7.7.4",
"#svgr/webpack": "4.3.3",
"#typescript-eslint/eslint-plugin": "2.15.0",
"#typescript-eslint/parser": "2.15.0",
"babel-eslint": "10.0.3",
etc.......
```

Okay I figured out the issue, the SKIP_PREFLIGHT_CHECK=true to a newly generated .env in my root directory did the trick, i figured since my babel-eslint version was higher than the required it should be fine to skip through and server started no issue. Thanks for the feedback to help me solve the issue!!

Related

Fastlane upload to App Store fails in non-interactive mode even with API key

I am using Fastlane in a GitLab CI environment. I am using an API key and have successfully uploaded my app to TestFlight. However, it fails when uploading the app to the App Store. The build uploads successfully, but it fails when waiting for a response after sending the metadata. Here are the relevant snippets:
# Fastfile
lane :get_app_store_connect_api_key do
ensure_env_vars(
env_vars: [
'APP_STORE_CONNECT_API_KEY'
]
)
app_store_connect_api_key(
key_id: "**********",
issuer_id: "********-****-****-****-************",
key_content: "#{ENV["APP_STORE_CONNECT_API_KEY"]}".gsub('\n', '\\n'),
in_house: false,
)
end
...
desc "Push a new release channel build to the App Store."
lane :release do
build_release()
appstore(
api_key: get_app_store_connect_api_key
)
end
LOG
[17:22:47]: ----------------------
[17:22:47]: --- Step: appstore ---
[17:22:47]: ----------------------
[17:22:47]: Successfully loaded '/Users/********/builds/qVPSw-s1/0/********/********/client/ios/fastlane/Deliverfile' 📄
[17:22:47]: No values defined in './fastlane/Deliverfile'
[17:22:47]: Creating authorization token for App Store Connect API
+--------------------------------------+------------------------+
| deliver 2.181.0 Summary |
+--------------------------------------+------------------------+
| api_key | ******** |
| screenshots_path | ./fastlane/screenshots |
| metadata_path | ./fastlane/metadata |
| app_version | 1.1.0 |
| username | ******** |
| app_identifier | com.********.app |
| ipa | Runner.ipa |
| platform | ios |
| edit_live | false |
| use_live_version | false |
| skip_binary_upload | false |
| skip_screenshots | false |
| skip_metadata | false |
| skip_app_version_update | false |
| force | false |
| overwrite_screenshots | false |
| submit_for_review | false |
| reject_if_possible | false |
| phased_release | false |
| reset_ratings | false |
| team_id | ********|
| dev_portal_team_id | ********|
| run_precheck_before_submit | true |
| precheck_default_rule_level | warn |
| ignore_language_directory_validation | false |
| precheck_include_in_app_purchases | true |
+--------------------------------------+------------------------+
[17:22:52]: Making sure the latest version on App Store Connect matches '1.1.0'...
[17:22:54]: Successfully set the version to '1.1.0'
[17:22:54]: Loading './fastlane/metadata/en-US/description.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/keywords.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/release_notes.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/support_url.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/marketing_url.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/promotional_text.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/name.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/subtitle.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/privacy_url.txt'...
[17:22:54]: Loading './fastlane/metadata/en-US/apple_tv_privacy_policy.txt'...
[17:22:54]: Loading './fastlane/metadata/copyright.txt'...
[17:22:54]: Loading './fastlane/metadata/primary_category.txt'...
[17:22:54]: Loading './fastlane/metadata/secondary_category.txt'...
[17:22:54]: Loading './fastlane/metadata/primary_first_sub_category.txt'...
[17:22:54]: Loading './fastlane/metadata/primary_second_sub_category.txt'...
[17:22:54]: Loading './fastlane/metadata/secondary_first_sub_category.txt'...
[17:22:54]: Loading './fastlane/metadata/secondary_second_sub_category.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/first_name.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/last_name.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/phone_number.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/email_address.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/demo_user.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/demo_password.txt'...
[17:22:54]: Loading './fastlane/metadata/review_information/notes.txt'...
[17:22:54]: Verifying the upload via the HTML file can be disabled by either adding
[17:22:54]: `force true` to your Deliverfile or using `fastlane deliver --force`
[17:22:57]: Does the Preview on path './fastlane/Preview.html' look okay for you?
+------------------------------------+-----------------------------------------------------------------------------------------------------+
| Lane Context |
+------------------------------------+-----------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios release |
| SIGH_PROFILE_TYPE | app-store |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"com.********.app"=>"match AppStore com.********.app"} |
| IPA_OUTPUT_PATH | /Users/********/builds/qVPSw-s1/0/********/********/client/ios/Runner.ipa |
| XCODEBUILD_ARCHIVE | /Users/********/Library/Developer/Xcode/Archives/2021-04-21/Runner 2021-04-21 17.14.18.xcarchive |
| DSYM_OUTPUT_PATH | /Users/********/builds/qVPSw-s1/0/********/********/client/ios/Runner.app.dSYM.zip |
+------------------------------------+-----------------------------------------------------------------------------------------------------+
[17:22:57]: Could not retrieve response as fastlane runs in non-interactive mode
+------+--------------------------------------------------+-------------+
| fastlane summary |
+------+--------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+--------------------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | Switch to ios build_release lane | 0 |
| 3 | Switch to ios certificate_release lane | 0 |
| 4 | Switch to ios get_app_store_connect_api_key lane | 0 |
| 5 | ensure_env_vars | 0 |
| 6 | app_store_connect_api_key | 0 |
| 7 | match | 2 |
| 8 | gym | 522 |
| 9 | Switch to ios get_app_store_connect_api_key lane | 0 |
| 10 | ensure_env_vars | 0 |
| 11 | app_store_connect_api_key | 0 |
| 💥 | appstore | 9 |
+------+--------------------------------------------------+-------------+
[17:22:57]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
➡️ Metadata Path is not considered
https://github.com/fastlane/fastlane/issues/18321 [open] 4 💬
2 weeks ago
➡️ GITLAB CI: Could not retrieve response as fastlane runs in non-interactive mode
https://github.com/fastlane/fastlane/issues/17376 [closed] 18 💬
17 Feb 2021
➡️ FastlaneCore::Interface::FastlaneCrash: [!] Could not retrieve response as fastlane runs in non-interactive mode
https://github.com/fastlane/fastlane/issues/17488 [closed] 11 💬
16 Jan 2021
and 53 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20retrieve%20response%20as%20fastlane%20runs%20in%20non-interactive%20mode&type=Issues&utf8=✓
🔗 You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/Users/********/builds/qVPSw-s1/0/********/********/client/ios/vendor/bundle/ruby/2.6.0/bin/fastlane)
/Users/********/builds/qVPSw-s1/0/********/********/client/ios/vendor/bundle/ruby/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/ui/interface.rb:129:in `crash!': [!] Could not retrieve response as fastlane runs in non-interactive mode (FastlaneCore::Interface::FastlaneCrash)
Which access has your API key? Try to create a new key with App Manager access.
I was able to fix this in my project by adding the force: true option to the upload_to_appstore call in our fastfile. The Fastlane docs list force as an option, but it's hidden behind a "More Options" dropdown.
Also like the other answer says you need to have the proper permissions for your API key. You need an API Key with App Manager permissions to create a new build, which also lets you upload the ipa. I read somewhere that Developer permission is enough to update the build after an App Manager creates it, however I haven't actually tried it.
The lane in our fastfile now looks like this:
lane :release_appstore do
upload_to_app_store(
ipa: "<ipa_path>.ipa",
api_key_path: "<api_key_path>.json",
force: true
)
end

Rails 6 blank page when running server

I moved to rails 6 after being developing in rails 5 and I'm getting a misterious error when running rails server. When I go to localhost://3000 the browser shows a blank page and nothing else. Did anybody have the same problem?
Important: This blank page started to show after I installed bootstrap with yarn.
PD: I'm using foreman tu run puma and compile webpacker, but happens the same with rails s command
here are the logs from the server:
10:07:50 web.1 | started with pid 11365
10:07:50 webpacker.1 | started with pid 11366
10:07:52 web.1 | Puma starting in single mode...
10:07:52 web.1 | * Version 4.3.1 (ruby 2.7.0-p0), codename: Mysterious Traveller
10:07:52 web.1 | * Min threads: 5, max threads: 5
10:07:52 web.1 | * Environment: development
10:07:57 webpacker.1 | ℹ 「wds」: Project is running at http://localhost:3035/
10:07:57 webpacker.1 | ℹ 「wds」: webpack output is served from /packs/
10:07:57 webpacker.1 | ℹ 「wds」: Content not from webpack is served from /home/enzo/Ruby/Rails/Aguara/aguara/public/packs
10:07:57 webpacker.1 | ℹ 「wds」: 404s will fallback to /index.html
10:08:06 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:06 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/static.rb:110: warning: The called method `initialize' is defined here
10:08:07 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:07 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
10:08:08 web.1 | * Listening on tcp://0.0.0.0:5000
10:08:08 web.1 | Use Ctrl-C to stop
10:08:16 webpacker.1 | ℹ 「wdm」: Hash: c16cbbe009c350199791
10:08:16 webpacker.1 | Version: webpack 4.41.5
10:08:16 webpacker.1 | Time: 18836ms
10:08:16 webpacker.1 | Built at: 05/04/2020 10:08:16 AM
10:08:16 webpacker.1 | Asset Size Chunks Chunk Names
10:08:16 webpacker.1 | js/application-64644ee2e024eff1d7f7.js 1.72 MiB application [emitted] [immutable] application
10:08:16 webpacker.1 | js/application-64644ee2e024eff1d7f7.js.map 1.89 MiB application [emitted] [dev] application
10:08:16 webpacker.1 | js/bootstrap_custom-4a75b3f7b43b52ae2490.js 929 KiB bootstrap_custom [emitted] [immutable] bootstrap_custom
10:08:16 webpacker.1 | js/bootstrap_custom-4a75b3f7b43b52ae2490.js.map 1.04 MiB bootstrap_custom [emitted] [dev] bootstrap_custom
10:08:16 webpacker.1 | manifest.json 738 bytes [emitted]
10:08:16 webpacker.1 | ℹ 「wdm」: Compiled successfully.
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/integer.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/messages/rotator.rb:28: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/messages/rotator.rb:6: warning: The called method `initialize' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.1/lib/action_view/unbound_template.rb:24: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.2.1/lib/action_view/template.rb:130: warning: The called method `initialize' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/translation.rb:67: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/i18n-1.7.0/lib/i18n.rb:179: warning: The called method `translate' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/abstract_controller/helpers.rb:67: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_controller/metal/request_forgery_protection.rb:313: warning: The called method `form_authenticity_token' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/railties/collection_cache_association_loading.rb:7: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/railties/collection_cache_association_loading.rb:12: warning: The called method `relation_from_options' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:119: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:78: warning: The called method `find_asset' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/cookies.rb:635: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:150: warning: The called method `encrypt_and_sign' is defined here
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/message_encryptor.rb:175: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
10:08:17 web.1 | /home/enzo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/messages/metadata.rb:17: warning: The called method `wrap' is defined here
this is the network tab in chrome:
enter image description here
After a hard debbuging I finally have found that the yield tag was the problem, now my app is working again haha

MongoDB error on Logstash start admin.listCollections | FAILED | wrong number of arguments (given 2, expected 1) [duplicate]

I'm trying to open my MongoDB models, however, I'm getting the following error:
MONGODB | xxx.xx.x.xxx:27017 | db.find | FAILED | wrong number of arguments (given 2, expected 1) | 0.013306s
My Mongo credentials are correct, and I can connect to the database's collections outside of Rails.
The first few lines of the error are:
Started GET "/admin/xsl_sheet" for xxx.xxx.xxx.xxx at 2020-03-03 13:49:54 UTC
Processing by RailsAdmin::MainController#index as HTML
Parameters: {"model_name"=>"xsl_sheet"}
(5.0ms) SELECT `companies`.`name` FROM `companies` WHERE `companies`.`id` = 4
CACHE (0.1ms) SELECT `companies`.`name` FROM `companies` WHERE `companies`.`id` = 4 [["id", "4"]]
CACHE (0.2ms) SELECT `companies`.`name` FROM `companies` WHERE `companies`.`id` = 4 [["id", "4"]]
MONGODB | xxx.xx.x.xxx:27017 | db.saslStart | STARTED | {}
MONGODB | xxx.xx.x.xxx:27017 | db.saslStart | SUCCEEDED | 0.007s
MONGODB | xxx.xx.x.xxx:27017 | db.saslContinue | STARTED | {}
MONGODB | xxx.xx.x.xxx:27017 | db.saslContinue | SUCCEEDED | 0.006s
MONGODB | xxx.xx.x.xxx:27017 | db.saslContinue | STARTED | {}
MONGODB | xxx.xx.x.xxx:27017 | db.saslContinue | SUCCEEDED | 0.006s
MONGODB | xxx.xx.x.xxx:27017 | db.find | STARTED | {"find"=>"TestCompanyNumber2_xsl_sheets", "filter"=>{"assetable_id"=>4}, "limit"=>1, "skip"=>0, "sort"=>{"_id"=>-1}, "projection"=>{"_id"=>1}}
MONGODB | xxx.xx.x.xxx:27017 | db.find | FAILED | wrong number of arguments (given 2, expected 1) | 0.013306s
Rendered /Project/app/views/rails_admin/main/index.html.haml within
layouts/rails_admin/application (349.7ms)
Rendered public/500.html (64.4ms)
wrong number of arguments (given 2, expected 1)
/GEMS/gems/bson-4.8.0-java/lib/bson/hash.rb:115:in `from_bson'
Edit:
Here is the code inside rails_admin.rb which (I believe) is in charge of pulling objects from MongoDB:
c.model XslSheet do
label Proc.new {"Xsl Sheet"}
navigation_label Proc.new {I18n.t('navigation.actions')}
weight 303
navigation_icon 'fa fa-file-excel-o'
list do
scopes [:applicationId]
field :data_file_name
field :updated_at
end
end
This is https://jira.mongodb.org/browse/RUBY-2146. Downgrade to bson 4.7.0 until 4.8.2 is released.
To help people answer your questions, include the versions of the software you are using (in this case, mongoid, mongo and bson versions are relevant), as well as the fact you are using JRuby.

iOS Code Signing Fastlane Match Error

I'm getting the following when trying to deploy my application to iTunes Connect using Fastlane.
It was working not too long ago, and I'm not sure why all the sudden it's now failing. I recently upgraded from CircleCI 1.0 to CircleCI 2.0, and that is about when it started to fail. The last deployment done on CircleCI 1.0 was successful, but everyone on CircleCI 2.0 has failed.
Any ideas how to fix this code signing error with Fastlane?
+-----------------------+-------------------------------------------------+
| Summary for match 2.94.0 |
+-----------------------+-------------------------------------------------+
| type | appstore |
| app_identifier | ["com.charliefish.ios.test"] |
| force | true |
| git_url | https://github.com/fishcharlie/myprivatedataA.git |
| git_branch | master |
| username | charlie#test.com |
| keychain_name | login.keychain |
| readonly | false |
| team_id | 86LATJ1793 |
| verbose | false |
| skip_confirmation | false |
| shallow_clone | false |
| clone_branch_directly | false |
| force_for_new_devices | false |
| skip_docs | false |
| platform | ios |
+-----------------------+-------------------------------------------------+
[11:38:04]: Cloning remote git repo...
[11:38:04]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[11:38:10]: Installing certificate...
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
[11:38:11]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
+-------------------+------------------------------------------------+
| Installed Certificate |
+-------------------+------------------------------------------------+
| User ID | 86LATJ1793 |
| Common Name | iPhone Distribution: Charlie Fish (86LATJ1793) |
| Organisation Unit | 86LATJ1793 |
| Organisation | Charlie Fish |
| Country | US |
| Start Datetime | 2018-05-03 18:13:05 UTC |
| End Datetime | 2019-05-03 18:13:05 UTC |
+-------------------+------------------------------------------------+
+-------------------------------------+------------------------------------------------+
| Summary for sigh 2.94.0 |
+-------------------------------------+------------------------------------------------+
| app_identifier | com.charliefish.ios.test |
| username | charlie#test.com |
| force | true |
| cert_id | PQ8B8T1T54 |
| provisioning_name | match AppStore com.charliefish.ios.test |
| ignore_profiles_with_different_name | true |
| team_id | 86LATJ1793 |
| platform | ios |
| adhoc | false |
| development | false |
| skip_install | false |
| skip_fetch_profiles | false |
| skip_certificate_verification | false |
| readonly | false |
+-------------------------------------+------------------------------------------------+
[11:38:12]: Starting login with user 'charlie#test.com'
[11:38:13]: Successfully logged in
[11:38:13]: Fetching profiles...
[11:38:14]: Verifying certificates...
[11:38:14]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
[11:38:14]: Certificate for Provisioning Profile 'match AppStore com.charliefish.ios.test' not available locally: PQ8B8T1T54, skipping this one...
[11:38:14]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[11:38:15]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
[11:38:15]: No certificates for filter: Certificate ID: 'PQ8B8T1T54'
+------------------+-------------+
| Lane Context |
+------------------+-------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios release |
+------------------+-------------+
[11:38:15]: Could not find a matching code signing identity for type 'AppStore'. It is recommended to use match to manage code signing for you, more information on https://codesigning.guide. If you don't want to do so, you can also use cert to generate a new one: https://fastlane.tools/cert
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 💥 | match | 11 |
+------+------------------+-------------+
[11:38:15]: fastlane finished with errors
[!] Could not find a matching code signing identity for type 'AppStore'. It is recommended to use match to manage code signing for you, more information on https://codesigning.guide. If you don't want to do so, you can also use cert to generate a new one: https://fastlane.tools/cert
EDIT
I'm now getting a different error after adding the setup CircleCI task in before all.
It looks like the repo is adding .mobileprovision to the end of profile. But it's searching for the non .mobileprovision version.
+-----------------------+-------------------------------------------------+
| Summary for match 2.94.0 |
+-----------------------+-------------------------------------------------+
| type | appstore |
| app_identifier | ["com.charliefish.ios.test"] |
| force | true |
| git_url | https://github.com/fishcharlie/myprivatedataA.git |
| git_branch | master |
| username | charlie#test.com |
| keychain_name | fastlane_tmp_keychain |
| readonly | true |
| team_id | 08RTYN1272 |
| verbose | false |
| skip_confirmation | false |
| shallow_clone | false |
| clone_branch_directly | false |
| force_for_new_devices | false |
| skip_docs | false |
| platform | ios |
+-----------------------+-------------------------------------------------+
[14:04:47]: Cloning remote git repo...
[14:04:47]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[14:04:48]: 🔓 Successfully decrypted certificates repo
[14:04:48]: Installing certificate...
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
[14:04:49]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
+-------------------+------------------------------------------------+
| Installed Certificate |
+-------------------+------------------------------------------------+
| User ID | 08RTYN1272 |
| Common Name | iPhone Distribution: Charlie Fish (08RTYN1272) |
| Organisation Unit | 08RTYN1272 |
| Organisation | Charlie Fish |
| Country | US |
| Start Datetime | 2018-05-03 18:13:05 UTC |
| End Datetime | 2019-05-03 18:13:05 UTC |
+-------------------+------------------------------------------------+
[14:04:49]: No matching provisioning profiles found for 'AppStore_com.charliefish.ios.test'
[14:04:49]: A new one cannot be created because you enabled `readonly`
[14:04:49]: Provisioning profiles in your repo for type `appstore`:
[14:04:49]: - 'AppStore_com.charliefish.ios.test.mobileprovision'
[14:04:49]: If you are certain that a profile should exist, double-check the recent changes to your match repository
+---------------------------+--------------------------------------------------------+
| Lane Context |
+---------------------------+--------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios release |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/distiller/Library/Keychains/login.keychain-db" |
+---------------------------+--------------------------------------------------------+
[14:04:49]: No matching provisioning profiles found and can not create a new one because you enabled `readonly`. Check the output above for more information.
+------+----------------------------+-------------+
| fastlane summary |
+------+----------------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------------+-------------+
| 1 | Verifying fastlane version | 0 |
| 2 | default_platform | 0 |
| 3 | setup_circle_ci | 0 |
| 💥 | match | 2 |
+------+----------------------------+-------------+
[14:04:49]: fastlane finished with errors
[!] No matching provisioning profiles found and can not create a new one because you enabled `readonly`. Check the output above for more information.
I was able to solve this by going back and looking at my v1.0 config. I had read_only: false set on my CI config. Which I don't think is the best practice. But it's now not throwing any errors and working fine. I'm pretty sure I'm still getting the warning security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain., but it's working even with that warning.
I do have the setup_circle_ci in my config also.
This error can have a lot of reasons, some things you should try:
Make sure you install certificate in local not in system.
Check WWDR certificate Expiry date.
Make sure to have a valid code signing identity defined in your project targets. This might happen when you select Don't Code Sign as Code Signing Identity.
I read your post in Upwork.

How to resolve Rack Lint errors?

I have noticed that certain requests, particularly from Uptime Robot to test page uptime have recently started generated the following Rack Lint error on my Rails 3.1.x app:
21:47:05 web.1 | Started HEAD "/" for 74.86.158.106 at 2012-03-22 21:47:05 -0400
21:47:05 web.1 | Processing by HomeController#index as */*
...
21:47:05 web.1 | /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/activesupport-3.1.4/lib/active_support/core_ext/string/output_safety.rb:23: warning: regexp match /.../n against to UTF-8 string
...
21:47:05 web.1 | Completed 200 OK in 81ms (Views: 60.3ms | ActiveRecord: 0.0ms)
21:47:05 web.1 | 74.86.158.106 - - [22/Mar/2012 21:47:05] "GET / HTTP/1.1" 200 31842 0.1993
21:47:05 web.1 | E, [2012-03-22T21:47:05.546848 #18938] ERROR -- : app error: Content-Length header was 31842, but should be 0 (Rack::Lint::LintError)
21:47:05 web.1 | E, [2012-03-22T21:47:05.546978 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/rack-1.3.6/lib/rack/lint.rb:19:in `assert'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547079 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/rack-1.3.6/lib/rack/lint.rb:501:in `verify_content_length'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547178 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/rack-1.3.6/lib/rack/lint.rb:525:in `each'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547277 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/rack-1.3.6/lib/rack/body_proxy.rb:23:in `method_missing'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547375 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/unicorn-4.2.0/lib/unicorn/http_response.rb:41:in `http_response_write'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547476 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:538:in `process_client'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547574 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:604:in `worker_loop'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547672 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547770 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/unicorn-4.2.0/lib/unicorn/http_server.rb:137:in `start'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547867 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/gems/unicorn-4.2.0/bin/unicorn:121:in `<top (required)>'
21:47:05 web.1 | E, [2012-03-22T21:47:05.547966 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/bin/unicorn:19:in `load'
21:47:05 web.1 | E, [2012-03-22T21:47:05.548063 #18938] ERROR -- : /Users/username/.rvm/gems/ruby-1.9.3-p125#project/bin/unicorn:19:in `<main>'
Any ideas as to what may be going on here? I'm really not finding a solution right now that specifically addresses what to do in this scenario as far as poking and hunting down what really may be going on.
I know it's an old question, but I have the exact same issue. Requests from UptimeRobot and New Relic (and only from IPs from those two) give these log messages.
Both UptimeRobot and NewRelic reports 'OK'.
It seems that it is not the request that Rack::Lint is complaining about, but the response. Look at the stacktrace. It comes through http_response_write of unicorn (I too use unicorn).
I will investigate more and add any findings here.
UPDATE:
I am able to reproduce the issue with
$ curl https://example.com -X HEAD -i
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Wed, 18 Nov 2015 09:17:11 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 18422
Connection: keep-alive
Status: 200 OK
...
curl: (18) transfer closed with 18422 bytes remaining to read
So it seems that my old Rails is not supporting HEAD requests properly.
UPDATE: I am not able to reproduce on my vagrant box or on the staging server. Only difference from production I can think of is SSL.
Looks like your Uptime robot is sending a header with the wrong value. It should be sending the Content-length header with a value of 0 (or not sending it at all) but it's sending it with 31842, which is probably wrong.
You could direct it to some other http server, dump all headers and see why it is sending this or just change your uptime robot to not send this header.

Resources