What are the causes of a "REACHABLE_CONSTRAINT" response from a Request to The tour planing API v3.6 - here-api

I'm trying to understand why this given geolocation cant be routed:
route should start at this point:
"location": {
"lat": -30.02897115,
"lng": -51.22483528
}
and end at this point:
"location": {
"lat": -30.03011,
"lng": -51.22804
}
The first point is standard for many other routes without this error, so my team and I are assuming the problem is with the end location. Since the documentation doesn't mention this specific error, I decided to ask here.

The reason for REACHABLE_CONSTRAINT error is the location is not reachable. It can be because there is no road that exists to reach that location by the given vehicle. If live traffic mode is used, it can happen due to temporary road closure or traffic incident which makes the location not reachable by the given vehicle. If avoid feature is also used in the fleet profile, that can lead to road restrictions for the vehicle and therefore, can make the location unreachable. Please, check your problem file or provide more details for further analysis.

Related

Getting 'Name servers refused query' on my domain when setting up Google cloud dns

I'm trying to setup Google cloud DNS so I've created a new public managed zone which I'm planning to connect to a firebase project.
After creating the zones I got the 4 NS provided, to be used at the Registrar:
ns-cloud-d1.googledomains.com
ns-cloud-d2.googledomains.com
ns-cloud-d3.googledomains.com
ns-cloud-d4.googledomains.com
I've updated the NS at the registrar but it doesn't seem to be working.
When I query it with https://dns.google.com/ I get this:
{
"Status": 2,
"TC": false,
"RD": true,
"RA": true,
"AD": false,
"CD": false,
"Question": [
{
"name": "[mydomain]",
"type": 1
}
],
"Comment": "Name servers refused query (lame delegation?) [216.239.38.109, 216.239.32.109, 2001:4860:4802:36::6d, 216.239.36.109, 2001:4860:4802:32::6d, 2001:4860:4802:38::6d, 216.239.34.109, 2001:4860:4802:34::6d]."
}
I can't find anything else which I can try in the troubleshooting. Everything seems pretty straight forward - take NS and update the domain at the registrar, although I'm unsuccessful. Any idea what can be wrong?
A lame delegation happens when one (or more) nameserver is asked about a domain and have the information, while other nameserver don't. Both nameserver must have the information, this is explained here in a better way and have some advices for troubleshooting, for example you could use the dig command or other online tools (as suggested on the comments) to retrieve your domain's DNS information. Here is another tool to check DNS propagation.
Take into consideration that DNS changes could take a while until propagation is done, wait some hours and try again, if everything is properly configured on the registrar your domain should be up. Any further changes on Cloud DNS will take some time too, look at this for more details.

ApplicationError: LinkId(s) specified in request are not available

I'm using the HERE Route Match Extension API for matching GPX Data to a route. Afterwards, I am using the road links from the matched route for querying the Routing API. This worked perfectly some weeks ago; strangely I am now getting this error for some of the road links from the Route Match Extension API (response from the Routing API):
"_type": "ns2:RoutingServiceErrorType",
"type": "ApplicationError",
"subtype": "LinkIdNotFound",
"details": "LinkId(s) specified in request are not available",
"additionalData": [
{
"key": "LinkId[0]",
"value": "-1224766809"
}
]
In the response from the Route Match Extension API, the road link definitely exists:
{"confidenceValue":0.6,"elevation":188.39999999999998,"headingDegreeNorthClockwise":10000.0,"headingMatched":118.0,"lat":49.67599245719612,"latMatched":49.67605,"linkIdMatched":-1224766809,"lon":10.035531716421247,"lonMatched":10.03558,"matchDistance":8.36,"matchOffsetOnLink":0.6588415883643146,"minError":1000000.0,"routeLinkSeqNrMatched":178,"speedMps":0.0,"timestamp":1532677148000}
Here is an example query link for the above error: https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!49.77763,9.95697&waypoint1=link!-1224766809&mode=fastest%3Bcar%3Btraffic%3Aenabled&app_id=devportal-demo-20180625&app_code=9v2BkviRwi9Ot26kp2IysQ&representation=linkPaging&language=de-de&returnElevation=true&maneuverAttributes=position%2Clength%2CtravelTime%2CstartAngle&instructionFormat=text&routeAttributes=waypoints%2Csummary
What's going on here? Is this just a temporary issue, since it used to work some weeks ago?
Underlying map release for RME and routing api could be different which leads to link id in both not matching. It is recommended to use lat, long for the routing api.
Routing api and extensions api map release cycles are different and you wont be able to change them. It is better to use the lat, lon rather than relying on link id for your usecase. Using the lat, long from your rme response I get a different link id in routing api. https://route.cit.api.here.com/routing/7.2/calculateroute.json?waypoint0=geo!49.77763,9.95697&waypoint1=geo!49.67599245719612,10.035531716421247&mode=fastest%3Bcar%3Btraffic%3Aenabled&app_id=<>&app_code=<>&representation=linkPaging&language=de-de&returnElevation=true&maneuverAttributes=position%2Clength%2CtravelTime%2CstartAngle&instructionFormat=text&routeAttributes=waypoints%2Csummary

here api request error --- Invalid credentials

I have a 90-day trial and I am registered at (Evaluation 2018-06-29).
But when I request with my correct copied app id and app code I get the below error.
{
"response": {
"_type": "ns2:RoutingServiceErrorType",
"type": "PermissionError",
"subtype": "InvalidCredentials",
"details": "This is not a valid app_id and app_code pair. Please verify that the values are not swapped between the app_id and app_code and the values provisioned by HERE (either by your customer representative or via http://developer.here.com/myapps) were copied correctly into the request.",
"metaInfo": {
"timestamp": "2018-08-15T18:52:35Z",
"mapVersion": "8.30.86.153",
"moduleVersion": "7.2.201832-36299",
"interfaceVersion": "2.6.34"
}
}
}
Can anyone help, especially someone from here api developer support team?
Go into your account projects and add a new project explicitly for the Freemium plan. Then you should be able to generate a new JavaScript/REST App ID and App Code. If you are using one of the mobile SDKs you would generate a new id / code there as well.
(1) Copy and Paste
I'm not certain this is what may be happening for you, but one of my codes had a leading underscore and it was very easy to copy and paste it incorrectly into my source code.
(2) Domain Protection
Also make sure that if you checked "Secure app credentials against a specific domain" that you are calling the routing service from the same domain.
(3) Shell Interpolation
Without more detail about how you are making the calls to the routing service (curl, postman, javascript, ios, android, etc.) it may also indicate where to offer advice.
For example, if you are using curl make sure your parameters have surrounding quotes as & will be interpreted by a shell such that ?app_id=your-app-id&app_code=your-app-code is not interpreted properly. That could generate the response you saw as the shell took your app_code parameter away before curl could make the request only passing the app_id.

Using Azure Quickstart Templates on Azure Government

I'm attempting to use the 3 VM SharePoint Azure QuickStart Template on Azure Government.
Everything works fine except that the deployment errors out due to the fact that Azure Government expects the storageAccountUri to be blob.core.usgovcloudapi.net, while the default is blob.core.windows.net.
I've changed the JSON files to the expected blob.core.usgovcloudapi.net, but it still complains of the error that the blob URL's domain must be blob.core.usgovcloudapi.net.
I'm wondering why it is being overridden and how I can prevent that.
An example of the change I've made is:
"osDisk": {
"name": "osdisk",
"vhd": {
"uri": "[concat('http://',parameters('storageAccountNamePrefix'),'1.blob.core.usgovcloudapi.net/vhds/',parameters('sqlVMName'),'-osdisk.vhd')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"
Any help would be appreciated.
You should be able to reference the storage account and that will ensure you always get the correct address (regardless of cloud):
"osDisk": {"name": "osdisk","vhd": {"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/',
variables('storageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),'.vhd')]"}}
We have some other tips for using a QuickStart that might be hard coded to a single cloud here:
https://blogs.msdn.microsoft.com/azuregov/2016/12/02/azure-quickstart-templates/

Get location from Alexa Skills Kit (ASK)

I'm looking for a way to get the user's location, ideally longitude/latitude but address would work too, from the Alexa Skill Kit request to my custom skill. Also, I don't want to have to have the user link to an account on my app's side.
Is this possible? If so, how?
Amazon has now (2017-04-05) added this capability. See their blog post about their new Device Address API.
Using this new API you can get the address (either postal code or full address) of the device, as specified in the customer’s device settings.
From that you could use a geocoding API (such as is part of the Google Maps API) to translate the address into location coordinates.
As per this thread on the Amazon Developer forums, there is not currently (as of May 2016) a way to get user location via the publicly available APIs. The only skills able to do so, such as Uber or Domino's, are utilizing APIs that are not available through the Alexa Skills Kit. However, there's hope that it may be added, as "Jamie#Amazon" left this reply in that discussion:
Hey there,
Thanks for posting.
This has now been added to the roadmap. Thanks for the feedback.
Jamie
However, at the time of writing, no further update has been provided regarding the implementation of such a feature.
As #Tom has pointed out, it is now possible to get the device address in your custom skill. If you are using Python to create your skill, it's pretty easy to implement the new API. I've written a detailed blog post about it here. It also describes how to get the corresponding coordinates for the retrieved address, so it might be useful for you. In short, here is a Python function to get you started. I use the very handy Flask-Ask library for my skill. Thus, it is easy to get the value of the deviceId and consentToken objects. These are included by Alexa in the JSON request sent to your skill. They are needed for constructing the request to the Amazon address API endpoint:
import requests
from flask_ask import Ask, context
def get_alexa_location():
URL = "https://api.amazonalexa.com/v1/devices/{}/settings" \
"/address".format(context.System.device.deviceId)
TOKEN = context.System.user.permissions.consentToken
HEADER = {'Accept': 'application/json',
'Authorization': 'Bearer {}'.format(TOKEN)}
r = requests.get(URL, headers=HEADER)
if r.status_code == 200:
return(r.json())
The function will return something like this on a successful call:
{u'city': u'Berlin', u'countryCode': u'DE',
u'addressLine1': u'42 Unter den Linden',
u'addressLine2': None, u'stateOrRegion': u'Berlin',
u'districtOrCounty': u'Berlin', u'postalCode': u'10117',
u'addressLine3': None}
You can use geopy to convert this address to coordinates.
It is now possible to get the user's real-time geolocation (longitude/latitude) using the Alexa Location Services, which avoids having to integrate with a separate geocoding API as suggested by other answers. See the related blogpost for official information about this feature's release.
Provided that the device is compatible (context.System.device.supportedInterfaces.Geolocation exists), the location services are running and the alexa::devices:all:geolocation:read permission has been granted to your skill , you can retrieve a Geolocation object through the request's context, which will be equivalent to the following JSON payload:
"Geolocation":{
"locationServices": {
"access": "ENABLED",
"status": "RUNNING",
},
"timestamp": "2018-03-25T00:00:00Z+00:00",
"coordinate": {
"latitudeInDegrees": 38.2,
"longitudeInDegrees": 28.3,
"accuracyInMeters": 12.1
},
"altitude": {
"altitudeInMeters": 120.1,
"accuracyInMeters": 30.1
},
"heading": {
"directionInDegrees": 180.0,
"accuracyInDegrees": 5.0
},
"speed": {
"speedInMetersPerSecond": 10.0,
"accuracyInMetresPerSecond": 1.1
}
}
Please follow the below URL to Get location from Alexa Skills Kit (ASK)
URL:
https://api.eu.amazonalexa.com/v1/devices/{devicesId}/settings/address/countryAndPostalCode
Your Header would be something like below :
Host:api.eu.amazonalexa.com[keep your host you can get is from developer account during testing from json]
Accept:application/json
Authorization:Bearer [KEEP YOUR apiAccessToken here]
if request went success your will get response as below:
{
"countryCode": "IN",
"postalCode": "560102"
}
Make sure you have enabled permission in the Alexa app, and grants the permission of the respective skill please refer the bellow URL for more details of permission configuration
https://developer.amazon.com/blogs/alexa/post/0c975fc7-17dd-4f5c-8343-a37024b66c99/alexa-skill-recipe-using-the-device-address-api-to-request-information

Resources