calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

RunLoop::DeviceAgent::Client::HTTPError: #1356

Closed kariasbolster closed 6 years ago

kariasbolster commented 6 years ago

What does this error mean?

calabash-ios 0.20.4> start_test_server_in_background
RunLoop::DeviceAgent::Client::HTTPError:

Could not launch com.bnpp.wm.ebkgspios.private.sin.sit on #<Device: James Santos’s iPhone (10.3.3) 61ebbddf27b94ea0a6659c05f0a3152fd66a9eec>:

Expected status code < 400, found 500.

Server replied with:

{"error"=>"Could not launch application with bundle identifier: com.bnpp.wm.ebkgspios.private.sin.sit\nThe operation couldn’t be completed. Application \"com.bnpp.wm.ebkgspios.private.sin.sit\" is unknown to FrontBoard."}

Something went wrong.

    from /Users/viseokent/.gem/ruby/2.3.5/gems/run_loop-2.6.2/lib/run_loop/device_agent/client.rb:1486:in `rescue in launch_aut'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/run_loop-2.6.2/lib/run_loop/device_agent/client.rb:1449:in `launch_aut'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/run_loop-2.6.2/lib/run_loop/device_agent/client.rb:293:in `launch'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/run_loop-2.6.2/lib/run_loop/device_agent/client.rb:167:in `run'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/run_loop-2.6.2/lib/run_loop.rb:113:in `run'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/launcher.rb:408:in `block in new_run_loop'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/launcher.rb:406:in `times'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/launcher.rb:406:in `new_run_loop'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/launcher.rb:365:in `relaunch'
    from /Users/viseokent/.gem/ruby/2.3.5/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/core.rb:1567:in `start_test_server_in_background'
    from (irb):1
    from /Users/viseokent/.rubies/ruby-2.3.5/bin/irb:11:in `<main>'
calabash-ios 0.20.4>

Mac OS 10.13.1 Iphone OS11 Run Loop 2.6.2

jmoody commented 6 years ago

It probably means that the app is not installed on the device.

Double check that:

com.bnpp.wm.ebkgspios.private.sin.sit

is correct.

As an aside, I don't think that is valid Uniform Type Identifier. Can you make an app record in the Apple Developer portal with that identifier? Maybe this is an enterprise account?

kariasbolster commented 6 years ago

Yeah it is an enterprise account. I'm sorry I don't really know anything about iOs development as I've only been doing web automation in my previous jobs and this one has been forced unto me so in this case how should I proceed?

jmoody commented 6 years ago

Is the app installed on the device? If not, install it with Xcode - either by building and running or using the Device Management window (Shift + Command + 2).

kariasbolster commented 6 years ago

I did install the app. But then another error happened which is this #1357

jmoody commented 6 years ago

The app was not installed. In the stack trace I can see that ideviceinstaller failed.

seshusangeetha commented 6 years ago

I am also facing this issue quite often when the scenarios are running in bulk. But the thing is that when run in bulk some scenarios pass and once this error comes certain scenarios fails and then after some agin it passes. It prompts me of a spring board alert error not a launch error with "Expected status code < 400, found 500. " stating Server replied with:

{"title"=>"xxxxxxx" "error"=>"A SpringBoard alert is blocking test execution and it cannot be dismissed."}

(RunLoop::DeviceAgent::Client::HTTPError)

But when run in local for few scenarios I never find this error, while we have added all the necessary code to handle the SpringBoard alert handler and it gets handled in all the other cases