When running the "cucumber" command, the iOS Simluator launches and attempts to open my app. The app's splash screen appears and then the simulator goes back to the home screen. I eventually receive an error stating:
Time out waiting for UIAutomation run-loop to Start.
I can manually start the -cal app in the iOS Simulator through xCode. Any troubleshooting steps I can try to figure out why my app isn't running through the simulator using Calabash?
My environment
$xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
$xcodebuild -version
Xcode 6.1.1
Build version 6A2008a
$ calabash-ios version
0.12.2
$ calabash.framework/Resources/version
0.12.2
server_version
{
"app_id" => "com.madeupdomain.MyApp-cal",
"outcome" => "SUCCESS",
"server_port" => 37265,
"version" => "0.12.2",
"app_name" => "Unknown",
"system" => "x86_64",
"simulator_device" => "iPhone",
"simulator" => "",
"app_version" => "1.0",
"iphone_app_emulated_on_ipad" => false,
"git" => {
"revision" => "bafa9fd",
"remote_origin" => "git#github.com:calabash/calabash-ios-server.git",
"branch" => "master"
},
"screen_dimensions" => {
"sample" => 1,
"height" => 1136,
"width" => 640,
"scale" => 2
},
"4inch" => true,
"iOS_version" => "8.2"
}
I got the same problem several times.
First of all check the APP_BUNDLE_PATH
Check the DEVICE_TARGET (if your app does not support that target).
Does your app have a Privacy Alert that appears just after launch?
If so, see the advice on this page:
https://github.com/calabash/calabash-ios/wiki/Managing-Privacy-Alerts:--Location-Services,-APNS,-Contacts
Can you update your question with exact command you are using to start cucumber?
Related
In the Symfony Panther docs it states:
Even if Chrome is the default choice, Panther can control any browser
supporting the WebDriver protocol. It also supports remote browser
testing services such as Selenium Grid (open source), SauceLabs and
Browserstack.
But, there are no other documentation on how to do this.
How do you implement BrowserStack as a remote browser for Panther?
This is how to create a new Panther client using a BrowserStack remote browser:
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Symfony\Component\Panther\Client;
$capabilities = array(
"os" => "OS X",
"os_version" => "Monterey",
"browser" => "Chrome",
"browser_version" => "latest",
"name" => "Test",
"build" => "Build 1.0",
"browserstack.debug" => true,
"browserstack.console" => "info",
"browserstack.networkLogs" => true,
"disableCorsRestrictions" => true,
"wsLocalSupport" => true,
"geoLocation" => "US"
);
$caps = DesiredCapabilities::chrome();
foreach ($capabilities as $key => $value) {
$caps->setCapability($key, $value);
}
$client = Client::createSeleniumClient('https://[YOUR_BROWSERSTACK_USERNAME]:[YOUR_BROWSERSTACK_ACCESS_KEY]#hub-cloud.browserstack.com/wd/hub', $caps);
$client->request('GET', 'https://stackoverflow.com/');
You can see a list of capabilities here: https://www.browserstack.com/automate/capabilities
You can also refer to this -
https://github.com/symfony/panther/blob/main/examples/basic.php
https://stefanoalletti.wordpress.com/2018/07/02/symfony-docker-behat-browserstack-testing-your-app-like-a-boss/
https://symfony.com/blog/introducing-symfony-panther-a-browser-testing-and-web-scrapping-library-for-php
If you face any issue, please create a support ticket with them.
I have a problem with showing apple pass notification in lock screen when using relevantDate.
I have created the pass and I could updated all is good.
but when the screen is locked I'm not able to show any lock screen notifications about the pass updates.
i use this doc of apple to showing a Pass on the Lock Screen.
https://developer.apple.com/documentation/walletpasses/pass/showing_a_pass_on_the_lock_screen/
NB: when i use locations with relevantDate it's work for me but in my case i want just to use "relevantDate = 2022-10-21T10:29:15.7200Z".
this is my code:
$data = [
'description' => $walletData['cardHeader'],
"relevantDate" => "2022-10-21T10:29:15.7200Z",
'formatVersion' => 1,
'organizationName' => $walletData['enseigneName'],
'passTypeIdentifier' => $config['passTypeIdentifier'],
'webServiceURL' => 'https://manager.qoodos.fr/qrcodeTest/loyaltycard',
'authenticationToken' => 'g4are8g4e54b8v71cex45w4g87ec',
'serialNumber' => $qrcode,
'teamIdentifier' => $config['teamIdentifier']
.......
];
At 10:29:15 i didn't receive any notification pass in the lock screen (we have GMT+1).
Thanks for any help.
I'am sending push messages to application with react-native-firebase and it look's wonderful ! Also, I need to receive some portion of data, so sending data something like this
$request_body = [
'to' => $TOKEN_ID,
'notification' => [
'title' => 'Title',
'body' => 'Body',
'sound' => 'default',
],
'data' => [
'key' => 'value',
],
];
I'am trying to listen open push message event as bellow
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
const notification = notificationOpen.notification;
const data = notificationOpen.data;
setTimeout(() => {
Alert.alert(data.key);
}, 5000);
});
After 5 second left, application closes without any error message. If changing Alert.alert(data.key); with Alert.alert(notification.title); application work`s fine and show an alert. Can someone explain to me, why retrieving data is not work properly?
After some research, I found a solution
const data = notification.data;
or
const data = notificationOpen.notification.data;
I recently re-opened an old (1 year) Symfony project and I am having an error on every page (I don't remember having this issue a year ago) :
[exception] 500 | Internal Server Error | Symfony\Component\Config\Exception\FileLoaderLoadException
/var/www/[...]/wdt.xml
ContextErrorException: Notice: Undefined property: DOMDocument::$documentElement
If I clear the cache, the error disappear but as soon as I edit and save a file, the error is showing up again.
The project was using Symfony 2.8 and I updated to Symfony 3.2 but it didn't solve the issue.
I don't think the problem is related to the wdt.xml file and I think it might be related to my laptop config.
I don't really know where to start to investigate so any suggestion is welcome!
Edit 1 :
I am actually having the same problem with another project I created few days ago. The project don't use any additional bundles and I just created 5 entities and generated the MySQL database.
Edit 2 :
After some more researched, I decided to create a new Ubuntu VM and test a new Symfony project and it just work perfectly so it must be something to do with the configuration on my laptop.
Edit 3 :
After some more tests, here is what I get when I add a print_r($dom); in the file XmlUtils.php (vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php) line 59 :
Ubuntu VM (no error) :
DOMDocument Object ( [doctype] => [implementation] => (object value omitted) [documentElement] => (object value omitted) [actualEncoding] => [encoding] => [xmlEncoding] => [standalone] => 1 [xmlStandalone] => 1 [version] => 1.0 [xmlVersion] => 1.0 [strictErrorChecking] => 1 [documentURI] => /var/www/my_project/web/ [config] => [formatOutput] => [validateOnParse] => 1 [resolveExternals] => [preserveWhiteSpace] => 1 [recover] => [substituteEntities] => [nodeName] => #document [nodeValue] => [nodeType] => 9 [parentNode] => [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [attributes] => [ownerDocument] => [namespaceURI] => [prefix] => [localName] => [baseURI] => /var/www/my_project/web/ [textContent] => %kernel.charset% %kernel.default_locale% )
Ubuntu laptop (error) :
DOMDocument Object ( [validateOnParse] => 1 [nodeName] => #document [nodeValue] => [nodeType] => 9 [parentNode] => [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [attributes] => [ownerDocument] => [namespaceURI] => [prefix] => [localName] => [baseURI] => /var/www/lab/symfony/booklib/web/ [textContent] => %kernel.charset% %kernel.default_locale% )
It looks like there is some missing information on my laptop...
So basically, the function $dom->loadXML doesn't return the same value on my laptop environment and inside the VM... any idea why?
I have Ubuntu 16.04 installation with php7.0.15, and i fixed the error by just removing php-xdebug extension.
sudo apt-get purge php-xdebug
I finally resolved the problem by uninstalling / reinstalling php7.
I have no idea why I had this issue though...
In my case the error was triggered by the dom.so extension being loaded in two places. Removing one fixed the problem.
This might be relevant:
https://getcomposer.org/doc/articles/troubleshooting.md#xdebug-impact-on-composer
TLDR: Use COMPOSER_ALLOW_XDEBUG=1 if you are using xdebug with composer.
This is very strange BUT try to change php extensions load order in php config. This solve my problem... move dom extension above or below in list
In my case the dom extension was enabled twice. Once in the dom.ini and also in the php.ini. I removed the extension=dom.so entry from the php.ini and reloaded the apache2 webserver.
Hi I also meet this problem. The way I resolve it is:
composer update
Hope that help some one.
Thank #pjehan. I had the same problem and I've lost a day. Finally, I did like you and it was successful.
Just specify one thing: unistall PHP 7.0.x and PHP 7.1.3 intaller (stable version for PHP 7). The link of the version PHP 7 stable: http://php.net/downloads.php
Thank you so much, #pjehan, you saved my life :D
I solved the problem by disabling xdebug for the cli
Originally we had automated tests working and running continuously back in August. After a lapse they became out of date and we had to put them on hold. I'm trying to get them working again and after updating Calabash-ios, the calabash server, and the Calabash component to the Xamarin Cloud component I ran into a problem. The touch calls aren't working quite right anymore. It seems that the touch is off target.
For example: I try to touch the sign in button of our app and instead the "r" button on the keyboard gets pressed. The keyboard isn't covering the button either.
I've tried the workaround given here thinking that maybe the landscape orientation is causing the problem but no luck.
This is using an iPad 2 simulator running iOS 8.1. I've also tried 7.1 and had the same issue. We are using Xamarin if that makes any difference.
Versions:
~$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer/
~$
~$ xcodebuild -version
Xcode 6.1.1
Build version 6A2008a
~$
~$ calabash-ios version
0.11.4
~$
~$ curl http://localhost:37265/version
{
"app_version": "Unknown",
"outcome": "SUCCESS",
"app_id": "com._______.dev",
"simulator_device": "iPad",
"version": "0.11.4",
"app_name": "_____ Dev",
"iphone_app_emulated_on_ipad": false,
"4inch": false,
"git": {
"remote_origin": "git#github.com:calabash/calabash-ios-server.git",
"branch": "master",
"revision": "bcc992b"
},
"screen_dimensions": {
"scale": 1,
"width": 768,
"sample": 1,
"height": 1024
},
"iOS_version": "8.1",
"system": "x86_64",
"simulator": ""
}
I can reproduce it from calabash-ios console as well.
Both of these commands click the "R" button on the digital keyboard:
irb(main):011:0> touch("button marked:'Sign In'")
[
[0] {
"selected" => false,
"enabled" => true,
"rect" => {
"center_x" => 339.6667,
"y" => 341,
"width" => 58,
"x" => 310.6667,
"center_y" => 428,
"height" => 174
},
"id" => nil,
"description" => "<UIButton: 0x78f80b00; frame = (509 310.667; 174 58); opaque = NO; layer = <CALayer: 0x78f80ab0>>",
"label" => "Sign In",
"alpha" => 1,
"class" => "UIButton",
"frame" => {
"y" => 310.6667,
"width" => 174,
"x" => 509,
"height" => 58
}
}
]
irb(main):012:0> tap_point(339, 428)
Where as this command clicks the sign in button correctly:
irb(main):023:0> tap_point(639, 328)
true
Has anyone seen something like this before? Also, this doesn't happen when I use a physical device.
Has anyone seen something like this before? Also, this doesn't happen when I use a physical device.
Yes, we have had reports of problems like this and they have been, for the most part, resolved by the 0.12.0 pre-releases.
Can you try the following to reproduce:
$ DEVICE_TARGET="iPad Retina (8.1 Simulator)" bundle exec calabash-ios console
> start_test_server_in_background({ :uia_strategy => :host })
The :host strategy is slower than the :preferences strategy. However, because of several bugs in Apple's UIAAutomation API, it is the only strategy that works on iOS 8 devices.
The 0.12.0 pre-releases contain significant improvements in the :host and :preferences strategies. When 0.12.0 is released, you can drop the :uia_strategy => :host and stick with the recommended defaults.
The pre-release situation for UITest is improving; I believe that pre-releases are now available. I don't know what the latest pre-release is. I will inquire and update my answer.