Error: Server returned HTTP code: 404

Asked

Viewed 48 times

0

Good personal day I am trying to connect the Google Earth Engine API on my server, however I am encountering the following error.

Error: Server returned HTTP code: 404
    at Object.ee.data.handleResponse_ (C:\Users\EST\Desktop\express\node_modules\@google\earthengine\build\main.js:9843:9)
    at Object.ee.data.send_ (C:\Users\EST\Desktop\express\node_modules\@google\earthengine\build\main.js:9792:18)
    at Object.ee.data.getAlgorithms (C:\Users\EST\Desktop\express\node_modules\@google\earthengine\build\main.js:9465:24)
    at Function.ee.ApiFunction.initialize (C:\Users\EST\Desktop\express\node_modules\@google\earthengine\build\main.js:10563:78)
    at Object.ee.initialize (C:\Users\EST\Desktop\express\node_modules\@google\earthengine\build\main.js:12110:26)
    at Object.<anonymous> (C:\Users\EST\Desktop\express\server.js:20:4)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\EST\AppData\Roaming\npm-cache\_logs\2018-11-21T11_18_17_293Z-debug.log

My code:

const express = require('express')
const server = express()
const port = 8080

var ee = require('@google/earthengine');

// Authenticate using one (but not both) of the methods below.

ee.data.authenticateViaPrivateKey('./Georreferenciamento -dcbe3c4e1089.json');

ee.initialize();

// Run an Earth Engine script.
var image = new ee.Image('srtm90_v4');
image.getMap({min: 0, max: 1000}, function(map) {
  console.log(map);
});

server.listen(8080,()=>{
  console.log('servidor de pé em http://localhost:8080')
  console.log('Para desligar o servidor: ctrl + c')
})

Can anyone help me? Thanks in advance

  • According to this measure this is due to a service authentication error.

  • would be with some direct authentication with google? Or is there an error in my source code ?

  • Google authentication error even, have to check the access you are doing to see if it is correct. The library is only misinforming 404 instead of 403

  • 1

    I’ll check, thank you very much for your help.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.