Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving { Error: Server returned HTTP 401 } #76

Open
remmi11 opened this issue Jun 27, 2017 · 4 comments
Open

Receiving { Error: Server returned HTTP 401 } #76

remmi11 opened this issue Jun 27, 2017 · 4 comments

Comments

@remmi11
Copy link

remmi11 commented Jun 27, 2017

I am using a machine configured exactly as was before when once working to use tessera to serve up tm2.

Using:
Npm -v 4.5.0
Tessera v 0.9.0

Have installed globally:
npm install -g tessera tl mbtiles mapnik tilelive tilelive-file tilelive-http tilelive-mapbox tilelive-mapnik tilelive-s3 tilelive-tmsource tilelive-tmstyle tilelive-utfgrid tilelive-vector tilejson

Have added to path:
C:\Users<user>\AppData\Roaming\npm\node_modules\tessera;
C:\Users<user>\AppData\Roaming\npm;
C:\Users<user>\AppData\Roaming\npm\node_modules\tilelive;
C:\mapnik-v2.2.0\lib
C:\mapnik-v2.2.0\bin

When running >
tessera tmstyle:///Users//Desktop/mapbox-studio-light.tm2 -p 9000

Now receive...
Error: Server returned HTTP 401
at Request. (C:\Users\Snx\AppData\Roaming\npm\node_modules\tilejson\lib\tilejson.js:223:19)

@mojodna
Copy link
Owner

mojodna commented Jun 27, 2017

An HTTP 401 means "Unauthorized", and since you're rendering a TM2 style, I'm guessing that you need to make sure that your Mapbox token is correct in the TM2 project file.

@remmi11
Copy link
Author

remmi11 commented Jun 27, 2017

Fantastic! Thanks. It's funny I had it set as a system variable but works fine when running

echo MAPBOX_ACCESS_TOKEN=pk.eyJ1Ijoid3RnZW9ncmFwaGVyIiwiYSI6ImNpdGFicWJqYjAwdzUydHM2M2g0MmhsYXAifQ.oO-MYNUC2tVeXa1xYbCIyw

in the cmd window just before starting server. Thanks for the input. I love this toolset.

Side note: Is there any support for tessera and mapbox studio styles? As in...
tessera mapbox://styles/wtgeographer/cj4eav1o20jh82rmh8xod9dft

@mojodna
Copy link
Owner

mojodna commented Jul 9, 2017

@JesseCrocker has done some things w/ headless rendering of Mapbox GL styles, but I can't remember which tilelive module that uses off-hand.

@JesseCrocker
Copy link
Contributor

@remmi11 It is possible to render mapbox studio styles using tessera by using tilelive-gl. It doesnt directly support the mapbox:// urls, you have to download the style, and change the urls for sprites and fonts to use https urls instead of mapbox urls. If your style uses any of the mapbox tilesets(streets, satellite, outdoors, etc) you probably cant render them on your own server without violating the mapbox TOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants