Error while processing event 'click': "SyntaxError: Unexpected token u\n - mink

I am using basic features with MinkZombieDriver. my
node -v 5.2.0, npm -v 3.10.5, mink-zombie-driver v1.4.0 ..
behat.yml
default:
extensions:
Behat\MinkExtension:
base_url: 'https://example.com'
javascript_session: zombie
zombie:
node_modules_path: '/home/ubuntu/node_modules'
goutte: ~
paths:
features: features
bootstrap: %behat.paths.features%/bootstrap
I wrote simple feature and it is giving Behat\Mink\Exception\DriverException
#javascript
Scenario: View Products to assign store
Given I am on "/index.php" # FeatureContext::visit()
When I fill in "Username" with "hello" # FeatureContext::fillField()
When I fill in "Password" with "123" # FeatureContext::fillField()
And I should see "Manage Your Accounts" # FeatureContext::assertPageContainsText()
When I press "login_button" # FeatureContext::pressButton()
Error while processing event 'click': "SyntaxError: Unexpected token u\n at Object.parse (native)\n
I searched in the web but not sure how to solve. I am still using the basic default features. I know the problem is with JSON parsing .. I am not sure what I am doing wrong? I am looking forward for any suggestions.. Thanks ..

As is seems from my comment link you need to update zombie version to at least version 2.
Please note that you might have some compatibility issues that you will need to solve.
Check this answer also nodejs cannot find module 'zombie' with PHP mink

Related

installation error in shopware-pwa initialization

I am trying to install shopware-pwa. I am following the steps in https://github.com/vuestorefront/shopware-pwa
But at the first step while initializing the project npx #shopware-pwa/cli init
While installing I used default option:
* Shopware instance address: · https://shopware6-demo.vuestorefront.io
* Shopware instance access token: · SWSCVJJET0RQAXFNBMTDZTV1OQ
* Which version you'd like to use: latest stable (recommended)
Error: Command failed: npx --ignore-existing create-nuxt-app#3.2.0 --answers "{\"name\":\"shopware-pwa-project\",\"description\":\"shopware-pwa-project description\",\"author\":\"Vue Storefront\",\"pm\":\"yarn\",\"ui\":\"none\",\"language\":\"js\",\"server\":\"none\",\"features\":[\"axios\",\"pwa\"],\"linter\":[\"prettier\",\"lintStaged\"],\"test\":\"jest\",\"mode\":\"universal\",\"target\":\"server\",\"devTools\":[],\"gitUsername\":\"\",\"ci\":\"none\"}"
npx: the --ignore-existing argument has been removed.
See `npm help exec` for more information
Trace: Error: Answers JSON could not be parsed (Unexpected token n in JSON at position 1)
at SAO.runGenerator (/home/user/.npm/_npx/059d932392171cf4/node_modules/sao/lib/index.js:126:15)
at SAO.run (/home/user/.npm/_npx/059d932392171cf4/node_modules/sao/lib/index.js:101:16)
at /home/user/.npm/_npx/059d932392171cf4/node_modules/create-nuxt-app/lib/cli.js:51:17
Does anybody come up with the issue?
I found issue #612 in the create-nuxt-app GitHub repository.
It seems that after the --answers argument you'd have to start with a sinqle quote (') and then paste your configuration as a JSON. The JSON must not contain any linefeeds/carriage returns and there must not be any whitespaces ( ) between the properties.
So in your case your bash command should look like this:
npx --ignore-existing create-nuxt-app#3.2.0 --answers '{"name":"shopware-pwa-project","description":"shopware-pwa-project description","author":"Vue Storefront","pm":"yarn","ui":"none","language":"js","server":"none","features":["axios","pwa"],"linter":["prettier","lintStaged"],"test":"jest","mode":"universal","target":"server","devTools":[],"gitUsername":"","ci":"none"}'
I've tried it on my machine just now and it worked. I only got a warning becausethe --ignore-existing argument has been removed.
hope that this solves your problem!
greetings

How to add Babel support for nullishCoalescingOperator to vue project?

In my Vue-CLI project, when I tried using the ?? operator, I got this error:
Syntax Error: SyntaxError: /Users/stevebennett/odev/freelancing/v-map/src/components/Map.vue: >Support for the experimental syntax 'nullishCoalescingOperator' isn't currently enabled (30:29):
...
Add #babel/plugin-proposal-nullish-coalescing-operator (https://git.io/vb4Se) to the 'plugins' section of your Babel config to enable transformation.
I installed #babel/plugin-syntax-nullish-coalescing-operator (its name seems to have changed), added it to my babel.config.js:
module.exports = {
presets: ['#vue/app'],
plugins: ['#babel/plugin-syntax-nullish-coalescing-operator'],
};
Now the error message seems to have gone backwards, no reference to the operator name at all:
Module parse failed: Unexpected token (39:35)
You may need an appropriate loader to handle this file type.
| case 8:
| points = _context.sent;
console.log(sheetID ?? 37);
What am I doing wrong?
For me, the #babel/plugin-syntax-nullish-coalescing-operator plugin would not work, which is the one you are using.
I had to use the #babel/plugin-proposal-nullish-coalescing-operator plugin which is the one that the error message suggests you use.
Additionally, I noticed this on the page for the #babel/plugin-syntax-nullish-coalescing-operator plugin:
I can't say for sure if this will fix your problem, but it certainly fixed mine

ares-inspect luna-send command failed

I'm trying to debug my webos3 tv but I keep getting the following error:
ares-inspect --device web30 com.starz.lgtv.app_0.0.1_all.ipk
ares-inspect ERR! ares-inspect: Error: luna-send command failed (not exist)
It doesn't say anywhere in the documentation what luna-send is and it's closed source. I'm running on mac using the cli for webos. Is there anything I need to install?
Thanks
By trial and error, I found that you need to omit the version numbers for it to work:
ares-inspect --device web30 com.starz.lgtv.app --open
Don't forget the --open argument to open the inspector. :-)
The documentation doesn't explicitly say that you need to omit it but it is inferred in the demo code:
http://webostv.developer.lge.com/sdk/using-webos-tv-cli/debugging-web-applications-cli/
It's not about omitting version or removing suffixes from filenames. You should use the app id here, same as in your appinfo.json file.
ares-inspect [OPTION...] [--app|-a] APP_ID
APP_ID = ID of the app whose information is to be viewed using Web Inspector.
See http://webostv.developer.lge.com/sdk/tools/using-webos-tv-cli/ for reference.

fastlane sigh issue with input asking for more information

I'm trying to use sigh and I am a bit confused. When I type the below line:
sigh username:"me#example.com" app_identifier:"com.example"
It logs in with my user name but then gives me the prompt:
[21:19:44]: Successfully logged in
[21:19:44]: Fetching profiles...
[21:19:44]: To not be asked about this value, you can specify it using 'app_identifier'
The bundle identifier of your app:
When I type the below line:
sigh -a com.example -u me#example.com
I do not get the prompt. What am I doing wrong in the first one? The first one from what I understand is what I can use in the fastlane file for automation, which is why this is important. I read the below on this:
https://github.com/fastlane/fastlane/tree/master/sigh
as well as the sigh --help documentation.
My lane is defined as below:
desc "Get the provisioning profiles for the app"
lane :sign do |options|
apple_id = CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
team_id = CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
cert(username: apple_id, team_id: team_id)
sigh(app_identifier: options[:bundle_id], username: apple_id)
end
The part where sigh is I get the same prompt. Is there a way to remove it?
UPDATE
The following works:
sigh --username "me#example.com" --app_identifier "com.example"
But I want it to work in fastlane. What am I doing wrong there?
sigh username:"me#example.com" app_identifier:"com.example"
That syntax is not supported, instead try the following from the command line
sigh --username "me#example.com" --app_identifier "com.example"
To do the same from your Fastfile
sigh(username: "me#example.com", app_identifier: "com.example")
Turns out the reason was that I had some data in my Appfile that Fastlane didn't like. It didn't show proper error messaging, but I put one more variable that it didn't recognize and there for it failed.
One thing I learned about Fastlane is that it works well but sometimes errors are hard to debug. Make sure to read the documentation properly!

Algebra filter error in moodle

I installed moodle 1.9.12 and now I want to use Algebra notation in content. I enable "TeX Notation" and "Algebra Notation" in administrator panel and also install mimetext and dvips and Imagemagic on the server. fortunately Tex Notation works fine but I got the following error for Algebra:
sh: /var/www/html/moodle/filter/tex/mimetex.linux: not found
The shell command
"/var/www/html/moodle/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/algebra/de06d6c44d98ba4e42dffca988bf530b.gif" -- '\Large \frac{\sin\left(z\right)}{x^{2}+y^{2}}'
returned status = 127
File size of mimetex executable /var/www/html/moodle/filter/tex/mimetex.linux is 830675
The file permissions are: 100775
The md5 checksum of the file is 56bcc40de905ce92ebd7b083c76e019e
Image not found!
Note: /var/www/html/moodle/filter/tex/mimetex.linux exists on the server and is executable!!!
What is the problem?? Any idea?????
From what you have described, calling the general tex filter debug page works and does not show up the same error.
/filter/tex/texdebug.php works, but /filter/algebra/algebradebug.php does not.
If this is the case, perhaps you could check for an open_basedir, or safe_mode_exec_dir being set to include the current working directory, or otherwise restricting the execution of /var/www/html/moodle/filter/tex/mimetex.linux, while the current working directory is /var/www/html/moodle/filter/algebra.
You could look at this by visiting /admin/phpinfo.php at your site, and look carefully at the effective values of open_basedir, safe_mode and safe_mode_exec_dir.
You could also check the apache error log or add the following lines to the top of the algebra debug php file, and you might see some extra error messages:
$CFG->debug = 6143 ;
$CFG->debugdisplay= 1 ;
Hope that helps