question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot `request` a public layer

See original GitHub issue

I’m on v2.0.0

I’m running into an ArcGISAuthError when trying to request a public MapServer layer.

request('https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2',
  {
    httpMethod: 'GET',
    authentication
  }
);

My UserSession’s portal property: https://qaext.arcgis.com/sharing/rest.

Result:

image

{
  "name": "ArcGISAuthError",
  "message": "NOT_FEDERATED: https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2 is not federated with any portal and is not explicitly trusted.",
  "originalMessage": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2 is not federated with any portal and is not explicitly trusted.",
  "code": "NOT_FEDERATED",
  "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2",
  "options": {
    "httpMethod": "GET",
    "params": {
      "f": "json"
    },
    "authentication": {
      "clientId": "KU6w5ji2TfnAx5gl",
      "username": "jpeterson_iot",
      "token": "U_HrpG0BBRwPxk17JENdPIvIvooLNGyJez-vYEPiw-w2cpedH9EvAtk1cFbZF-zdp1j2KrVxF23KmGvztgpDtPYuXvvRA1uXmHcIDGaHe9yT8uZqnsEYE6Q9GlCPwN9X5EAkkPZLc8mGv9iH8hiV96Z1863QPqX4JCMbQy9I8Q6m4GF8VH0mPXMxNKO37PzR1wRxCu-cc72Fbg8-g3KzFZ2QejrAFhNja6TfUheG_jk.",
      "tokenExpires": "2019-05-14T16:30:40.047Z",
      "portal": "https://qaext.arcgis.com/sharing/rest",
      "ssl": true,
      "tokenDuration": 20160,
      "refreshTokenTTL": 1440
    },
    "headers": {}
  }
}

Maybe related? https://github.com/Esri/arcgis-rest-js/issues/242 https://github.com/Esri/arcgis-rest-js/pull/245#pullrequestreview-137613161

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jpetersoncommented, May 7, 2019

@jgravois I did see – excellent work! I think this is a great improvement to the library.

1reaction
jpetersoncommented, Apr 30, 2019

Thanks @jgravois! Works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to publish shapefiles as hosted feature layers to ...
The option to create hosted feature layers is unavailable when ArcGIS Online is accessed with a public account. · The error message is...
Read more >
Troubleshoot—ArcGIS Online Help | Documentation
I am getting connection errors in my notebook when making request calls. Hosted web layers. I cannot publish a hosted tile layer from...
Read more >
I can't add a ArcGIS Feature Server Layer - GIS Stack Exchange
In short, your only course of action would to get in touch with the server owners and inform them of the error and...
Read more >
Error: Cannot open layer cb_2019_54_bg_500k #370 - GitHub
I'm getting an error when submitting this code: CBG_all <- get_acs(state = "WV", geography = "block group", variables = "B19301_001",
Read more >
Serverless - Lambda Layers "Cannot find module 'request'"
I was having a similar error to you while using the explicit layers keys that you are using to define a lambda layer....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found