friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6] - web-services

Hi my application is running with Symfony 2.2, I am trying to install FOSRESTBundle with commannde composer require friendsofsymfony/rest-bundle for this purpose but I am getting the following error.
Your requirements could not be resolved to an installable set of packages. Problem 1
- friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6].
- friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6].
- friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6].
- Installation request for friendsofsymfony/rest-bundle ^2.1 -> satisfiable by friendsofsymfony/rest-bundle[2.1.0].
- Installation request for sensio/framework-extra-bundle (locked at v2.2.6, required as 2.2.*) -> satisfiable by sensio/framework-extra-bundle[v2.2.6].Installation failed, reverting ./composer.json to its original content.
the content of composer.json is here
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.2.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.2.*",
"symfony/monolog-bundle": "2.2.*",
"sensio/distribution-bundle": "2.2.*",
"sensio/framework-extra-bundle": "2.2.*",
"sensio/generator-bundle": "2.2.*",
"jms/security-extra-bundle": "1.4.*",
"jms/di-extra-bundle": "1.3.*",
"winzou/console-bundle": "1.*",
"stof/doctrine-extensions-bundle": "1.1.x-dev",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures" : "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"doctrine/migrations": "dev-master",
"friendsofsymfony/user-bundle": "*",
"knplabs/knp-markdown-bundle": "1.2.*#dev",
"ornicar/akismet-bundle": "dev-master",
"genemu/form-bundle": "2.1.*",
"spraed/pdf-generator-bundle": "^1.2",
"psliwa/pdf-bundle": "^1.0",
"knplabs/knp-snappy-bundle": "^1.3",
"h4cc/wkhtmltopdf-i386": "0.12.2.1",
"h4cc/wkhtmltoimage-i386": "0.12.2.1",
"obtao/html2pdf-bundle": "master-dev"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
Please suggest how to resolve this.

If you have symfony2.2 please try:
composer require friendsofsymfony/rest-bundle:1.5.3
Or update symfony.

Related

DataStore - Data won't be synchronized. No GraphQL endpoint configured. Did you forget `Amplify.configure(awsconfig)`?

Please help, i spent 2 days trying simply to use Datastore of amplify. Am building NPM package to wrap an Amplify project backend. Auth works good but datastore not.
Am testing code with ts-node and Jest. It is package so i do not have a framework.
When i call the save function it does not work and throw this warning:
[WARN] 24:08.886 DataStore - Data won't be synchronized. No GraphQL endpoint configured. Did you forget `Amplify.configure(awsconfig)`? {
config: {
authProviders: undefined,
maxRecordsToSync: 10000,
syncPageSize: 1000
}
}
My api endpoint is 100% correct, also the api-key. The backend works in another project built with react. But in my case (NPM package) it does not work.
The script am trying to run:
import { DataStore } from '#aws-amplify/datastore';
import { AccountDetails } from '#/models';
import { SignUp } from "#/Authentication/SignUp";
import InvalidAccountRequirementsException from "#/Exceptions/InvalidAccountRequirementsException";
import "#/app.config";
/**
* #name CreateAccount
* #description:
* build the correct pattern to check specific string type.
*
* #type function
* #param email
* #param password
* #param hasOwnCompany
* #param optInMarketingEmail
* #param tacAgreed
* #constructor
* #return {Promise<AccountDetails>}
*/
const CreateAccount = async (
email: string,
password: string,
hasOwnCompany: boolean,
optInMarketingEmail: boolean,
tacAgreed: boolean,
): Promise<AccountDetails> => {
if (!tacAgreed) {
throw new InvalidAccountRequirementsException('Terms and conditions mus be agreed');
}
const user = await SignUp(email, password);
return await DataStore.save(
new AccountDetails({
cognitoSubId: user.userSub,
email: email,
optInMarketingEmail: optInMarketingEmail,
tacAgreed: tacAgreed,
hasOwnCompany: hasOwnCompany,
})
);
}
export default CreateAccount;
app.conf.ts
import Amplify from 'aws-amplify';
import awsExports from '#/aws-exports';
Amplify.configure(awsExports);
package.json
{
"name": "#financiallease/driver-seat-amplify-api",
"version": "1.0.0",
"description": "",
"author": "itsupport#financiallease.nl",
"main": "dist/financiallease.cjs.js",
"module": "dist/financiallease.es.js",
"browser": "dist/financiallease.js",
"license": "ISC",
"scripts": {
"build": "rollup -c",
"lint": "eslint --config eslint.config.js '{src,test}/**/*.ts' --no-ignore",
"autoformat": "eslint --config eslint.config.js '{src,test}/**/*.ts' --no-ignore --fix",
"test": "jest -c jest.config.ts",
"coverage": "jest --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
"docs:generate": "typedoc --readme README.md --entryPoints src --entryPointStrategy expand --out docs --theme hierarchy --name \"Driver Seat Amplify Api - docs\" --includeVersion",
"amplify-modelgen": "node amplify/scripts/amplify-modelgen.js",
"amplify-push": "node amplify/scripts/amplify-push.js"
},
"publishConfig": {
"#financiallease:registry": "https://gitlab.com/api/v4/projects/35071033/packages/npm/"
},
"dependencies": {
"#aws-amplify/core": "^4.5.1",
"#aws-amplify/datastore": "^3.11.0",
"#rollup/plugin-alias": "^3.1.9",
"aws-amplify": "^4.3.19",
"dotenv": "^16.0.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
},
"devDependencies": {
"#babel/core": "^7.17.9",
"#babel/preset-env": "^7.16.11",
"#babel/preset-typescript": "^7.16.7",
"#rollup/plugin-babel": "^5.3.1",
"#rollup/plugin-commonjs": "^21.0.3",
"#rollup/plugin-node-resolve": "^13.1.3",
"#rollup/plugin-typescript": "^8.3.1",
"#types/amplify": "^1.1.25",
"#types/jest": "^27.4.1",
"#types/node": "^17.0.30",
"#typescript-eslint/eslint-plugin": "^5.18.0",
"#typescript-eslint/parser": "^5.18.0",
"babel-jest": "^28.0.3",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^8.12.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-react": "^7.29.4",
"esm": "^3.2.25",
"jest": "^27.5.1",
"jest-junit": "^13.2.0",
"jsdoc": "^3.6.10",
"nodemon": "^2.0.16",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.1.4",
"tsconfig-paths": "^3.14.1",
"tslib": "^2.3.1",
"typedoc": "^0.22.15",
"typedoc-theme-hierarchy": "^1.1.1",
"ini": "^1.3.5",
"inquirer": "^6.5.1"
}
}
Any ideas?

AWS Greengrass v2 - Lambda function access to local resources

Hope you're all doing as good as possible during those covid times.
Overview
I have a lambda function that runs on a raspberry device with Greengrass version 1. This lambda access my USB port that has an XBee on it (/dev/ttyUSB0) and sends this data to an MQTT on IoT Core and it is working for some months. It functions this way: My GGC receives 5 packages every 5 minutes from a remote station that has some sensors and after unpacking this data, it sends it as a JSON through MQTT.
I'm currently trying to update my GGC_v1 to GGC_v2 and am facing a problem when deploying it. I'm not able to access the local resource on version two when running the same lambda function, even though the recipe has access for reading and writing on the device.
On GGC_V1 is uses the configuration below:
Make this function long-lived and keep it running indefinitely
Use group default (currently: Greengrass container)
Use group default (currently: ggc_user/ggc_group)
Also added access to resource /dev/ttyUSB0.
Problem Log:
2021-07-13T20:07:22.890Z [INFO] (pool-2-thread-58) com.weatherStation.XBee: Finding mounted cgroups.. {serviceInstance=0, serviceName=com.weatherStation.XBee, currentState=STARTING}
2021-07-13T20:07:22.909Z [INFO] (Copier) com.weatherStation.XBee: Startup script exited. {exitCode=1, serviceInstance=0, serviceName=com.weatherStation.XBee, currentState=STARTING}
2021-07-13T20:07:22.915Z [INFO] (pool-2-thread-53) com.weatherStation.XBee: shell-runner-start. {scriptName=services.com.weatherStation.XBee.lifecycle.shutdown.script, serviceInstance=0, serviceName=com.weatherStation.XBee, currentState=BROKEN, command=["/greengrass/v2/packages/artifacts/aws.greengrass.LambdaLauncher/2.0.7/lambda-l..."]}
2021-07-13T20:07:23.102Z [WARN] (Copier) com.weatherStation.XBee: stderr. 2021/07/13 17:07:23 could not read process state file /greengrass/v2/work/com.weatherStation.XBee/work/worker/0/state.json: open /greengrass/v2/work/com.weatherStation.XBee/work/worker/0/state.json: no such file or directory. {scriptName=services.com.weatherStation.XBee.lifecycle.shutdown.script, serviceInstance=0, serviceName=com.weatherStation.XBee, currentState=BROKEN}
2021-07-13T20:07:23.220Z [ERROR] (pool-2-thread-60) com.weatherStation.XBee: error while removing dir {"path": "/greengrass/v2/work/com.weatherStation.XBee/work/worker/0", "errorString": "unlinkat /greengrass/v2/work/com.weatherStation.XBee/work/worker/0/overlays: device or resource busy"}. {serviceInstance=0, serviceName=com.weatherStation.XBee, currentState=BROKEN}
Recipe:
"RecipeFormatVersion": "2020-01-25",
"ComponentName": "com.weatherStation.XBee",
"ComponentVersion": "5.0.2",
"ComponentType": "aws.greengrass.lambda",
"ComponentDescription": "",
"ComponentPublisher": "AWS Lambda",
"ComponentSource": "arn:aws:lambda:region:account_id:function:Greengrass_WeatherStation",
"ComponentConfiguration": {
"DefaultConfiguration": {
"lambdaExecutionParameters": {
"EnvironmentVariables": {}
},
"containerParams": {
"memorySize": 16000,
"mountROSysfs": false,
"volumes": {},
"devices": {
"0": {
"path": "/dev/ttyUSB0",
"permission": "rw",
"addGroupOwner": true
}
}
},
"containerMode": "GreengrassContainer",
"timeoutInSeconds": 15,
"maxInstancesCount": 100,
"inputPayloadEncodingType": "json",
"maxQueueSize": 1000,
"pinned": true,
"maxIdleTimeInSeconds": 60,
"statusTimeoutInSeconds": 60,
"pubsubTopics": {
"0": {
"topic": "ggc/weather_station/data",
"type": "IOT_CORE"
}
}
}
},
"ComponentDependencies": {
"aws.greengrass.LambdaLauncher": {
"VersionRequirement": ">=2.0.0 <3.0.0",
"DependencyType": "HARD"
},
"aws.greengrass.TokenExchangeService": {
"VersionRequirement": ">=2.0.0 <3.0.0",
"DependencyType": "HARD"
},
"aws.greengrass.LambdaRuntimes": {
"VersionRequirement": ">=2.0.0 <3.0.0",
"DependencyType": "SOFT"
}
},
"Manifests": [
{
"Platform": {
"os": "linux",
"architecture": "arm"
},
"Lifecycle": {},
"Artifacts": [
{
"Uri": "greengrass:lambda-artifact.zip",
"Digest": "GVgaQlVuSYmfgbwoStd5dfB9WamdQgrhbE72s2fF04ysno=",
"Algorithm": "SHA-256",
"Unarchive": "ZIP",
"Permission": {
"Read": "OWNER",
"Execute": "NONE"
}
}
]
}
],
"Lifecycle": {
"startup": {
"requiresPrivilege": true,
"script": "{aws.greengrass.LambdaLauncher:artifacts:path}/lambda-launcher start"
},
"setenv": {
"AWS_GREENGRASS_LAMBDA_CONTAINER_MODE": "{configuration:/containerMode}",
"AWS_GREENGRASS_LAMBDA_ARN": "arn:aws:lambda:region:account_id:function:Greengrass_WeatherStation:5",
"AWS_GREENGRASS_LAMBDA_FUNCTION_HANDLER": "main.weather_handler",
"AWS_GREENGRASS_LAMBDA_ARTIFACT_PATH": "{artifacts:decompressedPath}/lambda-artifact",
"AWS_GREENGRASS_LAMBDA_CONTAINER_PARAMS": "{configuration:/containerParams}",
"AWS_GREENGRASS_LAMBDA_STATUS_TIMEOUT_SECONDS": "{configuration:/statusTimeoutInSeconds}",
"AWS_GREENGRASS_LAMBDA_ENCODING_TYPE": "{configuration:/inputPayloadEncodingType}",
"AWS_GREENGRASS_LAMBDA_PARAMS": "{configuration:/lambdaExecutionParameters}",
"AWS_GREENGRASS_LAMBDA_RUNTIME_PATH": "{aws.greengrass.LambdaRuntimes:artifacts:decompressedPath}/runtime/",
"AWS_GREENGRASS_LAMBDA_EXEC_ARGS": "[\"python3.7\",\"-u\",\"/runtime/python/lambda_runtime.py\",\"--handler=main.weather_handler\"]",
"AWS_GREENGRASS_LAMBDA_RUNTIME": "python3.7"
},
"shutdown": {
"requiresPrivilege": true,
"script": "{aws.greengrass.LambdaLauncher:artifacts:path}/lambda-launcher stop; {aws.greengrass.LambdaLauncher:artifacts:path}/lambda-launcher clean"
}
}
}

etcdctl throws Error: context deadline exceeded error

I'm trying to create a one node etcd cluster on AWS using coreos cloud-config. I have created a Route53 recordset with value etcd.uday.com which has a alias to the ELB which points to the ec2 instance. Etcd is running successfully but when I run the etcd member list command I get below error
ETCDCTL_API=3 etcdctl member list \
--endpoints=https://etcd.udayvishwakarma.com:2379 \
--cacert=./ca.pem \
--cert=etcd-client.pem \
--key=etcd-client-key.pem
Error: context deadline exceeded
However, it lists members when --insecure-skip-tls-verify flag is added to the etcdctl member list command. I have generated certificated using cfssl using below configs
ca.json
{
"CN": "Root CA",
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "UK",
"L": "London",
"O": "Kubernetes",
"OU": "CA"
}
],
"ca": {
"expiry": "87658h"
}
}
ca.config
{
"signing": {
"default": {
"expiry": "2190h"
},
"profiles": {
"client": {
"expiry": "8760h",
"usages": [
"signing",
"key encipherment",
"client auth"
]
},
"server": {
"expiry": "8760h",
"usages": [
"signing",
"key encipherment",
"server auth"
]
},
"peer": {
"expiry": "8760h",
"usages": [
"signing",
"key encipherment",
"server auth",
"client auth"
]
},
"ca": {
"usages": [
"signing",
"digital signature",
"cert sign",
"crl sign"
],
"expiry": "26280h",
"is_ca": true
}
}
}
}
etcd-member.json
{
"CN": "etcd",
"key": {
"algo": "rsa",
"size": 2048
},
"hosts":[
"etcd.uday.com"
],
"names": [
{
"O": "Kubernetes"
}
]
}
etcd-client.json
{
"CN": "etcd",
"key": {
"algo": "rsa",
"size": 2048
},
"hosts":[
"etcd.uday.com"
],
"names": [
{
"O": "Kubernetes"
}
]
}
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -hostname="etcd.uday.com" \
-config=ca-config.json -profile=peer \
etcd-member.json | cfssljson -bare etcd-member
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -hostname="etcd.uday.com" \
-config=ca-config.json -profile=client\
etcd-client.json | cfssljson -bare etcd-client
My etcd-member.service systemd unit cloudconfig is as below
units:
- name: etcd-member.service
drop-ins:
- name: aws-etcd-cluster.conf
content: |
[Service]
Environment=ETCD_USER=etcd
Environment=ETCD_NAME=%H
Environment=ETCD_IMAGE_TAG=v3.1.12
Environment=ETCD_SSL_DIR=/etc/etcd/ssl
Environment=ETCD_CA_FILE=/etc/ssl/certs/ca.pem
Environment=ETCD_CERT_FILE=/etc/ssl/certs/etcd-client.pem
Environment=ETCD_KEY_FILE=/etc/ssl/certs/etcd-client-key.pem
Environment=ETCD_CLIENT_CERT_AUTH=true
Environment=ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/ca.pem
Environment=ETCD_PEER_CA_FILE=/etc/ssl/certs/ca.pem
Environment=ETCD_PEER_CERT_FILE=/etc/ssl/certs/etcd-member.pem
Environment=ETCD_PEER_KEY_FILE=/etc/ssl/certs/etcd-member-key.pem
Environment=ETCD_PEER_TRUSTED_CA_FILE=/etc/ssl/certs/ca.pem
Environment=ETCD_INITIAL_CLUSTER_STATE=new
Environment=ETCD_INITIAL_CLUSTER=%H=https://%H:2380
Environment=ETCD_DATA_DIR=/var/lib/etcd3
Environment=ETCD_LISTEN_CLIENT_URLS=https://%H:2379,https://127.0.0.1:2379
Environment=ETCD_ADVERTISE_CLIENT_URLS=https://%H:2379
Environment=ETCD_LISTEN_PEER_URLS=https://%H:2380
Environment=ETCD_INITIAL_ADVERTISE_PEER_URLS=https://%H:2380
PermissionsStartOnly=true
Environment="RKT_RUN_ARGS=--uuid-file-save=/var/lib/coreos/etcd-member-wrapper.uuid"
ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/lib/coreos/etcd-member-wrapper.uuid
ExecStartPre=/usr/bin/sed -i 's/^ETCDCTL_ENDPOINT.*$/ETCDCTL_ENDPOINT=https:\/\/%H:2379/' /etc/environment
ExecStartPre=/usr/bin/mkdir -p /var/lib/etcd3
ExecStartPre=/usr/bin/chown -R etcd:etcd /var/lib/etcd3
ExecStop=-/usr/bin/rkt stop --uuid-file=/var/lib/coreos/etcd-member-wrapper.uuid
enable: true
command: start
Is cert generation wrong or something I have missed?
The certificates are generated for etcd.uday.com.
You are trying to connect using etcd.udayvishwakarma.com while certificate is valid for etcd.uday.com.
Change endpoint on etcdctl from etcd.udayvishwakarma.com to etcd.uday.com.
I ran into the same problem today, probably this is not going to be useful for you now, but it will for anybody who runs into the same problem in the future.
I think you might be missing
etcd.udayvishwakarma.com
from your cert in
--cert=etcd-client.pem
To verify that etcd.udayvishwakarma.com exists in your cert, you can run:
openssl x509 -in etcd-client.pem -text
and you should be able to see it under X509v3 Subject Alternative Name. If you don't, you will probably need to recreate the certificate adding that DNS name.
while i am running .\etcdctl.exe put key value, i get this error
Error: context deadline exceeded
befor running etcdctl.exe you should running etcd.exe first.
in my case it's working.

Elastic search always return no result

I am trying to test elastic search with the following instruction:
http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg.html
When I try the above and upload the following text which is also in the instruction:
{
"index": {
"_index": "movies",
"_type": "listings",
"_id": "2"
}
} {
"director": "Frankenheimer, John",
"genre": ["Drama", "Mystery", "Thriller"],
"year": 1962,
"actor": ["Lansbury, Angela", "Sinatra, Frank", "Leigh, Janet", "Harvey, Laurence", "Silva, Henry", "Frees, Paul", "Gregory, James", "Bissell, Whit", "McGiver, John", "Parrish, Leslie", "Edwards, James", "Flowers, Bess", "Dhiegh, Khigh", "Payne, Julie", "Kleeb, Helen", "Gray, Joe", "Nalder, Reggie", "Stevens, Bert", "Masters, Michael", "Lowell, Tom"],
"title": "The Manchurian Candidate"
} {
"index": {
"_index": "movies",
"_type": "listings",
"_id": "3"
}
} {
"director": "Baird, Stuart",
"genre": ["Action", "Crime", "Thriller"],
"year": 1998,
"actor": ["Downey Jr., Robert", "Jones, Tommy Lee", "Snipes, Wesley", "Pantoliano, Joe", "Jacob, Ir\u00e8ne", "Nelligan, Kate", "Roebuck, Daniel", "Malahide, Patrick", "Richardson, LaTanya", "Wood, Tom", "Kosik, Thomas", "Stellate, Nick", "Minkoff, Robert", "Brown, Spitfire", "Foster, Reese", "Spielbauer, Bruce", "Mukherji, Kevin", "Cray, Ed", "Fordham, David", "Jett, Charlie"],
"title": "U.S. Marshals"
} {
"index": {
"_index": "movies",
"_type": "listings",
"_id": "4"
}
} {
"director": "Ray, Nicholas",
"genre": ["Drama", "Romance"],
"year": 1955,
"actor": ["Hopper, Dennis", "Wood, Natalie", "Dean, James", "Mineo, Sal", "Backus, Jim", "Platt, Edward", "Ray, Nicholas", "Hopper, William", "Allen, Corey", "Birch, Paul", "Hudson, Rochelle", "Doran, Ann", "Hicks, Chuck", "Leigh, Nelson", "Williams, Robert", "Wessel, Dick", "Bryar, Paul", "Sessions, Almira", "McMahon, David", "Peters Jr., House"],
"title": "Rebel Without a Cause"
}
After when I use this command :
curl -XGET 'search-movies-4f3nw7eiia2xiynjr55a2nao2y.us-west-1.es.amazonaws.com/movies/_search?q=Frankenheimer'
I never get anything back. always returns 0. Here is what I get back:
I am not if I am doing it right but I think I should be able to see at least something because I have Frankenheimer in the director key of the json data uploaded. Can anyone shed light on it?
Try searching the whole index with curl -XGET search-movies-4f3nw7eiia2xiynjr55a2nao2y.us-west-1.es.amazon‌​aws.com/movies/_sear‌​ch which will return the first 10 results by default. If it returns less than 10, the data is likely not in the index.
You can verify that by changing the query to:
curl -XGET search-movies-4f3nw7eiia2xiynjr55a2nao2y.us-west-1.es.amazon‌​aws.com/movies/_sear‌​ch?q=director:Burton
Check out the Elasticsearch URI Search for the complete list of the parameters.

How to use QtWebkit with geolocation?

It is possible to use geolocation in Desktop applications with QWebView?
I tried Qt WebKit and HTML5 geolocation, but not work.
I tried it's the qt5 position api support for desktop app(like mac or windows), but the answer is on the QT APIs, I believe it is possible to customize the "event" in some way, as is done using qwebkitplatformplugin to customize some features of qtwebkit (MultipleSelections, Notifications, Haptics, TouchInteraction, FullScreenVideoPlayer and SpellChecker).
I tried set PermissionGrantedByUser, but not work:
void WebPage::permissionRequested(QWebFrame* frame, Feature feature)
{
switch (feature) {
case Geolocation:
qDebug() << "GEO-Location: PermissionGrantedByUser";
setFeaturePermission(frame, feature, PermissionGrantedByUser);
break;
default:
qDebug() << "";
}
}
I tried add this QT += positioning, but not work
I tried add this TARGET.CAPABILITY += NetworkServices Location, but not work, I believe this is for smartphones, like Symbian.
Event displayLocation and watchPosition are never fired and using {timeout: ...} it shows the message Timeout expired:
<script>
function displayError(err) {
document.getElementById("geo").innerHTML = ("Error Code: " + err.code +
" / msg: " + err.message);
}
function displayLocation(position) {
document.getElementById("geo").innerHTML = [
"latitude:" + position.coords.latitude,
"longitude:" + position.coords.longitude
].join(", ");
}
function getMyLocation() {
if (navigator.geolocation) {
navigator.geolocation.watchPosition(function(a, b, c) {
console.log(a, b, c);
document.getElementById("geo").innerHTML = "Testando...";
});
navigator.geolocation.getCurrentPosition(displayLocation, displayError, {
enableHighAccuracy: false,
timeout: 10000,
maximumAge: 0
});
} else {
document.getElementById("geo").innerHTML = "No geolocation support";
}
}
window.onload = function() {
getMyLocation();
};
</script>
<div id="geo"></div>
I believe that I have to build a library and put in the qtDir/compiler/plugins/position folder, but do not know where to start.
How can I do this?
Or is it possible to customize the event and send coordinates of a 3rdparty lib (I'm not asking for a library and I'm not asking for alternatives in javascript) in response to the navigator.geolocation.getCurrentPosition?
Extra info about
If use QT_DEBUG_PLUGINS=1 in debug mode Application Output return this (note that the first line is generated by WebPage::permissionRequested):
GEO-Location: PermissionGrantedByUser
QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt5.4.0/5.4/mingw491_32/plugins/position" ...
QFactoryLoader::QFactoryLoader() looking at "C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpoll.dll"
Found metadata in lib C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpoll.dll, metadata=
{
"IID": "org.qt-project.qt.position.sourcefactory/5.0",
"MetaData": {
"Keys": [
"positionpoll"
],
"Monitor": true,
"Position": false,
"Priority": 1000,
"Provider": "positionpoll",
"Satellite": false
},
"className": "QGeoPositionInfoSourceFactoryPoll",
"debug": false,
"version": 328704
}
"The plugin 'C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpoll.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpolld.dll"
Found metadata in lib C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpolld.dll, metadata=
{
"IID": "org.qt-project.qt.position.sourcefactory/5.0",
"MetaData": {
"Keys": [
"positionpoll"
],
"Monitor": true,
"Position": false,
"Priority": 1000,
"Provider": "positionpoll",
"Satellite": false
},
"className": "QGeoPositionInfoSourceFactoryPoll",
"debug": true,
"version": 328704
}
Got keys from plugin meta data ("positionpoll")
QFactoryLoader::QFactoryLoader() checking directory path "C:/projects/webview-example/debug/position" ...