Obscure fastlane runtime fails. syntax error, unexpected end-of-input, expecting `end' - fastlane

My Fastfile lane looked good, but the interpreter reports that it is expecting a matching 'end' (as in do-end pairing).
desc "Test the token passing from Jenkins."
lane :cliToken do |options|
token = options[:firebase_cli_token]
puts "(fastlane) ** Firebase CLI token: #{token}"
firebase_app_distribution( app:"1:XXXXXXXXXXXX:android:ZZZZZZZZZZZZZZZZ",
groups:options[:test_group],
firebase_cli_token:#{token})
end

The solution was to put the last substitution argument in quotes.
firebase_cli_token:"#{token}")
the complete lane-code is:
desc "Test the token passing from Jenkins."
lane :cliToken do |options|
token = options[:firebase_cli_token]
puts "(fastlane) ** Firebase CLI token: #{token}"
firebase_app_distribution( app:"1:XXXXXXXXXXXX:android:ZZZZZZZZZZZZZZZZ",
groups:options[:test_group],
firebase_cli_token:"#{token}")
end
This may be obvious to others, but I lost several hours of head scratching and I did not find anyone with the same solution (although very similar error message).

Related

Protractor - check if element is present and either stop test or continue

I have a Protractor test that pulls various values from the UI and stores them as variables for comparison with values from a different database.
Now this test needs to run against multiple sites BUT of the 25 maximum data points recorded, some sites only have 22.
Clearly the test fails on those "22" sites since the elements are not present.
What I want to achieve is where there's a "22" site, the tests against the not present elements are ignored and the test proceeds to the end. Conveniently, the "missing" elements are the last ones in the spec.
Crudely speaking...
if element-y is not present end test or if element-y is present continue
Grateful if anyone could advise.
Thanks #sergey. I've modified your example as below....
if (!(await element(by.xpath('//*[#id="root"]/div/div[2]/main/div/div/section[5]/div/div/div[1]/section/div/span')).isPresent())) {
console.warn ('Functions are not present, closing the session')
await browser.close()
I get this error:
if (!(await element(by.xpath('//*[#id="root"]/div/div[2]/main/div/div/section[5]/div/div/div[1]/section/div/span')).isPresent())) {
^^^^^^^
SyntaxError: Unexpected identifier
I've tried using a 'var' instead of the actual element, but get the same result.
Thanks
well the best option that I recall is still pretty dirty... you can do something like this
if (!(await element.isPresent())) {
console.warn('Element not present, closing the session')
await browser.close()
}
And then the rest of test cases will fail as session not found or similar error
The reason you can't do anything better because in protractor you can't do conditional test cases based on a Promise-like condition, if that makes sense...

Why is Gatling failing on a valid jsonpath?

I have the following .check on my returned body: (I changed the values for security reasons but the structure is the same)
.exec(http("Get ids")
.post("GetIds")
.body(ElFileBody("json/getIds.json")).asJson
.check(jsonPath("$...Types..[?(#.Type == 'web')].id").findAll.saveAs("IDLlist"))
But the transaction fails with "Gettting findAll.exists extraction crashed: end of input expected when trying to extract values from a returned body"
Gatling prints the body of the failed transaction, when I take the exact body that the transaction had just failed on to http://jsonpath.com/ and
evaluate the jsonpath that had just failed, I get good results with no issues. This means that the returned body is correct and that the jsonpath is also correct.
What is the issue then?
Thanks to Stephane from the Gatling forum, I found that $..Files[?(#.Format == 'DASH_Web')].URL is correct works instead of the variation that I had.
Since http://jsonpath.com/ was able to extract the correct path using my original syntax, I think its important to note that Gatling jsonpath is much more conservative in its syntax.
It seems your JSON path syntax is wrong --> "$...Types..[?(#.Type == 'web')].id"
Try using JSONPath Online Evaluator -- http://jsonpath.com/ to find correct json syntax

Alpha Vantage error when symbol has digits

I'm trying to get quotes for an Australian stock with ticker A200.AX (aka A200.AUS) from Alpha Vantage.
I have no issues getting other symbols from the AX market, e.g.:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=ETHI.AUS&apikey=demo
...returns data as expected
However when a symbol has digit(s) in it, it seems to return an error:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=A200.AUS&apikey=demo
Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY.
Same result for F100.AUS
I checked to make sure the ticker was valid: A200.AUS shows up if I search for it:
https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=A200.AUS&apikey=demo
I'm aware of some questions related to URL encoding, but I can't see any URL special characters in A200.AUS . Besides, using the search endpoint works with the ticker passed on literally.
Does anyone know how to download this stock's information or what I'm doing wrong?
Your use of the search endpoint is great, however A200.AUS is an ETF. Alpha Vantage has some ETFs, but currently, only 100% supports stocks.

Problem with PayPal checkout and Braintree class

I am trying to set up a PayPal checkout with this tutorial:
https://developer.paypal.com/docs/checkout/integrate/#
I am facing a problem with step 6. Verify the transaction
The php script throws:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /vendor/braintree/braintreehttp/lib/BraintreeHttp/HttpClient.php on line 38
in the Browser console.
function __construct(Environment $environment)
{
$this->environment = $environment;
$this->encoder = new Encoder();
$this->curlCls = Curl::class;
}
The last line is 38. Anybody an idea what is going wrong here?
I had the same error and commented out line that sets curlCls
$this->curlCls = Curl::class;
It looks it is not used anywhere and the basic PayPal example started to work.

GitHub Pages build failure due to "nil was passed to a date-related filter that expects valid dates in atom.xml"

On my Jekyll page I get this error once I commit to GitHub:
The page build failed with the following error:
The value 'nil' was passed to a date-related filter that expects valid dates in atom.xml or one of its layouts.
Any idea how to fix it? I went through all posts and checked the Front Matter but can't find anything wrong...