I’m Using Ruby, Appium and RSpec and Github actions to test a pre-built app.
- NPM: 8.12.1
- Appium: 1.22.3
- Xcode 13.4.1 (Build version 13F100)
The environment as far as i’m aware is the same as my local one. The .app
was built and copied into my appium project using Xcode > Product > Show Build Folder in Folder
.
My tests run fine locally, but fail on the CI with “update the app”. Can anyone see what I’m missing sorry?
Error
Failures:
1) Login and Signout Logs in and it signs out
Failure/Error: @driver = Appium::Driver.new(opts, true).start_driver
Selenium::WebDriver::Error::UnknownError:
An unknown server-side error occurred while processing the command. Original error: Error running 'install': An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=4):
“myapp” Needs To Be Updated
This app needs to be updated by the developer to work on this version of iOS.
Failed to find matching arch for input file: /Users/runner/Library/Developer/CoreSimulator/Devices/B30A6079-7A57-4FF9-9636-E46822A29FB9/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ld5uKb/extracted/myapp.app/myapp
Underlying error (domain=MIInstallerErrorDomain, code=15):
Failed to find matching arch for input file: /Users/runner/Library/Developer/CoreSimulator/Devices/B30A6079-7A57-4FF9-9636-E46822A29FB9/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ld5uKb/extracted/myapp.app/myapp
# UnknownError: An unknown server-side error occurred while processing the command. Original error: Error running 'install': An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=4):
# “myapp” Needs To Be Updated
# This app needs to be updated by the developer to work on this version of iOS.
# Failed to find matching arch for input file: /Users/runner/Library/Developer/CoreSimulator/Devices/B30A6079-7A57-4FF9-9636-E46822A29FB9/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ld5uKb/extracted/myapp.app/myapp
# Underlying error (domain=MIInstallerErrorDomain, code=15):
# Failed to find matching arch for input file: /Users/runner/Library/Developer/CoreSimulator/Devices/B30A6079-7A57-4FF9-9636-E46822A29FB9/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ld5uKb/extracted/myapp.app/myapp
# at getResponseForW3CError (/Users/runner/hostedtoolcache/node/18.3.0/x64/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
# at asyncHandler (/Users/runner/hostedtoolcache/node/18.3.0/x64/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
# ./spec/config.rb:20:in `block (2 levels) in <top (required)>'
Finished in 1 minute 48.25 seconds (files took 1.54 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/tests/user_logs_in_spec.rb:9 # Login and Signout Logs in and it signs out
CI.yml
name: Appium CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- uses: actions/setup-ruby@v1
- name: Install project gems
run: bundle install
- name: Install node
run: brew install node
- name: Update NPM
run: npm install -g [email protected]
- name: Install Appium
run: npm install --location=global appium
- name: Start Appium Server
run: appium &
- name: Run tests
run: bundle exec rspec
Config.rb
require 'appium_lib'
opts = {
caps: {
'deviceName' => 'iPhone 13 Pro',
'platformName' => 'iOS',
'platformVersion' => '15.5',
'app' => './app/myapp.app',
'automationName' => 'XCUITest',
'udid': 'auto'
},
appium_lib: {
wait_timeout: 5
}
}
RSpec.configure do |config|
config.before(:each) do
@implicit_wait_timeout = 5
@driver = Appium::Driver.new(opts, true).start_driver
@driver.manage.timeouts.implicit_wait = @implicit_wait_timeout
Appium.promote_appium_methods Object
end
config.after(:all) do
@driver.driver_quit
end
end